public class DenseMatrix extends Object implements Matrix
1.0 2.0
3.0 4.0
5.0 6.0
is stored as [1.0, 3.0, 5.0, 2.0, 4.0, 6.0]
.
Constructor and Description |
---|
DenseMatrix(int numRows,
int numCols,
double[] values) |
Modifier and Type | Method and Description |
---|---|
double |
apply(int i) |
double |
apply(int i,
int j)
Gets the (i, j)-th element.
|
DenseMatrix |
copy()
Get a deep copy of the matrix.
|
boolean |
equals(Object o) |
int |
index(int i,
int j)
Return the index for the (i, j)-th element in the backing array.
|
int |
numCols()
Number of columns.
|
int |
numRows()
Number of rows.
|
double[] |
toArray()
Converts to a dense array in column major.
|
breeze.linalg.Matrix<Object> |
toBreeze()
Converts to a breeze matrix.
|
void |
update(int i,
int j,
double v)
Update element at (i, j)
|
double[] |
values() |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
multiply, multiply, toString, transposeMultiply, transposeMultiply
public int numRows()
Matrix
public int numCols()
Matrix
public double[] values()
public double[] toArray()
Matrix
public boolean equals(Object o)
equals
in class Object
public breeze.linalg.Matrix<Object> toBreeze()
Matrix
public double apply(int i)
public double apply(int i, int j)
Matrix
public int index(int i, int j)
Matrix
public void update(int i, int j, double v)
Matrix
public DenseMatrix copy()
Matrix