public final class FileBasedSparseBinaryMatrix extends AbstractMatrix
| Modifier and Type | Class and Description |
|---|---|
static class |
FileBasedSparseBinaryMatrix.BinaryReadOnlyElement |
AbstractMatrix.TransposeViewVectorCOL, columnLabelBindings, columns, ROW, rowLabelBindings, rows| Constructor and Description |
|---|
FileBasedSparseBinaryMatrix(int rows,
int columns)
Constructs an empty matrix of the given size.
|
| Modifier and Type | Method and Description |
|---|---|
Matrix |
assignColumn(int column,
Vector other)
Assign the other vector values to the column of the receiver
|
Matrix |
assignRow(int row,
Vector other)
Assign the other vector values to the row of the receiver
|
double |
getQuick(int rowIndex,
int columnIndex)
Return the value at the given indexes, without checking bounds
|
Matrix |
like()
Return an empty matrix of the same underlying class as the receiver
|
Matrix |
like(int rows,
int columns)
Returns an empty matrix of the same underlying class as the receiver and of the specified
size.
|
void |
setData(File f) |
void |
setQuick(int row,
int column,
double value)
Set the value at the given index, without checking bounds
|
Matrix |
viewPart(int[] offset,
int[] size)
Return a view into part of a matrix.
|
Vector |
viewRow(int rowIndex)
Returns a view of a row.
|
static void |
writeMatrix(File f,
Matrix m) |
aggregate, aggregateColumns, aggregateRows, asFormatString, assign, assign, assign, assign, assign, clone, columnSize, determinant, divide, get, get, getColumnLabelBindings, getFlavor, getNumNondefaultElements, getRowLabelBindings, iterateAll, iterateNonEmpty, iterator, minus, numCols, numRows, numSlices, plus, plus, rowSize, set, set, set, set, set, set, setColumnLabelBindings, setRowLabelBindings, times, times, times, timesSquared, toString, transpose, viewColumn, viewDiagonal, viewPart, zSumpublic FileBasedSparseBinaryMatrix(int rows,
int columns)
rows - The number of rows in the result.columns - The number of columns in the result.public void setData(File f) throws IOException
IOExceptionpublic static void writeMatrix(File f, Matrix m) throws IOException
IOExceptionpublic Matrix assignColumn(int column, Vector other)
column - the int row to assignother - a VectorCardinalityException - if the cardinalities differpublic Matrix assignRow(int row, Vector other)
row - the int row to assignother - a VectorCardinalityException - if the cardinalities differpublic double getQuick(int rowIndex,
int columnIndex)
rowIndex - an int row indexcolumnIndex - an int column indexpublic Matrix like()
public Matrix like(int rows, int columns)
rows - the int number of rowscolumns - the int number of columnspublic void setQuick(int row,
int column,
double value)
row - an int row index into the receivercolumn - an int column index into the receivervalue - a double value to setpublic Matrix viewPart(int[] offset, int[] size)
viewPart in interface MatrixviewPart in class AbstractMatrixoffset - an int[2] offset into the receiversize - the int[2] size of the desired resultCardinalityException - if the length is greater than the cardinality of the receiverIndexException - if the offset is negative or the offset+length is outside of the receiverpublic Vector viewRow(int rowIndex)
viewRow in interface MatrixviewRow in class AbstractMatrixrowIndex - Which row to return.Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.