public class SymmetricMatrix extends AbstractMatrix implements Serializable
Matrix.Type| Constructor and Description |
|---|
SymmetricMatrix(int rows,
int columns)
Constructs a new
SymmetricMatrix with the specified dimensions. |
| Modifier and Type | Method and Description |
|---|---|
int |
columns()
Returns the number of columns in this
Matrix. |
double |
get(int row,
int column)
Returns the value of the
Matrix at the provided row and column. |
DoubleVector |
getColumnVector(int column)
Returns the column as a vector.
|
DoubleVector |
getRowVector(int row)
Returns a
DoubleVector for an entire row. |
int |
rows()
Returns the number of rows in this
Matrix. |
void |
set(int row,
int column,
double val)
Throws an
UnsupportedOperationException if called (matrix is
unmodifiable). |
equals, getColumn, getRow, hashCode, setColumn, setColumn, setRow, setRow, toDenseArraypublic SymmetricMatrix(int rows,
int columns)
SymmetricMatrix with the specified dimensions.public int columns()
Matrix.columns in interface Matrixcolumns in class AbstractMatrixMatrix.public double get(int row,
int column)
Matrix at the provided row and column.get in interface Matrixget in class AbstractMatrixrow - The row values of the cell to return.column - The column value of the cell to return.row and col.public DoubleVector getColumnVector(int column)
SparseVector instance.getColumnVector in interface MatrixgetColumnVector in class AbstractMatrixcolumn - The column to return a DoubleVector for.DoubleVector representing the column at column.public DoubleVector getRowVector(int row)
DoubleVector for an entire row. Implementations should
return an approriately typed DoubleVector. Whether updates to the vector
are written through to the backing matrix is left open to the specific
implementation. Implementations that maintain their data in a sparse
format are encouraged to return a SparseVector instance.getRowVector in interface MatrixgetRowVector in class AbstractMatrixrow - the index of the row to return.DoubleVector representing the row at row.public int rows()
Matrix.rows in interface Matrixrows in class AbstractMatrixMatrix.public void set(int row,
int column,
double val)
UnsupportedOperationException if called (matrix is
unmodifiable).set in interface Matrixset in class AbstractMatrixrow - The row of the cell to update.column - The column of the cell to update.val - The new value of the specified cell.Copyright © 2012. All Rights Reserved.