Le 30/04/2010 18:54, Robert Bradshaw a écrit :
Osage: m = matrix(RDF, 5, sparse=True) sage: type(m) <type 'sage.matrix.matrix_generic_sparse.Matrix_generic_sparse'> So it's our completely generic sparse implementation, stored as a dictionary of non-zero entries. http://hg.sagemath.org/sage-main/file/e2ccb846f296/sage/matrix/matrix_generic_sparse.pyx#l1If it is possible for sage to build automatically csc or csr matrices, then using sparse solvers is trivial. Otherwise I think it is necessary to build Scipy matrices (lil matrices converted to csr or csc format).We don't have support for that, but it would probably be a nice thing to have.
Ok... may be it is not too complicated to implement: I currently transform C++ maps (i,j)-> value to csr format in my C++ codes; it is a program of 10 lines. I could look at this (when I'll have time to do that).
What would be the best (if possible):
- a conversion by hand:
Q=matrix(RDF,100000,sparse=True)
....
A=Q.csr() or A=csr(Q)
-or try to make it automatically?
That is to say, when calling a solve method (which will possibly call
SuperLu, which needs csr storage) on Q, create the csr storage
representation of Q?
Yours t.
- Robert
-- 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-support URL: http://www.sagemath.org
<<attachment: tdumont.vcf>>
