in reply to Sparse Matrix Multiplication Problem

If you're doing matrix multiplication yourself, you're doing it wrong. Use PDL::Sparse or another library for that.

(Usually sparse matrices are stored a bit different: for every row and every column there's a linked list of non-zero items together with their indexes, so that walking all non-zero elements is fast, ie following the links).

  • Comment on Re: Sparse Matrix Multiplication Problem

Replies are listed 'Best First'.
Re^2: Sparse Matrix Multiplication Problem
by rg0now (Chaplain) on Jan 27, 2009 at 16:43 UTC
    I'd like to quickly jump in to advocate Math::MatrixSparse, a pure-Perl sparse matrix library. It does just what its name promises. Note, however, that the original code has some annoying bugs, therefore, I maintain a separate version here.

      Maybe you should ask the author for permissions to maintain the official module on CPAN? If you can't reach the author, have a look at the official PAUSE FAQ on this and mail the modules mailing list.

      Cheers,
      Steffen

        Believe me, I have tried everything. I tried to contact the original author several times, asked help at every possible forum, even at comp.lang. perl.modules, etc. This was several years ago. Finally, I gave up. I hope that if someone really needs this module, he or she will make a quick google search and find it on my page. Something really ought to be done about unmaintained modules at CPAN. But I am not the first one saying that, and so far nothing has happened.
Re^2: Sparse Matrix Multiplication Problem
by etj (Priest) on Jun 03, 2022 at 22:39 UTC
    I'd suggest PDL::CCS (collapsed-column storage).