jgromacs.io
Class IOMath

java.lang.Object
  extended by jgromacs.io.IOMath

public class IOMath
extends java.lang.Object

This class contains static methods for IO of ArrayList and Matrix objects


Constructor Summary
IOMath()
           
 
Method Summary
static java.util.ArrayList<java.lang.Double> readArrayListFromFile(java.lang.String filename)
          Reads ArrayList from the given file
static jama.Matrix readMatrixFromFile(java.lang.String filename)
          Reads Matrix from the given file
static void writeArrayListToFile(java.util.ArrayList<java.lang.Double> list, java.lang.String filename)
          Writes an ArrayList to the given file
static void writeMatrixToFile(jama.Matrix M, java.lang.String filename)
          Writes a Matrix to the given file
static void writeScalarToFile(double scalar, java.lang.String filename)
          Writes a scalar to the given file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IOMath

public IOMath()
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 value
filename - 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 object
filename - 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 object
filename - file name
Throws:
java.io.IOException