Class SparseMatrixMatSerializer

java.lang.Object
com.powsybl.math.matrix.serializer.SparseMatrixMatSerializer

public final class SparseMatrixMatSerializer extends Object
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 Details

    • exportMat

      public static void exportMat(SparseMatrix m, OutputStream oStream)
      Write a SparseMatrix to a stream, in MATLAB format
      Parameters:
      m - The sparse matrix
      oStream - The output stream used by the serializer
    • importMat

      public static SparseMatrix importMat(InputStream iStream)
      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

      public static void exportMat(SparseMatrix m, Path file)
      Write a SparseMatrix to a MATLAB file.
      Parameters:
      m - The sparse matrix
      file - The output file used by the serializer
    • importMat

      public static SparseMatrix importMat(Path file)
      Read a SparseMatrix from a MATLAB file.
      Parameters:
      file - The input file used by the serializer
      Returns:
      The sparse matrix read from the file