idl.tmt.representation.matrix
Class SparseMatrixReader

java.lang.Object
  |
  +--idl.tmt.representation.matrix.SparseMatrixReader

public class SparseMatrixReader
extends java.lang.Object

Currently the same as the dense matrix reader, only loads into sparse format.

Author:
miles efron

Field Summary
(package private)  int i
           
(package private)  int j
           
(package private)  DoubleMatrix2D matrix
           
 
Constructor Summary
SparseMatrixReader()
           
 
Method Summary
 DoubleMatrix2D readMatrix(java.lang.String theFile)
          read a sparse matrix into memory from disk...again, this is the same as the dense method.
 DoubleMatrix2D readMatrix(java.lang.String theFile, int rows, int cols)
          Load a matrix from a file...this is just the same as the dense loader for now...need to change this.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

matrix

DoubleMatrix2D matrix

i

int i

j

int j
Constructor Detail

SparseMatrixReader

public SparseMatrixReader()
Method Detail

readMatrix

public DoubleMatrix2D readMatrix(java.lang.String theFile,
                                 int rows,
                                 int cols)
Load a matrix from a file...this is just the same as the dense loader for now...need to change this.
Parameters:
theFile - the name of a file on disk with row-oriented matrix
rows - number of rows
cols - number of columns
Returns:
a DoubleMatrix2D mirroring the contents of the file

readMatrix

public DoubleMatrix2D readMatrix(java.lang.String theFile)
read a sparse matrix into memory from disk...again, this is the same as the dense method. this method doesn't require us to specify the number of rows and columns...but we have to read through the file twice
Parameters:
theFile -  
Returns:
a sparse matrix