public class SparseRowMatrix extends AbstractMatrix
AbstractMatrix.TransposeViewVectorCOL, columnLabelBindings, columns, ROW, rowLabelBindings, rows| Constructor and Description |
|---|
SparseRowMatrix(int rows,
int columns)
Construct a matrix of the given cardinality, with rows defaulting to RandomAccessSparseVector
implementation
|
SparseRowMatrix(int rows,
int columns,
boolean randomAccess) |
SparseRowMatrix(int rows,
int columns,
Vector[] rowVectors)
Construct a sparse matrix starting with the provided row vectors.
|
SparseRowMatrix(int rows,
int columns,
Vector[] vectors,
boolean shallowCopy,
boolean randomAccess) |
| 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
|
Matrix |
clone()
Return a copy of the recipient
|
MatrixFlavor |
getFlavor()
Get matrix structural flavor (operations performance hints).
|
int[] |
getNumNondefaultElements()
Return the number of values in the recipient
|
double |
getQuick(int row,
int column)
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 |
setQuick(int row,
int column,
double value)
Set the value at the given index, without checking bounds
|
Matrix |
times(Matrix other)
Return a new matrix containing the product of the recipient and the argument
|
Matrix |
transpose()
Return a new matrix that is the transpose of the receiver
|
Matrix |
viewPart(int[] offset,
int[] size)
Return a view into part of a matrix.
|
Vector |
viewRow(int row)
Returns a view of a row.
|
aggregate, aggregateColumns, aggregateRows, asFormatString, assign, assign, assign, assign, assign, columnSize, determinant, divide, get, get, getColumnLabelBindings, getRowLabelBindings, iterateAll, iterateNonEmpty, iterator, minus, numCols, numRows, numSlices, plus, plus, rowSize, set, set, set, set, set, set, setColumnLabelBindings, setRowLabelBindings, times, times, timesSquared, toString, viewColumn, viewDiagonal, viewPart, zSumpublic SparseRowMatrix(int rows,
int columns,
Vector[] rowVectors)
rows - The number of rows in the resultcolumns - The number of columns in the resultrowVectors - a Vector[] array of rowspublic SparseRowMatrix(int rows,
int columns,
boolean randomAccess)
public SparseRowMatrix(int rows,
int columns,
Vector[] vectors,
boolean shallowCopy,
boolean randomAccess)
public SparseRowMatrix(int rows,
int columns)
rows - Number of rows in resultcolumns - Number of columns in resultpublic Matrix clone()
Matrixclone in interface Matrixclone in class AbstractMatrixpublic double getQuick(int row,
int column)
Matrixrow - an int row indexcolumn - an int column indexpublic Matrix like()
Matrixpublic Matrix like(int rows, int columns)
Matrixrows - the int number of rowscolumns - the int number of columnspublic void setQuick(int row,
int column,
double value)
Matrixrow - an int row index into the receivercolumn - an int column index into the receivervalue - a double value to setpublic int[] getNumNondefaultElements()
MatrixgetNumNondefaultElements in interface MatrixgetNumNondefaultElements in class AbstractMatrixpublic Matrix viewPart(int[] offset, int[] size)
MatrixviewPart in interface MatrixviewPart in class AbstractMatrixoffset - an int[2] offset into the receiversize - the int[2] size of the desired resultpublic Matrix assignColumn(int column, Vector other)
Matrixcolumn - the int row to assignother - a Vectorpublic Matrix assignRow(int row, Vector other)
Matrixrow - the int row to assignother - a Vectorpublic Vector viewRow(int row)
AbstractMatrixviewRow in interface MatrixviewRow in class AbstractMatrixrow - an int row indexpublic Matrix transpose()
Matrixtranspose in interface Matrixtranspose in class AbstractMatrixpublic Matrix times(Matrix other)
Matrixtimes in interface Matrixtimes in class AbstractMatrixother - a Matrix argumentpublic MatrixFlavor getFlavor()
MatrixUnsupportedOperationException.getFlavor in interface MatrixgetFlavor in class AbstractMatrixCopyright © 2008–2016 The Apache Software Foundation. All rights reserved.