#12518: Enumerated set from iterator
-----------------------------+----------------------------------------------
Reporter: vdelecroix | Owner: vdelecroix
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.0
Component: combinatorics | Keywords: set, iterator
Work_issues: | Upstream: N/A
Reviewer: PatchBot | Author: Vincent Delecroix
Merged: | Dependencies: #12653
-----------------------------+----------------------------------------------
Changes (by vdelecroix):
* status: needs_work => needs_review
* dependencies: => #12653
Old description:
> Implementation of a set (using the category framework) from a function
> that returns an iterator as in
> {{{
> sage: from sage.sets.set_from_iterator import EnumeratedSetFromIterator
> sage: E = EnumeratedSetFromIterator(graphs)
> {Graph on 0 vertices, Graph on 1 vertex, Graph on 2 vertices, Graph on 2
> vertices, Graph on 3 vertices, Graph on 3 vertices, ...}
> }}}
> Note that in order to be able to pickle, we do not build directly a set
> from an iterator.
>
> A previous implementation in sage-combinat was
> CombinatorialClassFromIterator (in sage.combinat.combinat) which is now
> deprecated.
New description:
Implementation of a set (using the category framework) from a function
that returns an iterator as in
{{{
sage: from sage.sets.set_from_iterator import EnumeratedSetFromIterator
sage: E = EnumeratedSetFromIterator(graphs)
{Graph on 0 vertices, Graph on 1 vertex, Graph on 2 vertices, Graph on 2
vertices, Graph on 3 vertices, Graph on 3 vertices, ...}
}}}
Note that in order to be able to pickle, we do not build directly a set
from an iterator.
A previous implementation in sage-combinat was
CombinatorialClassFromIterator (in sage.combinat.combinat) which is now
deprecated.
The patch depends on #12653 which allows to initialize a graph from a
dictionnary of iterables.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12518#comment:8>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.