org.ejml.ops
Class MatrixIO

java.lang.Object
  extended by org.ejml.ops.MatrixIO

public class MatrixIO
extends Object

Author:
Peter Abeles

Constructor Summary
MatrixIO()
           
 
Method Summary
static DenseMatrix64F loadCSV(String fileName)
          Reads a matrix in which has been encoded using a Column Space Value (CSV) file format.
static DenseMatrix64F loadCSV(String fileName, int numRows, int numCols)
          Reads a matrix in which has been encoded using a Column Space Value (CSV) file format.
static
<T extends Matrix64F>
T
loadXML(String fileName)
          Loads a DeneMatrix64F which has been saved to file using Java binary serialization.
static void print(PrintStream out, Matrix64F mat)
           
static void print(PrintStream out, Matrix64F mat, int numChar, int precision)
           
static void print(PrintStream out, Matrix64F mat, String format)
           
static void print(PrintStream out, Matrix64F mat, String format, int row0, int row1, int col0, int col1)
           
static void saveCSV(Matrix64F A, String fileName)
          Saves a matrix to disk using in a Column Space Value (CSV) format.
static void saveXML(Matrix64F A, String fileName)
          Saves a matrix to disk using Java binary serialization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatrixIO

public MatrixIO()
Method Detail

saveXML

public static void saveXML(Matrix64F A,
                           String fileName)
                    throws IOException
Saves a matrix to disk using Java binary serialization.

Parameters:
A - The matrix being saved.
fileName - Name of the file its being saved at.
Throws:
IOException

loadXML

public static <T extends Matrix64F> T loadXML(String fileName)
                                   throws IOException
Loads a DeneMatrix64F which has been saved to file using Java binary serialization.

Parameters:
fileName - The file being loaded.
Returns:
DenseMatrix64F
Throws:
IOException

saveCSV

public static void saveCSV(Matrix64F A,
                           String fileName)
                    throws IOException
Saves a matrix to disk using in a Column Space Value (CSV) format.

Parameters:
A - The matrix being saved.
fileName - Name of the file its being saved at.
Throws:
IOException

loadCSV

public static DenseMatrix64F loadCSV(String fileName)
                              throws IOException
Reads a matrix in which has been encoded using a Column Space Value (CSV) file format. The number of rows and columns are read in on the first line.

Parameters:
fileName - The file being loaded.
Returns:
DenseMatrix64F
Throws:
IOException

loadCSV

public static DenseMatrix64F loadCSV(String fileName,
                                     int numRows,
                                     int numCols)
                              throws IOException
Reads a matrix in which has been encoded using a Column Space Value (CSV) file format. The matrix's dimension is specified in function parameters.

Parameters:
fileName - The file being loaded.
numRows - number of rows in the matrix.
numCols - number of columns in the matrix.
Returns:
DenseMatrix64F
Throws:
IOException

print

public static void print(PrintStream out,
                         Matrix64F mat)

print

public static void print(PrintStream out,
                         Matrix64F mat,
                         int numChar,
                         int precision)

print

public static void print(PrintStream out,
                         Matrix64F mat,
                         String format)

print

public static void print(PrintStream out,
                         Matrix64F mat,
                         String format,
                         int row0,
                         int row1,
                         int col0,
                         int col1)


Copyright © 2011. All Rights Reserved.