#17361: Poset: Add ordinal_product
-------------------------+-------------------------------------------------
Reporter: | Owner:
jmantysalo | Status: new
Type: | Milestone: sage-wishlist
enhancement | Resolution:
Priority: major | Merged in:
Component: | Reviewers: Nathann Cohen
combinatorics | Work issues:
Keywords: poset | Commit:
Authors: | c59047103bc9cf22d2526c7ae146492fec92b698
Frédéric Chapoton | Stopgaps:
Report Upstream: N/A |
Branch: |
u/chapoton/17361 |
Dependencies: |
-------------------------+-------------------------------------------------
Changes (by ncohen):
* reviewer: => Nathann Cohen
Comment:
Hello !
Well, this patch looks good to me, and all tests pass. Jory: I tested the
product of two `BooleanLattice(5)` and it takes 2.5 seconds. It is still a
lot, but better than 17s `:-/`
{{{
sage: %timeit p.ordinal_product(p)
1 loops, best of 3: 2.46 s per loop
}}}
I do not understand much what the profiling says, though. It seems that
1.3s is used by the 'has_edge' function (Why ???? `O_o`)
The code of `transitive_reduction` can be rewritten more efficiently,
though. Actually, this is a very important point since this function is
called every time a poset is created, to build its hasse diagram.
Sorry guys, but I have to give up for tonight. 1am, and I will need my
brain tomorrow again. Good night, and thanks for the patch !
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/17361#comment:16>
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.