#15322: Testing for antichains and chains in arbitrary posets
------------------------------------------------+--------------------------
Reporter: darij | Owner:
Type: enhancement | Status:
Priority: major | needs_review
Component: combinatorics | Milestone: sage-5.13
Keywords: posets, combinat, categories | Resolution:
Authors: Darij Grinberg | Merged in:
Report Upstream: N/A | Reviewers:
Branch: | Work issues:
Dependencies: #15283 | Commit:
| Stopgaps:
------------------------------------------------+--------------------------
Comment (by ncohen):
Hellooooooooo !!
> very good observation about the docstring indicating `lt` instead of
`le`. I've changed this now (in the ordered version; the unordered one is
right because it only refers to the set). Also I've added a comment on
`_element_to_vertex` and added your improvement to the antichain code.
Thaaaaaaaanks !
> I don't understand the issue with calling `compare_elements` (what file
is that in?) and anyway the `compare_elements` method seems to exist only
for finite posets.
Indeed, indeed. Well, I just typed
{{{
sage: P = Poset(); P.compare_elements
}}}
And the problem is that when you just want to know `Poset.lt(x,y)` it also
computes `Poset.gt(x,y)` and though I'm totally willing to think of how
graphs could be improved so that Posets get faster, if the Poset code is
that not-optimized I'm just working for nothing. I'll write a patch for
that.
> I have not merged the two `is_chain_of_poset` methods so far because
IMHO using overshadowing by inheritance is nicer than `getattr` (and
probably faster?).
Hmmmmm... Okay. It's just that the docstring is 99% of that function's
code, and that it ends up being copied as a result.
I'll go check my pasta then give your new patch a final look !
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/15322#comment:6>
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/groups/opt_out.