public class JamaDenseMatrix extends Matrix
Modifier and Type | Field and Description |
---|---|
Jama.Matrix |
matrix
The underlying matrix
|
Constructor and Description |
---|
JamaDenseMatrix(double[][] values)
Construct with 2d array of data.
|
JamaDenseMatrix(int rows,
int columns)
Construct with given dimensions.
|
JamaDenseMatrix(Jama.Matrix matrix)
Construct with matrix.
|
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)
Multiply all elements by a constant.
|
double[][] |
asArray()
Get the matrix data as a 2D dense array
|
protected void |
assertInvariant() |
int |
columnCount()
Get the number of columns
|
void |
fill(double constant)
Fill the elements with a constant value.
|
double |
get(int row,
int column) |
Jama.Matrix |
getMatrix() |
Matrix |
newInstance(int rows,
int cols) |
double |
put(int row,
int column,
double value)
Set the value at the given row/column
|
int |
rowCount() |
double[][] |
unwrap() |
int |
used() |
asColumnMajorArray, column, columns, dense, density, elementCount, from, getHistogram, indexOf, isSquare, max, mean, min, mult, newInstance, row, rows, rowwiseMean, sparse, storeSparseOn, storeSparseOn, toString, transposeMultiply, transposeNonTransposeMultiply
public Jama.Matrix matrix
public JamaDenseMatrix(Jama.Matrix matrix)
matrix
- The matrix.public JamaDenseMatrix(double[][] values)
values
- The data.public JamaDenseMatrix(int rows, int columns)
rows
- number of rows.columns
- number of columns.protected void assertInvariant() throws IllegalArgumentException
IllegalArgumentException
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 void fill(double constant)
constant
- the value to set the elements to.public void applyMultiplication(double d)
d
- the multiplication factor.public Jama.Matrix getMatrix()
public double[][] asArray()
Matrix
public Matrix newInstance(int rows, int cols)
newInstance
in class Matrix