#16985: Poset: Faster is_selfdual()
-------------------------------------+-------------------------------------
       Reporter:  jmantysalo         |        Owner:
           Type:  enhancement        |       Status:  new
       Priority:  minor              |    Milestone:  sage-wishlist
      Component:  combinatorics      |   Resolution:
       Keywords:                     |    Merged in:
        Authors:                     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/jmantysalo/poset__faster_is_dual__|  
ef4707bad72ee6a544a816092aed84e6b988fb87
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by jmantysalo):

 Replying to [comment:10 ncohen]:
 > > Hmm, actually it seems that only `reverse()` is needed. There is no
 need at all to calculate full dual with element labels. Got to think about
 this tomorrow.
 >
 > {{{
 > sage: Poset(DiGraph({0:[],1:[2]})).level_sets()
 > [[1, 0], [2]]
 > sage: Poset(DiGraph({0:[],1:[2]})).dual().level_sets()
 > [[0, 2], [1]]
 > }}}

 I don't understand. Of course we must sometimes do full test for
 isomorphicity. This is one example of those.

 Saying `Poset({'a':['b']})._hasse_diagram.level_sets()` will return `[[0],
 [1]]`, not `[['a'], ['b']]`. But in any case, code seems to reverse an
 array, which is unneeded.

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