Package jgromacs.io
Class IOMath
- java.lang.Object
-
- jgromacs.io.IOMath
-
public class IOMath extends java.lang.Object
This class contains static methods for IO of ArrayList and Matrix objects
-
-
Constructor Summary
Constructors Constructor Description IOMath()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.ArrayList<java.lang.Double>
readArrayListFromFile(java.lang.String filename)
Reads ArrayList from the given filestatic Jama.Matrix
readMatrixFromFile(java.lang.String filename)
Reads Matrix from the given filestatic void
writeArrayListToFile(java.util.ArrayList<java.lang.Double> list, java.lang.String filename)
Writes an ArrayList to the given filestatic void
writeMatrixToFile(Jama.Matrix M, java.lang.String filename)
Writes a Matrix to the given filestatic void
writeScalarToFile(double scalar, java.lang.String filename)
Writes a scalar to the given file
-
-
-
Method Detail
-
readArrayListFromFile
public static java.util.ArrayList<java.lang.Double> readArrayListFromFile(java.lang.String filename) throws java.io.IOException
Reads ArrayList from the given file- Parameters:
filename
- file name- Returns:
- file content as an ArrayList
- Throws:
java.io.IOException
-
readMatrixFromFile
public static Jama.Matrix readMatrixFromFile(java.lang.String filename) throws java.io.IOException
Reads Matrix from the given file- Parameters:
filename
- file name- Returns:
- file content as a Matrix
- Throws:
java.io.IOException
-
writeScalarToFile
public static void writeScalarToFile(double scalar, java.lang.String filename) throws java.io.IOException
Writes a scalar to the given file- Parameters:
scalar
- the scalar valuefilename
- file name- Throws:
java.io.IOException
-
writeArrayListToFile
public static void writeArrayListToFile(java.util.ArrayList<java.lang.Double> list, java.lang.String filename) throws java.io.IOException
Writes an ArrayList to the given file- Parameters:
list
- the ArrayList objectfilename
- file name- Throws:
java.io.IOException
-
writeMatrixToFile
public static void writeMatrixToFile(Jama.Matrix M, java.lang.String filename) throws java.io.IOException
Writes a Matrix to the given file- Parameters:
M
- the Matrix objectfilename
- file name- Throws:
java.io.IOException
-
-