.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "MatrixMarket 3pm" .TH MatrixMarket 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME PDL::CCS::IO::MatrixMarket \- Matrix Market Exchange Format text I/O for PDL::CCS::Nd .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 3 \& 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 .Ve .SH "I/O Utilities" .IX Header "I/O Utilities" .SS ccs_writemm .IX Subsection "ccs_writemm" Write a PDL::CCS::Nd object as a MatrixMarket sparse coordinate text file. .PP .Vb 2 \& ccs_writemm($ccs,$filename_or_fh) \& ccs_writemm($ccs,$filename_or_fh,\e%opts) .Ve .PP Options \f(CW%opts:\fR .PP .Vb 2 \& start => $i, ##\-\- index of first element (like perl $[); default=1 for MatrixMarket compatibility \& header => $bool, ##\-\- write embedded PDL::CCS::Nd header? (default=do) .Ve .SS writemm .IX Subsection "writemm" Write a dense PDL as a MatrixMarket array text file. .PP .Vb 2 \& writemm($pdl,$filename_or_handle) \& writemm($pdl,$filename_or_handle,\e%opts) .Ve .PP Options \f(CW%opts:\fR (none yet) .SS ccs_readmm .IX Subsection "ccs_readmm" Read a Matrix Market sparse coordinate text file as a PDL::CCS::Nd object using \fBPDL::IO::Misc::rcols()\fR. .PP .Vb 2 \& $ccs = ccs_readmm($filename_or_fh) \& $ccs = ccs_readmm($filename_or_fh,\e%opts) .Ve .PP Options \f(CW%opts:\fR .PP .Vb 4 \& 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\*(Aqt check for matrix market magic header (default:do) .Ve .SS readmm .IX Subsection "readmm" Read a Matrix Market dense array text file as a dense pdl using \fBPDL::IO::Misc::rcols()\fR. .PP .Vb 2 \& $pdl = readmm($fname) \& $pdl = readmm($fname,\e%opts) .Ve .PP Options \f(CW%opts:\fR .PP .Vb 1 \& nomagic => $bool, ##\-\- don\*(Aqt check for matrix market magic header (default:do) .Ve .SH ACKNOWLEDGEMENTS .IX Header "ACKNOWLEDGEMENTS" Perl by Larry Wall. .PP PDL by Karl Glazebrook, Tuomas J. Lukka, Christian Soeller, and others. .SH AUTHOR .IX Header "AUTHOR" Bryan Jurish .SS "Copyright Policy" .IX Subsection "Copyright Policy" Copyright (C) 2015\-2022, Bryan Jurish. All rights reserved. .PP This package is free software, and entirely without warranty. You may redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "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 \&...