mdsj
Class IO
public class IO
extends java.lang.Object
Functionality for reading and writing files.
Provides functionality for reading and writing data matrices
from files and to files or the standard output.
static double[][] | read(String filename) - Reads a data matrix from a file into a two-dimensional array.
|
static void | write(double[][] data, String filename) - Writes a data matrix to a file.
|
static void | writeStandardOut(double[][] data) - Writes a data matrix to a the standard output
|
read
public static double[][] read(String filename)
throws Exception
Reads a data matrix from a file into a two-dimensional array.
filename
- path to the input data matrix
- data matrix as a two-dimensional array
write
public static void write(double[][] data,
String filename)
throws Exception
Writes a data matrix to a file.
data
- data matrix to be writtenfilename
- path to the output file
writeStandardOut
public static void writeStandardOut(double[][] data)
throws Exception
Writes a data matrix to a the standard output
data
- data matrix to be written