#14793: Unique representation for homsets
-------------------------------+--------------------------------------------
Reporter: nthiery | Owner: nthiery
Type: enhancement | Status: new
Priority: major | Milestone: sage-5.12
Component: categories | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Simon King | Merged in:
Dependencies: | Stopgaps:
-------------------------------+--------------------------------------------
Comment (by SimonKing):
Just a crazy idea (brain storm):
We do not want `WithEqualityById` by default, because it makes no sense to
have Homset be a unique parent, if domain and codomain are no unique
parents.
However, if both domain and codomain are unique parents, it *is* a good
idea to use `WithEqualityById`.
So, we could check whether both domain and codomain inherit from
`UniqueRepresentation`. If they do, then they are unique parents, and then
we could create a dynamic class out of `WithEqualityById` and the class of
the homset, and overload the `__class__` of the homset.
In that way, we would automatically have fast homset comparison and hash,
for those parts of sage that use unique representation.
I am running tests with an according patch now...
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14793#comment:4>
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/groups/opt_out.