Input/output¶
-
enum
FileFormat
¶ -
enumerator
AUTO
¶ Attempt to detect format from filename extension
-
enumerator
ASCII
¶ Simple ASCII text file
-
enumerator
ASCII_MATLAB
¶ MATLAB-ready ASCII text file
-
enumerator
BINARY
¶ Column-major binary file with integer height and width header
-
enumerator
BINARY_FLAT
¶ Column-major binary file with no header data
-
enumerator
BMP
¶ Bitmap image format (requires Qt5)
-
enumerator
MATRIX_MARKET
¶ Matrix Market format
-
enumerator
JPG
¶ JPG image format (requires Qt5)
-
enumerator
JPEG
¶ JPEG image format (requires Qt5)
-
enumerator
PNG
¶ PNG image format (requires Qt5)
-
enumerator
PPM
¶ PPM image format (requires Qt5)
-
enumerator
XBM
¶ XBM image format (requires Qt5)
-
enumerator
XPM
¶ XPM image format (requires Qt5)
-
enumerator
Display¶
-
void
Display
(const DistMatrix<T, U, V> &A, std::string title = "Default")¶ If Qt5 was detected during configuration, display the matrix on screen. Otherwise, print it to the console.
Print¶
-
void
Print
(const DistMatrix<T, U, V> &A, std::string title = "", std::ostream &os = std::cout)¶ Prints the matrix to the console.
Spy¶
-
void
Spy
(const DistMatrix<T, U, V> &A, std::string title = "Default", Base<T> tol = 0)¶ Only available if Qt5 was detected during configuration. A spy plot of the elements with absolute values greater than or equal to
tol
is displayed on screen.
Read¶
-
void
Read
(Matrix<T> &A, std::string filename, FileFormat format = AUTO)¶
-
void
Read
(DistMatrix<T, U, V> &A, std::string filename, FileFormat format = AUTO, bool sequential = false)¶ Read the specified matrix from a file with a supported format. As of now, only the
ASCII
,BINARY
,BINARY_FLAT
andMATRIX_MARKET
formats are supported. In the distributed case, thesequential
flag determines whether or not the data should be read from a single process and then scattered to the other processes as necessary.Note
In the case that a
BINARY_FLAT
file is read, A should already have the correct dimensions.
Write¶
-
void
Write
(const Matrix<T> &A, std::string basename = "matrix", FileFormat format = BINARY, std::string title = "")¶
-
void
Write
(const DistMatrix<T, U, V> &A, std::string basename = "matrix", FileFormat format = BINARY, std::string title = "")¶ The matrix is written to a file (the given basename plus the appropriate extension) in the specified format. Note that Qt5 is required for the image formats.