MatrixMarket(3pm)

πŸ“¦
version 1.24.1 Β· 5 versions
, in debian trixie, ubuntu resolute

✨ 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=1 for MatrixMarket compatibility
  • header => $bool β€” write embedded PDL::CCS::Nd header? (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=1 for MatrixMarket compatibility
  • header => $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 (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