public class SparseMatrix extends Object implements Matrix<SparseMatrixRow>
Modifier and Type | Class and Description |
---|---|
class |
SparseMatrix.SparseMatrixIterator |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_HEADER_SIZE |
static int |
FILE_HEADER |
static Logger |
LOG |
Constructor and Description |
---|
SparseMatrix(File path) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
getNumRows()
Returns the number of rows.
|
File |
getPath()
Returns the path to the file that backs the matrix.
|
SparseMatrixRow |
getRow(int rowId)
Gets a particular matrix row.
|
int[] |
getRowIds()
Gets all row ids.
|
ValueConf |
getValueConf() |
Iterator<SparseMatrixRow> |
iterator()
Returns an iterator over matrix rows.
|
long |
lastModified() |
public static final Logger LOG
public static final int DEFAULT_HEADER_SIZE
public static final int FILE_HEADER
public SparseMatrix(File path) throws IOException
IOException
public long lastModified()
public SparseMatrixRow getRow(int rowId) throws IOException
Matrix
getRow
in interface Matrix<SparseMatrixRow>
IOException
public int[] getRowIds()
Matrix
getRowIds
in interface Matrix<SparseMatrixRow>
public int getNumRows()
Matrix
getNumRows
in interface Matrix<SparseMatrixRow>
public ValueConf getValueConf()
public Iterator<SparseMatrixRow> iterator()
Matrix
iterator
in interface Iterable<SparseMatrixRow>
iterator
in interface Matrix<SparseMatrixRow>
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public File getPath()
Matrix
getPath
in interface Matrix<SparseMatrixRow>
Copyright © 2014. All rights reserved.