#14003: Implementation of a rank symmetric test for posets
-----------------------------------+-----------------------------
Reporter: stumpc5 | Owner: sage-combinat
Type: enhancement | Status: new
Priority: major | Milestone: sage-6.4
Component: combinatorics | Resolution:
Keywords: posets | Merged in:
Authors: Christian Stump | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
-----------------------------------+-----------------------------
Comment (by jmantysalo):
Side-note about graded vs. ranked: #16998.
You seems to already have working code. There is of course also many other
ways to do it, for example to start with
{{{
L=P._hasse_diagram._rank_dict.values()
D=dict((i, L.count(i)) for i in L)
}}}
and so on. But if you do not know this to be time-critical, then don't
bother with those. Just write an explanation of what function does and
give some examples and non-examples of rank-symmetric poset. They are the
hardest part with functions like this.
When then function is only defined to some specific type of posets, it
should start with
{{{
if not self.is_graded() or not self.is_connected():
raise ValueError("Rank symmetry is only defined for connected graded
posets.")
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/14003#comment:12>
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.