Class SparseMatrixMatSerializer
java.lang.Object
com.powsybl.math.matrix.serializer.SparseMatrixMatSerializer
Sparse matrix serializer/deserializer using the MATLAB binary format.
This class uses MFL and
EJML libraries.
- Author:
- Christian Biasuzzi <christian.biasuzzi at soft.it>
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
exportMat
(SparseMatrix m, OutputStream oStream) Write a SparseMatrix to a stream, in MATLAB formatstatic void
exportMat
(SparseMatrix m, Path file) Write a SparseMatrix to a MATLAB file.static SparseMatrix
importMat
(InputStream iStream) Read a SparseMatrix from a stream (MATLAB format).static SparseMatrix
Read a SparseMatrix from a MATLAB file.
-
Method Details
-
exportMat
Write a SparseMatrix to a stream, in MATLAB format- Parameters:
m
- The sparse matrixoStream
- The output stream used by the serializer
-
importMat
Read a SparseMatrix from a stream (MATLAB format).- Parameters:
iStream
- The input stream used by the serializer- Returns:
- The sparse matrix read from the input stream
-
exportMat
Write a SparseMatrix to a MATLAB file.- Parameters:
m
- The sparse matrixfile
- The output file used by the serializer
-
importMat
Read a SparseMatrix from a MATLAB file.- Parameters:
file
- The input file used by the serializer- Returns:
- The sparse matrix read from the file
-