Opened 12 years ago
Closed 12 years ago
#5037 closed enhancement (duplicate)
Bug fixes and new functionalities for Words library
Reported by: | slabbe | Owned by: | slabbe |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | combinatorics | Keywords: | |
Cc: | sage-combinat | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Add to Word Morphism the following functions :
__add__()
that merges two Word Morphisms on disjoint domain.restriction(self, alphabet)
that returns a new Word Morphism constructed from self by restricting the domain to Words over the given alphabet.disjoint_alphabet(self)
, for involutions only, that returns a partition A,B,C of the alphabet s.t. self(A) = B, self(B)=A and self(C) = C.
Note : I am still not convince of those three names.
Fix in Word Morphism the following function :
is_involution(self)
: should first check that self is an endomorphism
Fix in word.py the following functions :
colored_vector
: Fails on empty word.
Add in word.py the following possibilities:
colored_vector
: Put a label on the graphical word displayed.
Change History (3)
comment:1 Changed 12 years ago by
- Cc sage-combinat added
comment:2 Changed 12 years ago by
comment:3 Changed 12 years ago by
- Milestone changed from sage-combinat to sage-duplicate/invalid/wontfix
- Resolution set to duplicate
- Status changed from new to closed
Closing this as a duplicate of #6519.
Note: See
TracTickets for help on using
tickets.
This is the example of a bad ticket having many feature to fix/add. Fortunately, all of those were solved by #6519 merged in sage recently.
In fact, you can now glue word morphism together using the function
extend_by
:You can now restrict the domain of a morphism by using
restrict_domain
:You can now get the partition of the domain alphabet defined (not uniquely) by a involution :
The code of
is_involution
first check that self is an endomorphism before comptuting the square of self, which gives a better error message :The colored vector is not broken anymore on the empty word :
A label can now be added to the colored vector of a word (a graphic object useful to study equations on words) :
Hence, I recommand that this ticket be closed.