#19024: Posets: Faster order filter and ideal
-------------------------------------+-------------------------------------
Reporter: jmantysalo | Owner:
Type: enhancement | Status: needs_work
Priority: minor | Milestone: sage-6.9
Component: combinatorics | Resolution:
Keywords: poset | Merged in:
Authors: Jori Mäntysalo | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jmantysalo/posets__faster_order_filter_and_ideal|
4bdb98696316efb33158cd00cd770e8a41889888
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by jmantysalo):
* status: needs_review => needs_work
Comment:
Replying to [comment:4 ncohen]:
> I do not know about the difference between those two writings. If there
is a difference, I would expect it to be marginal, possibly in favor of
'list' indeed. That would not worry me.
OK. So, which one is easier to read?
> > And `[z for z in range(self.order())[x:y+1]` seems odd too.
>
> That's ridiculous indeed.
So, I'll mark this as needs_work and modify at least that.
> About the two functions you touch: why do you insist on *sorting* the
elements? This does not seem to be necessary.
I can't see any reason for that, but that is what is was before. Sorting
was kind of hidden inside `uniq`, which gives sorted output when input
consist of only `int`s.
> Also: reversing the *whole diagram* only to run a BFS is clearly
wasteful. Use the `neighbors` argument to the `breadth_first_search`
function, and give it `neighbors_in`. Should be much better.
Ah, OK. I was thinking that the digraph is actually saved as two list, and
they are intenally just swapped. I'll do that too.
--
Ticket URL: <http://trac.sagemath.org/ticket/19024#comment:5>
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.