PDL::CCS::MatrixOps - Low-level matrix operations for compressed storage sparse PDLs
use PDL; use PDL::CCS::MatrixOps; ##--------------------------------------------------------------------- ## ... stuff happens
Signature: ( indx ixa(NdimsA,NnzA); nza(NnzA); missinga(); b(O,M); zc(O); [o]c(O,N) )
Two-dimensional matrix multiplication of a sparse index-encoded PDL $a() with a dense pdl $b(), with output to a dense pdl $c().
The sparse input PDL $a() should be passed here with 0th dimension "M" and 1st dimension "N", just as for the built-in PDL::Primitive::matmult().
"Missing" values in $a() are treated as $missinga(), which shouldn't be BAD or inifinte, but otherwise ought to be handled correctly. The input pdl $zc() is used to pass the cached contribution of a $missinga()-row ("M") to an output column ("O"), i.e.
$zc = ((zeroes($M,1)+$missinga) x $b)->flat;
$SIZE(Ndimsa) is assumed to be 2.
ccs_matmult2d_sdd does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles.
Signature: ( indx ixa(Ndimsa,NnzA); nza(NnzA); b(O,M); [o]c(O,N) )
"Missing" values in $a() are treated as zero. $SIZE(Ndimsa) is assumed to be 2.
ccs_matmult2d_zdd does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles.
Perl by Larry Wall.
PDL by Karl Glazebrook, Tuomas J. Lukka, Christian Soeller, and others.
We should really implement matrix multiplication in terms of inner product, and have a good sparse-matrix only implementation of the former.
Bryan Jurish <moocow@cpan.org>
All other parts Copyright (C) 2009-2013, Bryan Jurish. All rights reserved.
This package is free software, and entirely without warranty. You may redistribute it and/or modify it under the same terms as Perl itself.
perl(1), PDL(3perl)
To install PDL::CCS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PDL::CCS
CPAN shell
perl -MCPAN -e shell install PDL::CCS
For more information on module installation, please visit the detailed CPAN module installation guide.