octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sparse matrices


From: John W. Eaton
Subject: sparse matrices
Date: Mon, 12 Apr 2004 15:08:55 -0500

I'd like to get sparse matrices into the core Octave sources.

I've looked at the sparse directory in octave-forge, and I think it
would need a lot of work before I would include it as part of Octave.
One big problem I see is that it makes extensive use of malloc and
free, but for something in the core of Octave, it would really be best
to use new and delete, and then only in constructors/destructors, so
that we can avoid memory leaks.

For starters, I would just like to be able to store data in a sparse
format and have some basic operations (assignment, indexing,
arithmetic ops, etc.).  It seems that the SuperLU package provides
some code for these things, but again, I think the implementation
would need a lot of work before it could be included as a part of
Octave.

Does anyone know of some good general-purpose code for handling sparse
matrix storage?

If something like this does not exist, then it seems to me that
writing our own code for it should not be too hard.  The first
question is, what is the best storage scheme to use?  It seems that
something like compressed sparse column format is widely used, but it
does not allow one to add or remove elements efficiently.  It seems
that there must be better ways to manage the storage internally while
we might be adding or removing elements, then we could convert to a
particular storage format when needed to call a solver.

Comments or suggestions?

Thanks,

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]