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