#9877: Add is_sturmian_factor, is_tangent methods for finite words
-----------------------------------+----------------------------------------
Reporter: tmonteil | Owner: tmonteil
Type: enhancement | Status: needs_info
Priority: major | Milestone: sage-5.0
Component: combinatorics | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Thierry Monteil | Merged in:
Dependencies: | Stopgaps:
-----------------------------------+----------------------------------------
Comment (by vdelecroix):
Hello,
Some comments to motivate the author of the patch.
1) The problem with datatype=letter may be fixed by the following. At the
begining of the function, create a dictionnary "word_from_letter" with
keys the two letters and values as words of length 1. It is the best way
to do as a call to the parent for the creation of an object is always time
consuming. With that done, all tests pass on sage-5.0.beta7.
2) It would be nice to put a "reverse engineering" example (random or not)
as follows:
{{{
sage: s1 = WordMorphism('a->ab,b->b')
sage: s2 = WordMorphism('a->ba,b->b')
sage: s3 = WordMorphism('a->a,b->ba')
sage: s4 = WordMorphism('a->a,b->ab')
sage: W=Words('ab')
sage: w=W('ab')
sage: for i in xrange(8): w = choice([s1,s2,s3,s4])(w)
sage: w
word: aabaaabaabaaabaabaabaaabaabaabaaabaabaaa...
sage: w.is_sturmian_factor()
True
}}}
3) There is still the doctest problem mentionned in comment: 17
It would be great to have this patch integrated in sage-5.0!
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9877#comment:19>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.