-
-
Notifications
You must be signed in to change notification settings - Fork 512
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
Improving iterated palindromic closure computation #8227
Comments
This comment has been minimized.
This comment has been minimized.
comment:1
I had to implement two other functions: find() and rfind() that were only available for Word_str words. It is not the more efficient implementation yet, but that was not the goal of this ticket... |
comment:4
for those functions :
illustrates a problem : the behavior for
Adding a blank line before the itemize should repair the problem. I also suggest to put
That's all for my comments. |
comment:5
Thank you Sébastien for all those comments ! I agree with you on items 4 and 5, but I think these issues should be addressed in another ticket. I intend to do it in a close future, but this is in some way independent of the iterated palindromic closures functions. As for item 1, I agree with you as well, but I think it would be better if |
This comment has been minimized.
This comment has been minimized.
comment:7
Replying to @sagetrac-abmasse:
Well, ok for 5 :
I think both are possible (Je ne crois pas que l'un empêche l'autre) : one may selec the algorithm and the function can still behave like python. For example,
Ok, so let's open a new ticket to clean up find and rfind. |
comment:8
I have corrected items 1 to 4. As discussed, item 5 will be done in another ticket or directly in Cython. I'll upload the new patch in a few minutes. |
Attachment: trac_8227_iterated_palindromic_closure_improvement-abm.patch.gz Updated patch with corrections |
Attachment: trac_8227_review-sl.patch.gz Applies over the precedent patch |
Reviewer: Sébastien Labbé |
Changed author from abmasse to Alexandre Blondin-Massé |
comment:10
I just tested the patch. All test passed in sage/combinat/words. The speed of the function is greatly improved. Doc builds fine. I am giving a positive review to this ticket. Althought, I added a patch fixing some small sphinx editing and replace |
Changed author from Alexandre Blondin-Massé to Alexandre Blondin Massé |
comment:11
I agree with the changes. I tested the two patches and everything seems alright. All tests passed, no problem in the documentation. Positive review to Sébastien's changes. |
comment:12
Merged in this order: |
Merged: sage-4.3.4.alpha0 |
There is a faster way to compute the iterated palindromic closure of a word than using the definition. The problem with the latter is that it needs to compute the longest f-palindromic suffix of the current word at each step, while it is possible to easily deduce this length only by looking at the directive word.
Here is an example:
The difference is particularly notable for longer words:
CC: @seblabbe
Component: combinatorics
Keywords: iterated palindromic closure
Author: Alexandre Blondin Massé
Reviewer: Sébastien Labbé
Merged: sage-4.3.4.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/8227
The text was updated successfully, but these errors were encountered: