org.ujmp.core.io
Class ImportMatrixM
- java.lang.Object
-
- org.ujmp.core.io.ImportMatrixM
-
public abstract class ImportMatrixM extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description ImportMatrixM()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static MatrixfromFile(java.io.File file, java.lang.Object... parameters)static MatrixfromReader(java.io.Reader reader, java.lang.Object... parameters)static MatrixfromStream(java.io.InputStream stream, java.lang.Object... parameters)static MatrixfromString(java.lang.String string, java.lang.Object... parameters)Creates a DefaultDenseStringMatrix2D from a given String.
-
-
-
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
-
-
DataMelt 3.0 © DataMelt by jWork.ORG