Package jgromacs.io
Class IOMath
- java.lang.Object
-
- jgromacs.io.IOMath
-
public class IOMath extends java.lang.ObjectThis 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.MatrixreadMatrixFromFile(java.lang.String filename)Reads Matrix from the given filestatic voidwriteArrayListToFile(java.util.ArrayList<java.lang.Double> list, java.lang.String filename)Writes an ArrayList to the given filestatic voidwriteMatrixToFile(Jama.Matrix M, java.lang.String filename)Writes a Matrix to the given filestatic voidwriteScalarToFile(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.IOExceptionReads 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.IOExceptionReads 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.IOExceptionWrites 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.IOExceptionWrites 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.IOExceptionWrites a Matrix to the given file- Parameters:
M- the Matrix objectfilename- file name- Throws:
java.io.IOException
-
-