#5402: Sparse determinants are slow
---------------------------------------+------------------------------------
Reporter: jbandlow | Owner: was
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.6
Component: linear algebra | Resolution:
Keywords: determinant | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Charles Bouillaguet | Merged in:
Dependencies: | Stopgaps:
---------------------------------------+------------------------------------
Comment (by Bouillaguet):
There is an example of caching (the one I just mimicked...) in
matrix_sparse.pyx in the definition of charpoly().
I checked that caching works by computing a large sparse determinant twice
: the first call takes a few seconds, while the second call returns
instantly.
For the sake of easy reviewing :-) here is the code of charpoly() :
{{{
#!python
def charpoly(self, var='x', **kwds):
f = self.fetch('charpoly')
if f is not None:
return f.change_variable_name(var)
f = self.dense_matrix().charpoly(var=var, **kwds)
self.cache('charpoly', f)
return f
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5402#comment:11>
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.