comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Sparse Matrix Routines
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Sparse Matrix Routines [message #40110] Thu, 22 July 2004 02:27 Go to next message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
On Tue, 20 Jul 2004 15:55:48 -0700, Marius wrote:

> IDL has a suite of sparse matrix routines based on those in Numerical
> Recipes in C, which optimize the algorithms for highly diagonal
> matrices (so that they store the diagonal elements separately from the
> rest of the nonzero elements). In the code I am currently working on,
> however, I have large rectangular matrices (of about 10^14 elements)
> which are extremely sparse (about 10^5 nonzero elements) and which are
> nothing like diagonal. I would much prefer to work with a set of
> sparse routines better suited to the problem (perhaps something simple
> such as storing the entire matrix as two vectors, one giving the
> nonzero values and the other giving the index locations) than use
> these standard routines, if at all possible.
>
> Does anyone know of any code (in IDL or in any other language) that
> uses such a simple storage scheme or one which is better suited to
> nondiagonal matrices? I'd be happy to hear of any ideas, and thanks in
> advance.
>

I think that's the way that MATLAB stores sparse matrices. I've never used
them, but I seem to remember from writing code to read the MATLAB data
files that sparse matrices were stored in two arrays, one of data and the
other of indices. Whether MATLAB is in any way optimised for any
particular type of sparse matrix I could not say.

Also, you might want to look into whether the sparse matrix extensions
for Python/SciPy/Numerical Python are of any use.

--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
Re: Sparse Matrix Routines [message #40129 is a reply to message #40110] Wed, 21 July 2004 07:50 Go to previous messageGo to next message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <60b977.0407201455.187d57cb@posting.google.com>,
nhagen@optics.arizona.edu (Marius) wrote:

> Does anyone know of any code (in IDL or in any other language) that
> uses such a simple storage scheme or one which is better suited to
> nondiagonal matrices? I'd be happy to hear of any ideas, and thanks in
> advance.
>
> - Marius Hagen

Googling on "sparse matrix library" turned up a lot of potentially
useful hits (Java, C, C++, etc.) including this list of libraries

http://www.scicomp.uni-erlangen.de/SW/linalg.html

Ken Bowman
Re: Sparse Matrix Routines [message #40219 is a reply to message #40110] Mon, 26 July 2004 14:16 Go to previous message
nhagen is currently offline  nhagen
Messages: 3
Registered: February 2004
Junior Member
Nigel Wade <nmw@ion.le.ac.uk> wrote:
> I think that's the way that MATLAB stores sparse matrices. I've never used
> them, but I seem to remember from writing code to read the MATLAB data
> files that sparse matrices were stored in two arrays, one of data and the
> other of indices. Whether MATLAB is in any way optimised for any
> particular type of sparse matrix I could not say.
>
> Also, you might want to look into whether the sparse matrix extensions
> for Python/SciPy/Numerical Python are of any use.

Thanks (to both responders) for pointing in a helpful direction. I've
located two sparse matrix libraries (SparseLib++ and
SparseMatrixToolkit) which provide some of the ideas I'm looking for.
As you mentioned, Matlab seems to provide a very straightforward
sparse matrix storage scheme much like I'm looking for, so I'm going
to look into whether they provide any information on the low-level
coding of their sparse matrix routines....

- Marius
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: ActiveX parameter by reference
Next Topic: Re: Arnold Schwarzenegger Commits Suicide

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:13:52 PDT 2025

Total time taken to generate the page: 0.00471 seconds