T
- - the matrix type in the librarypublic interface Matrix<T>
Modifier and Type | Interface and Description |
---|---|
static class |
Matrix.Type
matrix type is named after the library it is in.
|
Modifier and Type | Method and Description |
---|---|
Matrix |
add(Matrix m)
add one matrix to this matrix
|
void |
addToEntry(int row,
int column,
double increment)
add a value to one element in this matrix
|
void |
array2DRowRealMatrix(double[][] d)
initialize this matrix with two-dimensional double array
|
double |
distance(Matrix m)
get the distance between this matrix and another matrix m.it works when
matrix is a vector
|
double |
dotProduct()
get the dot product of this matrix.
|
double |
dotProduct(Matrix m)
get the dot product of this matrix and another matrix m.
|
Matrix |
ebeMultiply(Matrix m)
multiply this matrix with another matrix m element by element
|
boolean |
equals(Matrix m)
check if this matrix equals another matrix m.
|
double[][] |
getData()
get the value of this matrix in the form a two-dimensional double array
|
double |
getEntry(int row,
int column)
get the value of one element in this matrix
|
T |
getInternalMatrix()
get the value of internal matrix of this matrix
|
double |
getNorm()
get the norm of this matrix.
|
double[] |
getRow(int i)
get the value of one row in this matrix in the form of one-dimensional
double array.
|
Matrix |
scalarMultiply(double d)
scalar this matrix with a double value
|
void |
setEntry(int row,
int column,
double value)
set the value of one element in this matrix
|
void |
setInternalMatrix(T internalMatrix)
set the value of internal matrix of this matrix
|
Matrix |
subtract(Matrix m)
subtract one matrix from this matrix
|
Matrix |
transpose()
transpose this matrix
|
void array2DRowRealMatrix(double[][] d)
d
- , a two dimensional double arrayvoid setEntry(int row, int column, double value)
row
- -integer, the row indexcolumn
- -integer, the column indexvalue
- - the value of the element, Double
void addToEntry(int row, int column, double increment)
row
- -integer, the row indexcolumn
- -integer, the column indexincrement
- - Double
,the value added to the elementdouble getEntry(int row, int column)
row
- -integer, the row indexcolumn
- -integer, the column indexDouble
Matrix scalarMultiply(double d)
d
- , scalar value, -Double
Matrix
Matrix ebeMultiply(Matrix m)
double[][] getData()
double[] getRow(int i)
i
- , the row indexdouble dotProduct()
Double
double dotProduct(Matrix m)
m
- to be used for operationDouble
double distance(Matrix m)
m
- -Matrix
Double
double getNorm()
Double
boolean equals(Matrix m)
m
- -Matrix
Boolean
T getInternalMatrix()
void setInternalMatrix(T internalMatrix)
internalMatrix
- , a matrix of the library