#18810: Implement specialized is_symmetric method for sparse matrices exploiting
sparsity
------------------------------+----------------------------
Reporter: nthiery | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-6.8
Component: linear algebra | Keywords:
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
------------------------------+----------------------------
Currently sparse matrices use the same `is_symmetric` method as dense
matrices. It's therefore quadratic in the size of the matrix when it
could be linear in the number of non-zero entries:
{{{
sage: m = random_matrix(ZZ, 1000, 1000, density=0.001, sparse=True)
sage: m = m + m.transpose()
sage: %time m.is_symmetric()
CPU times: user 148 ms, sys: 0 ns, total: 148 ms
Wall time: 142 ms
True
sage: m = random_matrix(ZZ, 10000, 10000, density=0.0001, sparse=True)
sage: m = m + m.transpose()
sage: %time m.is_symmetric()
CPU times: user 12.9 s, sys: 0 ns, total: 12.9 s
Wall time: 12.9 s
True
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/18810>
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.