#17361: Poset: Add ordinal_product
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  jmantysalo             |       Status:  new
           Type:         |    Milestone:  sage-wishlist
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:         |    Reviewers:
  combinatorics          |  Work issues:
       Keywords:  poset  |       Commit:
        Authors:         |  abeef07ddd88246d8564692ff57ff17f62c5eb3f
  Frédéric Chapoton      |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  u/chapoton/17361       |
   Dependencies:         |
-------------------------+-------------------------------------------------

Comment (by ncohen):

 Hello !

 Well, first for the poset thing you can be MUCH more efficient. In
 `Poset.ordinal_sum` you add only edges between the top elements of one and
 the bottom elements of the other. Why don't you do that here too ?

 (please, cache the top/bottom elements of each poset).

 Also, {{{for s in self for s2 in self.lower_covers(s)}}} should probably
 be {{{for s,s in cover_relations_iterator}}}.

 For the graph code, it could be improved by replacing the calls to
 `add_edge` by one call to `add_edges`. The difference is that `add_edge`
 supports many kind of inputs (a pair, or two points, or three points) and
 that `add_edge` checks it at every call (while `add_edges` does it once).

 Nathann

--
Ticket URL: <http://trac.sagemath.org/ticket/17361#comment:11>
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.

Reply via email to