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