Class ImportMatrixM


  • public abstract class ImportMatrixM
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ImportMatrixM()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Matrix fromFile​(java.io.File file, java.lang.Object... parameters)  
      static Matrix fromReader​(java.io.Reader reader, java.lang.Object... parameters)  
      static Matrix fromStream​(java.io.InputStream stream, java.lang.Object... parameters)  
      static Matrix fromString​(java.lang.String string, java.lang.Object... parameters)
      Creates a DefaultDenseStringMatrix2D from a given String.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ImportMatrixM

        public ImportMatrixM()
    • Method Detail

      • fromString

        public static Matrix fromString​(java.lang.String string,
                                        java.lang.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​(java.io.File file,
                                      java.lang.Object... parameters)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • fromStream

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

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