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 Summary

Constructors
Constructor
Description
`IOMath()`

## Method Summary

Modifier and Type
Method
Description
`static ArrayList<Double>`
`readArrayListFromFile(String filename)`
Reads ArrayList from the given file
`static Jama.Matrix`
`readMatrixFromFile(String filename)`
Reads Matrix from the given file
`static void`
`writeArrayListToFile(ArrayList<Double> list, String filename)`
Writes an ArrayList to the given file
`static void`
`writeMatrixToFile(Jama.Matrix M, String filename)`
Writes a Matrix to the given file
`static void`
`writeScalarToFile(double scalar, 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 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`