#6631: [with patch; needs review] speed up is_lyndon method for words
---------------------------+------------------------------------------------
Reporter: saliola | Owner: Franco Saliola
Type: defect | Status: new
Priority: major | Milestone: sage-4.1.1
Component: combinatorics | Keywords: words
Reviewer: vdelecroix | Author: Franco Saliola
Merged: |
---------------------------+------------------------------------------------
Comment(by vdelecroix):
The end of the loop can be simplified (there is no break statement in the
loop, and we know that j==n at the end).
{{{
while j < n:
[...]
else:
return j - i == n
}}}
could become:
{{{
while j < n:
[...]
return i == 0
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6631#comment:4>
Sage <http://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
-~----------~----~----~----~------~----~------~--~---