Fwd: Re: Installing Jama
- Subject: Fwd: Re: Installing Jama
- From: boisvert@nist.gov
- Date: Sat, 10 Jun 2006 18:32:39 -0400
- Content-Transfer-Encoding: 8bit
- Content-Type: text/plain; charset=ISO-8859-1
- User-Agent: Internet Messaging Program (IMP) 3.2.1
Sender: Tim Davis <davis@cise.ufl.edu>
Subject: Re: Installing Jama
There is "never" any reason to convert a sparse matrix to
a full one, in order to operate on it. All of the operations
you mention below are done in sparse form. CSparse, on my
web page and in my upcoming book, has all those operations.
It doesn't take much code, actually, to get O(flops) time
algorithms, and O(nnz(result_of_matrix_op)) memory usage.
This is real code, not just pseudo-code.
MATLAB never converts a sparse matrix to a full one, unless you
ask for it explicitly. For example, svd(S) doesn't work for a
sparse S. You can do svd(full(S)), or svds(S). The latter uses
a different method and doesn't find all the singular values
(by default, at least).
Even sparse-full operations do not convert the sparse matrix
into a full one.
So unless you're doing an SVD, or something related, you should
*never* convert a sparse matrix to a full one. O(n^2) memory
is just far too much.
Thanks,
Tim
Cleve Moler wrote:
> Hi --
>
> Personally, I have no plans to do anything with sparse matrices in Java.
> And, I don't know of anybody else who is doing that either. That
> doesn't mean that no such projects exist, it just means that I don't
> know about them.
>
> Tim Davis at the University of Florida is writing a book on sparse
> matrix computation that will be published by SIAM. You can get a
> preview, including code in C, at http://www.cise.ufl.edu/~davis/. Click
> on CSparse.
>
> -- Cleve
>
>
> -----Original Message-----
> From: jama@nist.gov [mailto:jama@nist.gov] On Behalf Of Sione
> Sent: Friday, June 09, 2006 10:14 AM
> To: Multiple recipients of list
> Subject: Re: Installing Jama
>
> Hello Cleve & List Members,
>
> I have requested a copy of a Java sparse matrix class from Roldan Pozo
>
> of NIST that I have added to JAMA for my own development. My question
> if matrix computations (add, multiply, subtract, divide) can be done in
>
> solely in sparse form or only via a full form. I mean that any sparse
> matrix must always be converted to full form matrix to do such
> computations and if necessary convert it back from full-form into sparse
>
> form just for storage. If matrix computations can be done in sparse
> form, could you please recommend any good book(s) where I can get those
> algorithms (pseudo-codes) ? I see Matlab that the computations is done
>
> via sparse-sparse , sparse-full , full-full. I don't know how Matlab
>
> does it , perhaps it internally converts any sparse to full matrix prior
>
> to computations time.
>
> I was going to post my question to the Numerical Analysis newsletter,
> but I thought that I should post it here first.
>
>
> Thanks,
> Sione.
>
>
>
>
>
----- End forwarded message -----
Date Index |
Thread Index |
Problems or questions? Contact list-master@nist.gov