#12923: Comparison of vectors is O(n) even in the simple cases
------------------------------------------+--------------------------------
       Reporter:  hivert                  |        Owner:  jason, was
           Type:  defect                  |       Status:  closed
       Priority:  major                   |    Milestone:  sage-5.3
      Component:  linear algebra          |   Resolution:  fixed
       Keywords:  vector equality days38  |    Merged in:  sage-5.3.beta0
        Authors:  Florent Hivert          |    Reviewers:  Travis Scrimshaw
Report Upstream:  N/A                     |  Work issues:
         Branch:                          |       Commit:
   Dependencies:                          |     Stopgaps:
------------------------------------------+--------------------------------

Comment (by jdemeyer):

 In this patch, you added in several places
 {{{
 #!diff
 +    # __hash__ is not properly inherited if comparison is changed
 +    def __hash__(self):
 +        """
 +        TEST::
 +
 +            sage: w = vector(ZZ, [-1,0,0,0])
 +            sage: w.set_immutable()
 +            sage: isinstance(hash(w), int)
 +            True
 +        """
 +        return free_module_element.FreeModuleElement.__hash__(self)
 }}}

 What's the reason for this? Removing these `__hash__` methods doesn't do
 any harm.

--
Ticket URL: <http://trac.sagemath.org/ticket/12923#comment:9>
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.

Reply via email to