PDL::CCS::IO::MatrixMarket(3pm)

PDL::CCS::IO::MatrixMarket3pm

Matrix market exchange format text i/o for pdl::ccs::nd

Usage

 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

I/O Utilities

ccs_writemm

Write a PDL::CCS::Nd object as a MatrixMarket sparse coordinate text file.

 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.

 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().

 $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().

 $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.

Releases

4 releases since Debian 10 (Buster); the text changed 3 times.

  1. 10
  2. 11
  3. 12
  4. 13

Author

Bryan Jurish <[email protected]>

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.

From libpdl-ccs-perl 1.24.1-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.