#18290: cardinality and is_finite methods for CartesianProduct
-------------------------------------+-------------------------------------
Reporter: vdelecroix | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.7
Component: categories | Resolution:
Keywords: cartesian_product | Merged in:
Authors: Vincent Delecroix | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/vdelecroix/18290 | 7311911a110c5c3f0c30ab049dbaf66df7e080c7
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Replying to [comment:3 ncohen]:
> HMmmmmmmm `O_o`
>
> I don't know enough about this code to be helpful, but computing the
cardinality of those sets seems to be too much. Isn't there a 'is_empty'
functio in those classes that you could use instead? And you probably
should call `is_empty` before the `is_finite`. Deciding emptyness is
probably easier than deciding if it is finite?... Or perhaps not, in some
weird cases? `^^;;`
I would love to have an `is_empty`... What do you think to add it in the
sets category (and set the default implementation to be `return not
self.cardinality()`?). The code in this branch would be much cleaner with
that.
--
Ticket URL: <http://trac.sagemath.org/ticket/18290#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/d/optout.