#12996: Support for one-dimensional shifts of finite type
--------------------------------------+-------------------------------------
Reporter: mhs | Owner: sage-combinat
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.4
Component: combinatorics | Resolution:
Keywords: symbolic dynamics | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Michael Schraudner | Merged in:
Dependencies: | Stopgaps:
--------------------------------------+-------------------------------------
Comment (by mhs):
Hi Vincent,
I addressed most of your comments:
- renamed method "__repr__" to "_repr_". (although I still dont see the
difference - I looked at the documentation of SageObject, but did not get
the point - can you explain this, maybe in a private email)
- renamed option "alph" to "alphabet"
- the option "alphabet" accepts as input both a list and an alphabet (as
defined in the word class), so externally there is no difference.
Internally I prefer the standard type list - it has less overhead,
especially as it is accessed a lot in building admissible words etc.
- changed documentation of "an_element". Your comment seems to be based on
a misunderstanding as the method already DID return an element of the SFT
in form of an iterator - how else would you represent an infinite sequence
of symbols? Comments welcome.
Your first comment is not yet addressed, as I dont know what you would
like to see as output. If the SFT has a name this name is returned, but if
it does not? The method could just return "An SFT", but what is the point
of this, you could just check "isinstance" - it is not very informative,
so I thought having at least the alphabet would be helpful. Any
suggestions on this from your side would be very welcome.
Best
M.
Replying to [comment:24 vdelecroix]:
> hi,
>
> Few more remarks
>
> * the output is too verbose. When I print a number I do not want to see
"Number 3112. It is not prime and its divisors are 1, 2, 4, 8, 389, 778,
1556 and 3112." but only "3112". The same for shifts. Methods are here to
get more informations.
>
> * Because you inherit from SageObject, the method repr with two
underscores should be modified into a repr with one underscore (see the
code and the documentation of SageObject). In particular, SageObject takes
care of custom names.
>
> * the option "alph" is named "alphabet" in the words library but they
should have the same nameĀ·
>
> * the alphabet in your class are lists but there is a class for alphabet
in sage.combinat.words.alphabet, why not using it?
>
> * The name of the method an_element is not appropriate. an_element
should return an element of the subshift.
>
> Vincent
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12996#comment:25>
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.