Package jgromacs.io

Class IOMath

java.lang.Object
jgromacs.io.IOMath

public class IOMath extends Object
This class contains static methods for IO of ArrayList and Matrix objects
  • Constructor Details

    • IOMath

      public IOMath()
  • Method Details

    • readArrayListFromFile

      public static ArrayList<Double> readArrayListFromFile(String filename) throws IOException
      Reads ArrayList from the given file
      Parameters:
      filename - file name
      Returns:
      file content as an ArrayList
      Throws:
      IOException
    • readMatrixFromFile

      public static Jama.Matrix readMatrixFromFile(String filename) throws IOException
      Reads Matrix from the given file
      Parameters:
      filename - file name
      Returns:
      file content as a Matrix
      Throws:
      IOException
    • writeScalarToFile

      public static void writeScalarToFile(double scalar, String filename) throws IOException
      Writes a scalar to the given file
      Parameters:
      scalar - the scalar value
      filename - file name
      Throws:
      IOException
    • writeArrayListToFile

      public static void writeArrayListToFile(ArrayList<Double> list, String filename) throws IOException
      Writes an ArrayList to the given file
      Parameters:
      list - the ArrayList object
      filename - file name
      Throws:
      IOException
    • writeMatrixToFile

      public static void writeMatrixToFile(Jama.Matrix M, String filename) throws IOException
      Writes a Matrix to the given file
      Parameters:
      M - the Matrix object
      filename - file name
      Throws:
      IOException