#13814: LazyFamily.__eq__ gives false positives.
------------------------------------+---------------------------------------
Reporter: cnassau | Owner: sage-combinat
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.6
Component: combinatorics | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Christian Nassau | Merged in:
Dependencies: | Stopgaps:
------------------------------------+---------------------------------------
Comment (by cnassau):
Replying to [comment:5 nthiery]:
> So at this point it seems to me that the best approximation would be
> as follow:
>
> - For comparing two FiniteFamily's, compare the underlying indexing
> set and dictionary for equality (the mapping has already been
> computed on all the indexing set, so we might as well use it, even
> though this comparison will have a cost).
>
> - For comparing other families: test whether the two indexing sets and
> the two mappings compare to equal.
I think this is also how my patch implements this (which does not quite
follow the description in my original submission).
In my patch function equality is tested like this:
* finite family: brute force check of all values
* infinite family: check if function objects are identical
It occured to me that we should also try this:
* comparison of the pickle-string of the function objects
* testing an initial finite slice of the values
I believe functions with the same pickle-representation are guaranteed to
be equal, even if their pickled-function might not be usable (see failure
of U3 doctests in my patch).
> Potential issue: that upon pickling unpickling we get back an equal
> object.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13814#comment:7>
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.