New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify words.py #19619
Comments
comment:1
Sounds great. I will be reviewing this. |
Branch: u/vdelecroix/19619 |
Commit: |
Author: Vincent Delecroix |
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:6
What a mess this unpickling stuff!!! |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:9
All tests pass! |
comment:10
Is it ready for review? I saw a TODO in the diff... |
comment:11
Replying to @seblabbe:
Read for review. The TODO can be removed. It was because of the
where |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:13
Some methods are missing doctests apparently:
|
comment:14
Is that a problem? |
comment:15
In
but I do not see the point. The missing doctest are in the deprecated class For |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:43
I tried to do my best for |
comment:44
I looked at the code. It looks good. But I now get (also reported by the patchbots):
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:46
Right. Permutations or parking functions are callable but should be considered as finite... |
comment:47
I would prefer if the code of
if you agree. It makes the code easier to read and be convince anybody that it does the minimal and most efficient path in the function. Doing what you do in |
comment:48
Replying to @seblabbe:
If a user provides |
comment:49
Moreover, the |
comment:50
Some timings with the branch
Whereas we have on develop
It looks like the code in the branch is:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:52
Good to go. |
comment:53
Great! Thanks for the review! |
Changed branch from u/vdelecroix/19619 to |
Currently we have too many parent for words:
Words_all
,Words_over_alphabet
,Words_over_OrderedAlphabet
)FiniteWords_over_OrderedAlphabet
)InfiniteWords_over_OrderedAlphabet
)FiniteWords_length_k_over_OrderedAlphabet
andWords_n
)This lead to subtle bug like
The proposal of this ticket is to have only four classes:
FiniteWords
Words_n
: words of lengthn
(as a slice of the one before)InfiniteWords
(orFullShift
)FiniteOrInfiniteWords
The parent
FiniteWords
should hence have a method.shift()
that return the associated shift (e.gu ** Infinity
will belong there). Similarly, the parentInfiniteWords
should have a method.factors()
that return the set of factors (and finite slices will belong there).We also:
size_of_alphabet
andhas_letter
lyndon_word.py
Word_char
if possibleCC: @seblabbe
Component: combinatorics
Author: Vincent Delecroix
Branch/Commit:
4fd6556
Reviewer: Sébastien Labbé
Issue created by migration from https://trac.sagemath.org/ticket/19619
The text was updated successfully, but these errors were encountered: