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
Add support for word path #5038
Comments
comment:3
I just uploaded a patch, but I forgot to do some stuff. Will upload another patch soon. |
comment:4
I refreshed the patch. Needs review !! ...Should I do something somewhere so that |
comment:5
I updated the patch after #6903 reviews. |
comment:6
I just realized that the doctest coverage is not perfect right now. Will post a new patch soon. |
Depends on #6903. |
comment:7
Attachment: trac_5038_paths-sl.patch.gz New patch uploaded. Doctest coverage of paths.py : 100%. Added paths.py to the documentation. |
comment:8
Needs review! |
comment:9
Looks good to me. I attached a patch to remove the import of GridLines since it isn't used. |
Author: Sebastien Labbe |
Reviewer: Mike Hansen |
Attachment: trac_5038-remove-gridlines.patch.gz |
comment:10
I got the following doctest failure:
|
Applies over the precedent 2 patches. |
comment:11
Attachment: trac_5038_pickle_jar_fix-sl.patch.gz The above failure is now fixed by the patch I just uploaded. Needs review. |
comment:12
I am reviewing my own patch... There is something I dislike in the patch that I would like to discuss before including it into Sage. There are pros and cons for having a word path being a word. One thing I dislike right now is the pollution on the tab completion :
whereas it could be something like below if a word path wouldn't inherit from
But since I still want to know if a wordpath is a palindrome and other questions already implemented for words, something like below could exist :
Of course I would want the Franco, Mike Hansen : Do you have any comments ? I am sure you have useful ideas I could use! Thank you, Sébastien |
comment:13
Replying to @seblabbe:
You need to decide whether or not a "wordpath" is a word. If it is, then it If it is not a word, then having a Perhaps you want to work with paths instead of word paths?
The creation of u in the following is constant time:
Hope this helps. |
Attachment: trac_5038_improved_doc-sl.patch.gz |
comment:14
I want a word path to be a word. So, I will keep it as it is.
Yes, thank you! I added a patch that improves the documentation and that suggests to use Needs review! |
Attachment: trac_5038_doc_fixes-fs.patch.gz apply on top of the others |
comment:15
I posted a small patch to address some errors in the documentation introduced in the last patch. Otherwise, positive review. Sébastien, take a look at my patch, and if it is okay, then change the summary to positive review. |
comment:16
Great. Thanks for the grammatical corrections and for the '-' as well. I am giving positive review to your changes, so that I change the status of the ticket for positive review. |
Merged: sage-4.2.alpha1 |
Changed reviewer from Mike Hansen to Mike Hansen, Franco Saliola |
Changed author from Sebastien Labbe to Sébastien Labbé |
This module implements word paths which belongs to Discrete Geometry seen from Combinatorics on Words point of view. A word path is the representation of a word
as a discrete path in a two (or more) dimensions space using a one-to-one
correspondence between the alphabet and a set of vectors called steps. Using combinatorics on words, many problems on discrete polygons on 2d lattice grid may be solved in linear time in length of the perimeter (self-intersecting, area, inertia moment, etc.). For now, the goal is to create all the classes hierarchy. Cool algorithms will come into an other ticket.
Here are some examples taken from the documentation of the current state of paths.py available in the sage-combinat tree.
The combinatorial class of all paths defined over three given steps:
Creation of a path from the combinatorial class P:
Since p is a finite word, many functions from the word library are available:
Some built-in combinatorial classes of paths:
CC: @sagetrac-sage-combinat @saliola @sagetrac-abmasse
Component: combinatorics
Author: Sébastien Labbé
Reviewer: Mike Hansen, Franco Saliola
Merged: sage-4.2.alpha1
Issue created by migration from https://trac.sagemath.org/ticket/5038
The text was updated successfully, but these errors were encountered: