public class DenseMatrix extends Matrix
Modifier and Type | Field and Description |
---|---|
protected double[][] |
values |
Constructor and Description |
---|
DenseMatrix(double[][] values)
Construct with the given values
|
DenseMatrix(int rows,
int columns)
Construct with the given size
|
Modifier and Type | Method and Description |
---|---|
double |
add(int row,
int column,
double value)
Add to the value at the given row/column
|
void |
applyMultiplication(double d)
Inline multiplication by a constant
|
protected void |
assertInvariant() |
int |
columnCount()
Get the number of columns
|
void |
fill(double constant)
Fill with a constant
|
double |
get(int row,
int column) |
protected double[][] |
makeValues(int rows,
int columns) |
Matrix |
newInstance(int rows,
int cols) |
double |
put(int row,
int column,
double value)
Set the value at the given row/column
|
int |
rowCount() |
Iterable<Vector> |
rows()
Get an
Iterable over the rows |
double[][] |
unwrap() |
int |
used() |
asArray, asColumnMajorArray, column, columns, dense, density, elementCount, from, getHistogram, indexOf, isSquare, max, mean, min, mult, newInstance, row, rowwiseMean, sparse, storeSparseOn, storeSparseOn, toString, transposeMultiply, transposeNonTransposeMultiply
protected double[][] values
public DenseMatrix(double[][] values)
values
- the valuespublic DenseMatrix(int rows, int columns)
rows
- columns
- protected void assertInvariant() throws IllegalArgumentException
IllegalArgumentException
protected double[][] makeValues(int rows, int columns)
public double add(int row, int column, double value)
Matrix
public int columnCount()
Matrix
columnCount
in class Matrix
public double get(int row, int column)
public double put(int row, int column, double value)
Matrix
public Iterable<Vector> rows()
Matrix
Iterable
over the rowspublic void fill(double constant)
constant
- public void applyMultiplication(double d)
d
- public Matrix newInstance(int rows, int cols)
newInstance
in class Matrix