MatrixMarket(3pm)
β¨ NAME β¨
PDL::CCS::IO::MatrixMarket β it's giving Matrix Market Exchange Format text I/O for PDL::CCS::Nd, bestie π this is the page for MatrixMarket(3pm) and she EATS.
π SYNOPSIS π
okay so first you gotta load the goods:
use PDL;
use PDL::CCS::Nd;
use PDL::CCS::IO::MatrixMarket;
$ccs = PDL::CCS::Nd->newFromWhich($which,$nzvals);
ccs_writemm($ccs,"ccs.mm"); # write a sparse matrix market text file
$ccs2 = ccs_readmm("ccs.mm"); # read a sparse matrix market text file
$dense = random(10,10); # ... also supported for dense piddles
writemm($dense, "file.mm"); # write a dense matrix market text file
$dense2 = readmm("file.mm"); # read a dense matrix market text file
and that's the whole vibe check π sparse AND dense, she does both, no cap.
πΈ I/O Utilities πΈ
π ccs_writemm
Write a PDL::CCS::Nd object as a MatrixMarket sparse coordinate text file. slay.
ccs_writemm($ccs,$filename_or_fh)
ccs_writemm($ccs,$filename_or_fh,\%opts)
Options %opts:
start => $iβ index of first element (like perl$[); default=1for MatrixMarket compatibilityheader => $boolβ write embeddedPDL::CCS::Ndheader? (default=do)
β¨ writemm
Write a dense PDL as a MatrixMarket array text file. iconic.
writemm($pdl,$filename_or_handle)
writemm($pdl,$filename_or_handle,\%opts)
Options %opts: (none yet) π
π¦ ccs_readmm
Read a Matrix Market sparse coordinate text file as a PDL::CCS::Nd object using PDL::IO::Misc::rcols(). the way she justβ¦ reads it for you π
$ccs = ccs_readmm($filename_or_fh)
$ccs = ccs_readmm($filename_or_fh,\%opts)
Options %opts:
start => $iβ index of first element (like perl$[); default=1for MatrixMarket compatibilityheader => $boolβ attempt to read embedded CCS header from file (default=do)sorted => $boolβ assume input data is sorted (default=0)nomagic => $boolβ don't check for matrix market magic header (default:do)
π readmm
Read a Matrix Market dense array text file as a dense pdl using PDL::IO::Misc::rcols(). obsessed fr fr.
$pdl = readmm($fname)
$pdl = readmm($fname,\%opts)
Options %opts:
nomagic => $boolβ don't check for matrix market magic header (default:do)
π ACKNOWLEDGEMENTS π
- Perl by Larry Wall. π
- PDL by Karl Glazebrook, Tuomas J. Lukka, Christian Soeller, and others.
π AUTHOR π
Bryan Jurish <moocow@cpan.org> π«Ά
π Copyright Policy π
Copyright (C) 2015-2024, 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.
ngl "entirely without warranty" is doing a LOT of heavy lifting there but okay periodt π
π₯ SEE ALSO π₯
perl, PDL, PDL::CCS::Nd, PDL::CCS::IO::FastRaw, PDL::CCS::IO::FITS, PDL::CCS::IO::LDAC, the matrix market format documentation at <http://math.nist.gov/MatrixMarket/formats.html> ...
and that's the whole page bestie π this was perl v5.40.0, dated 2025-01-04, living under the name MatrixMarket(3pm) β go read some matrices, you got this β¨π¦π
π¦ where this page comes from
- debian trixie: libpdl-ccs-perl 1.24.1-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpdl-ccs-perl 1.24.1-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms