#19016: Better hash for Element
-------------------------------------+-------------------------------------
Reporter: ncohen | Owner:
Type: defect | Status: needs_work
Priority: critical | Milestone: sage-6.10
Component: misc | Resolution:
Keywords: | Merged in:
Authors: Nils Bruin, | Reviewers:
Vincent Delecroix | Work issues:
Report Upstream: N/A | Commit:
Branch: public/19016-bis | fcf799ce33270401e9dce7bfcf4f383dbcedc49d
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Replying to [comment:103 nbruin]:
> Replying to [comment:102 jdemeyer]:
> > This seems like an argument for ''not'' adding the 0 hash to
`Ideal_generic` then.
>
> I agree with that. Furthermore, I think we can remove the 0 hash on
`Ideal_generic` without affecting doctests, so I'd say we should. Let's
see what Vincent's opinion is.
If it works without hash, let us go without of course!
> > By the way, a small improvement might be to take the hash of the
parent instead of a constant zero.
>
> Given that the only possibly legitimate use would be to put ideals from
the same ring together, I don't think that would be an actual improvement.
I'd say that 0 would reflect more properly that the hash is worthless. I
also think we should back up each 0 hash with a ticket to either devise a
proper hash function or make these unhashable.
I actually used some, for example in `crystals/elementary_crystals.py`.
But I tend to agree with Nils that in most cases, this will be useless (or
badly used).
--
Ticket URL: <http://trac.sagemath.org/ticket/19016#comment:104>
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.