#18585: Comparison of sparse polynomials
-------------------------------------+-------------------------------------
       Reporter:  bruno              |        Owner:
           Type:  defect             |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.9
      Component:  commutative        |   Resolution:
  algebra                            |    Merged in:
       Keywords:  polynomials        |    Reviewers:  Vincent Delecroix
        Authors:  Bruno Grenet       |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  1726058568171c77880ac9d00684ffc00c0b1492
  u/bruno/compare_sparse_polynomials |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------
Changes (by vdelecroix):

 * status:  needs_review => needs_work
 * reviewer:   => Vincent Delecroix
 * milestone:  sage-6.8 => sage-6.9


Comment:

 Replying to [comment:9 bruno]:
 > Replying to [comment:7 vdelecroix]:
 > I add a question: I noticed after your remark than the method
 `exponents()` could be improved. This is now implemented as
 > {{{#!python
 >         return [c[0] for c in sorted(self.__coeffs.iteritems())]
 > }}}
 > while it would be faster (from my testing) to replace it by
 > {{{#!python
 >         keys = self.__coeffs.keys()
 >         keys.sort()
 >         return keys
 > }}}
 > Is that right to make the change in this ticket (since it is a rather
 minor change) or is it more appropriate to open a new one?

 That's fine with me.

 And could you add a doctest like
 {{{
 sage: Rd = PolynomialRing(ZZ, 'x', sparse=False)
 sage: Rs = PolynomialRing(ZZ, 'x', sparse=True)
 sage: for _ in range(100):
 ....:     pd = Rd.random_element()
 ....:     qd = Rd.random_element()
 ....:     assert cmp(pd,qd) == cmp(Rs(pd), Rs(qd))
 }}}

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