#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 | 01f9e1c6bb502e6044181c856bcb8984718fd237
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by jmantysalo):
Replying to [comment:20 ncohen]:
> Oh right, I had not noticed this 'for/else' problem. If you prefer, you
can also do something like:
>
> {{{
> #!python
> if (all(self.degree_out(l) == len(upper) for l in lower) and
> all(set(self.neighbors_out(l)) != upper for l in lower):
> cut_points.append(e)
> }}}
Is this any more clear? I think that if the code needs clarification,
first step would be adding comments. But at least the basic idea is quite
clearly said in docstring.
If I do
{{{
all(self.degree_out(l) == len(upper) for l in lower)
}}}
then `len(upper)` will be called many times.
--
Ticket URL: <http://trac.sagemath.org/ticket/19659#comment:21>
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.