#8227: Improving iterated palindromic closure computation
-----------------------------+----------------------------------------------
Reporter: abmasse | Owner: abmasse
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.3.3
Component: combinatorics | Keywords: iterated palindromic closure
Author: abmasse | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
Comment(by slabbe):
Replying to [comment:5 abmasse]:
> 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.
Well, ok for 5 : `rfind` could be improved later. But for 4, I would like
your new find function to make use of `first_pos_in` since it is already
there and is faster. If you want to keep your implementation there, I
suggest you use a parameter `algorithm` that defaults to `suffix_table` or
a similar word and that make use of `first_pos_in`.
> As for item 1, I agree with you as well, but I think it would be better
if ``find()`` and ``rfind()`` functions could allow the user to choose
between different string search algorithms (Boyer-Moore, KMP, etc.), so
that it is maybe not necessary to make them look like the Python functions
(what do you think?).
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,
{{{
sage: w = Word(range(10))
sage: u = Word(range(5, 8))
sage: w.find(u)
5
sage: w.find(u, algorithm='KMP')
5
sage: w.find(u*u)
-1
}}}
> If I understand you well in item 2, you would like me to change the
``find()`` and ``rfind()`` functions for Word_str objects or only to
detect it in the algorithm computing the iterated palindromic closure?
Finally, I will correct item 3 and the other problems as soon as you
answer me.
Ok, so let's open a new ticket to clean up find and rfind.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8227#comment:7>
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.