#19659: Poset: inverse function of ordinal_sum()
-------------------------------------+-------------------------------------
Reporter: jmantysalo | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-7.0
Component: combinatorics | Resolution:
Keywords: poset | Merged in:
Authors: Jori Mäntysalo | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jmantysalo/develop | 4358a5a4574999015ccb9088bdb842dcc738d40c
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by ncohen):
> This is true. But then, what's wrong with having functions at
`hasse_diagram.py`?
I don't believe that a designs that requires you to implement two
functions every time you need one is a docstring. Additionally, the
docstring of the HasseDiagram function that currently appears in this
branch starts with `Return the ordinal decomposition of the poset`. This
method screams that it does not belong there.
> (In general it makes possible to do a little optimization for advanced
users. There is not always need to build poset object, if some filtering
can be done in Hasse diagrams.)
You do not need to build posets even though you are a Poset method.
Because you can access `_hasse_diagram` directly, and because there is no
constraint whastoever on the type of what you should return. You can have
optional arguments to return the result as whatever you want: posets,
digraphs, partitions...
And if the Poset constructor was even remotely sensible you would have no
reason to *fear* the time loss in the poset constructor.
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/19659#comment:14>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.