#13929: Wrong comparison of sparse
------------------------------+---------------------------------------------
Reporter: tfeulner | Owner: jason, was
Type: defect | Status: new
Priority: major | Milestone: sage-5.6
Component: linear algebra | Keywords: comparison, sparse, free
module
Work issues: | Report Upstream: N/A
Reviewers: | Authors: Thomas Feulner
Merged in: | Dependencies:
Stopgaps: |
------------------------------+---------------------------------------------
The comparison of sparse vectors gives wrong results at the moment:
{{{
sage: V = FreeModule( GF(3), 2, sparse=True)
sage: a = V([0,1])
sage: b = V([1,0])
sage: cmp(a, b)
1 # should be -1, since we are using the lexicographic order
}}}
In particular, this leads to different results when using sparse and dense
vectors at the same time:
{{{
sage: cmp(a.dense_vector(), b)
-1
sage: cmp(a, b.dense_vector())
1
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13929>
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.