public class SymmetricMatrix extends DenseMatrix
aij = aji
for all elements.
values
Constructor and Description |
---|
SymmetricMatrix(double[][] values)
Construct with given values, which must be jagged and represent the lower
triangular values
|
SymmetricMatrix(int size)
Construct with given size
|
Modifier and Type | Method and Description |
---|---|
protected void |
assertInvariant() |
int |
columnCount()
Get the number of columns
|
static DenseMatrix |
fromJagged(double[][] values)
Create from jagged low triangular values
|
static DenseMatrix |
fromSquare(double[][] square)
Create from a square matrix
|
double |
get(int row,
int column) |
protected double[][] |
makeValues(int rows,
int columns) |
Vector |
mult(Vector v)
Returns
y = Ax . |
double |
put(int row,
int column,
double value)
Set the value at the given row/column
|
int |
rowCount() |
double[] |
rowwiseMean() |
double[][] |
unwrap() |
add, applyMultiplication, fill, newInstance, rows, used
asArray, asColumnMajorArray, column, columns, dense, density, elementCount, from, getHistogram, indexOf, isSquare, max, mean, min, newInstance, row, sparse, storeSparseOn, storeSparseOn, toString, transposeMultiply, transposeNonTransposeMultiply
public SymmetricMatrix(int size)
size
- public SymmetricMatrix(double[][] values)
values
- protected void assertInvariant() throws IllegalArgumentException
assertInvariant
in class DenseMatrix
IllegalArgumentException
protected double[][] makeValues(int rows, int columns)
makeValues
in class DenseMatrix
public int columnCount()
Matrix
columnCount
in class DenseMatrix
public double get(int row, int column)
get
in class DenseMatrix
public double put(int row, int column, double value)
Matrix
put
in class DenseMatrix
public int rowCount()
rowCount
in class DenseMatrix
public static DenseMatrix fromSquare(double[][] square)
square
- public static DenseMatrix fromJagged(double[][] values)
values
- public double[][] unwrap()
unwrap
in class DenseMatrix
public double[] rowwiseMean()
rowwiseMean
in class Matrix