#18290: enhanced sets and cartesian products
-------------------------+-------------------------------------------------
Reporter: | Owner:
vdelecroix | Status: needs_review
Type: | Milestone: sage-6.7
enhancement | Resolution:
Priority: major | Merged in:
Component: | Reviewers:
categories | Work issues:
Keywords: | Commit:
cartesian_product | a36b0f2960cc019e6267f47cd4f943788f54d220
Authors: | Stopgaps:
Vincent Delecroix |
Report Upstream: N/A |
Branch: |
public/18290 |
Dependencies: |
-------------------------+-------------------------------------------------
Comment (by nthiery):
I have been through Vincent's last commit. I pushed too minor fixes. I
have only a couple points I am wondering about:
- Do we want to import ZZ in sage.sets.cartesian_product? Can we do a
local import or lazy import? Or is it just ok?
- In `CartesianProduct._cartesian_product_of_elements`, it would be
semantically equivalent to use `zip` rather than `iterator.izip` since we
anyway build a tuple right after. Just curious, is one faster than the
other in practice (it's a tradeoff between building a list for nothing and
using another layer of iterators)?
- Please update the documentation of
`Sets.CartesianProducts.ParentMethods._cartesian_product_of_elements` to
specify that it should accept any iterable.
- _sets_keys(): do we really want an `IntegerRange` rather than a `range`?
I would imagine `IntegerRange` could be faster for containment testing and
slower for iteration, so again a tradeoff.
In any cases, I'll be busy all day and don't have a strong opinion on
either of the above points. So please make the choice you feel right. And
then I consider this as good to go.
Thanks Vincent for all the work!
--
Ticket URL: <http://trac.sagemath.org/ticket/18290#comment:44>
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.