Sparse matrices?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Sparse matrices?

Stef Pillaert BK-2



Hello,

I'm wondering... is it possible in octave to work with sparse matrices to
save some space? (if not, is there a chance that it will be in the near
future?)

Thanks.

Stef [hidden email]





Reply | Threaded
Open this post in threaded view
|

Re: Sparse matrices?

Ian Searle-4
Stef Pillaert BK wrote:

>
> Hello,
>
> I'm wondering... is it possible in octave to work with sparse matrices to
> save some space? (if not, is there a chance that it will be in the near
> future?)
>
> Thanks.
>
> Stef [hidden email]

Having just added sparse matrices to RLaB (no plug intended). I can
offer some information. It is far more difficult and time consuming than
it looks! Seemingly trivial operations like:

  a[i;j] = x;

are difficult to implement... not to mention an efficient
implementation.

I choose compressed row-wise sparse storage. With the aid of hindsight,
I might have choosed compressed column-wise sparse storage.

Then, once sparse structures and operations are implemented comes the
joy of finding an efficient, and free sparse non-symmetric solver, and
graph partitioning/re-ordering packages.

All in all, a considerable amount of work. I was very fortunate that
some users (one in particular) have very good educations in linear
algebra.

Cheers,
--
Ian Searle
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Sparse matrices?

John W. Eaton-6
On 18-Jun-1997, Ian Searle <[hidden email]> wrote:

| Having just added sparse matrices to RLaB (no plug intended). I can
| offer some information. It is far more difficult and time consuming than
| it looks!

I agree that it would not be trivial, especially when it comes to
adding support for sparse matrix factorizations (in the cases where it
makes sense) or adding specializations of other existing functions for
sparse matrix arguments.

I don't have any plans to work on this myself any time soon, but maybe
it would not be too hard to add some basic support for sparse matrices
using Octave's new ability to handle user-defined types along with the
code from the sparse package from netlib (or some other freely
available source).  This may not be the best solution, but it would be
a start.

jwe

Reply | Threaded
Open this post in threaded view
|

Re: Sparse matrices?

U-E59264-Osman Buyukisik-3
I would like to point to another M*tl*b like GPL'd program called
Algae. It has sparse matrix matrix capability. Since it is GPL'd, sources may
be usable in octave.
Osman
P.S. its URL is
http://www.eskimo.com/~ksh/algae/

Reply | Threaded
Open this post in threaded view
|

Re: Sparse matrices?

Ian Searle-4
U-E59264-Osman Buyukisik wrote:
>
> I would like to point to another M*tl*b like GPL'd program called
> Algae. It has sparse matrix matrix capability. Since it is GPL'd, sources may
> be usable in octave.
> Osman
> P.S. its URL is
> http://www.eskimo.com/~ksh/algae/

The Algae author and I work together (don't ask). The code for sparse
matrix operations in both RLab and Algae are similar, if not the same in
some places.  The biggest difference is RLab uses the SuperLU package
for factorization, and Algae uses Boeing Computing Services (BCS) sparse
factorization routines.  The BCS routines are _very_ good performers. I
wish I could use them, but they are not allowed outside Boeing (unless
you have a lot of money, I think Cray and MSC license them).

--
Ian Searle
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Sparse matrices?

John W. Eaton-6
On 18-Jun-1997, Ian Searle <[hidden email]> wrote:

| The biggest difference is RLab uses the SuperLU package
| for factorization, and Algae uses Boeing Computing Services (BCS) sparse
| factorization routines.  The BCS routines are _very_ good performers. I
| wish I could use them, but they are not allowed outside Boeing (unless
| you have a lot of money, I think Cray and MSC license them).

As I understand it, the FSF would consider this to be a violation of
the GPL because the resulting work (Algae + BCS sparse matrix code)
cannot be redistributed under the terms of the GPL.  According to the
FSF, it doesn't matter that the BCS sparse matrix code is not
distributed with Algae and that the user is the one linking them
together.  This is the reason I recently had to remove some functions
from Octave that provided interfaces to proprietary code.

Please, I have no desire to start a flamewar about the GPL,
particularly on this mailing list.  If you want to do that, start a
discussion in the gnu.misc.discuss newsgroup instead.  I don't think
there has been a GPL flame fest there for several months now, so I
suppose we are overdue.  :-/

jwe