Class ImportMatrixM

java.lang.Object
org.ujmp.core.io.ImportMatrixM

public abstract class ImportMatrixM extends Object
  • Constructor Details

    • ImportMatrixM

      public ImportMatrixM()
  • Method Details

    • fromString

      public static Matrix fromString(String string, Object... parameters)
      Creates a DefaultDenseStringMatrix2D from a given String. The string contains the rows of the matrix separated by semicolons or new lines. The columns of the matrix are separated by spaces or commas. All types of brackets are ignored.

      Examples: "[1 2 3; 4 5 6]" or "(test1,test2);(test3,test4)"

      Parameters:
      string - the string to parse
      Returns:
      a StringMatrix with the desired values
    • fromFile

      public static Matrix fromFile(File file, Object... parameters) throws IOException
      Throws:
      IOException
    • fromStream

      public static Matrix fromStream(InputStream stream, Object... parameters) throws IOException
      Throws:
      IOException
    • fromReader

      public static Matrix fromReader(Reader reader, Object... parameters) throws IOException
      Throws:
      IOException