Package jgromacs.io

Class 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 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

        clone, equals, finalize, 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