[Matrix-SIG] A sparse matrix implementation.

Travis Oliphant Oliphant.Travis@mayo.edu
Fri, 3 Sep 1999 11:18:50 -0500 (CDT)


I've got a sparse matrix implementation working based on the SPARSKIT
module by Yousef Saad.  It's available currently only through cvs.  If you
are interested in helping with this project (and have the time) let me
know and I can get access to the cvs server for you or just send you a
copy of the current source code.

If you have a cvs client then run

export CVSROOT=:pserver:anonymous@koer.ioc.ee:/usr/local/cvsroot
 (or use setenv CVSROOT ****** if you run csh)

cvs login  # the password is guest
cvs checkout Sparse

Once you have a version checked out run
cvs update -Pd 
to get the latest version.

(If you have full access then you can modify the files and commit your 
changes using 
cvs commit -m "Some comment"
)

(You can checkout multipack from the same server in the same way if you
want (that is quite large though.))

Organization:

It is a base Python class with a helper extension module to
perform rapid calculations.  The helper module is a wrapping of most of
the SPARSKIT toolbox.

I have toyed with the idea of building a sparse matrix Extension class
which may theoretical improve the speed of some operations and allow
for fast and fancy operations, but I don't know if it is worth the effort 
or not. I'm interested in feedback on this issue.

Currently the internal format is Compressed Sparse Row but the structure
is set up to allow multiple formats.  

Supported so far are matrix addition and subtraction, initialization from
coordinate format, and multiplication of a sparse matrix by a dense
vector.

Since sparse matrices inherently store indices there are a couple of
C-index style versus Fortran-index style questions to work out.  The
SPARSEKIT library is in Fortran and uses that style.  Right now this is
also the internal format of the class.

Check it out if you are interested.

Thanks,

Travis