#19161: LatticePoset: faster is_complemented()
-------------------------------------+-------------------------------------
Reporter: jmantysalo | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.9
Component: combinatorics | Resolution:
Keywords: | Merged in:
Authors: Jori Mäntysalo | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jmantysalo/faster_is_complemented| bf8fdd5dd0702a6158691183ac6a3351461a650e
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by ncohen):
HMmmm... The speedup is cool, but the algorithm is slightly less clear. Is
it slower to do it like that:
{{{
from itertools import izip
for row1,row2 in izip(meet,join):
for c1,c2 in izip(row1,row2):
if c1==0 and c2==n-1:
break
else:
retun False
return True
}}}
Sorry but it is a bit hard for me to try it today: I burned the two main
fingers of my right hand while cooking, and I type mostly with my left
hand `:-/`
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/19161#comment:4>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.