#17053: Add function for direct sum of posets
---------------------------------+-----------------------------
       Reporter:  jmantysalo     |        Owner:
           Type:  enhancement    |       Status:  new
       Priority:  major          |    Milestone:  sage-wishlist
      Component:  combinatorics  |   Resolution:
       Keywords:                 |    Merged in:
        Authors:                 |    Reviewers:
Report Upstream:  N/A            |  Work issues:
         Branch:                 |       Commit:
   Dependencies:                 |     Stopgaps:
---------------------------------+-----------------------------

Comment (by ncohen):

 Hello !

 > Function could then be something like

 1) Besides checking that `other` is a !Poset, I do not understand why this
 function should do anything else than calling the graph routine. And it
 would be that routine's job to check that the input is correct.

 2) I believe that the default behaviour should be "pairs", because it is
 the behaviour that keeps the most information. And people can force
 `relabel="integers"` if they like.

 > 1) Why I must say `other.hasse_diagram()` on last line,
 `other._hasse_diagram` should work. Again some copy-immutable -thing?

 Because of that:

 {{{
 sage: Poset(DiGraph({"a":["b"]})).hasse_diagram().vertices()
 ['a', 'b']
 sage: Poset(DiGraph({"a":["b"]}))._hasse_diagram.vertices()
 [0, 1]
 }}}

 > 2) What should be the name of parameter and values for it?
 `verbose_relabel` to be consistent with graphs? Default value for it?

 I don't really know... `verbose_relabel` in the !Graph function is not a
 very good name, so perhaps we should change it. What about
 `Poset.relabel(labels="pairs")` by default, and `labels="integers"`
 otherwise ? And we could update the graph function with it. That also
 involves deprecating the old parameter name.

 Nathann

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