public interface DenseMatrix extends Matrix, MatrixMultiplication<DenseMatrix,DenseMatrix>
| Modifier and Type | Method and Description |
|---|---|
DenseMatrix |
aat()
Returns A * A'
|
default DenseMatrix |
add(DenseMatrix b)
In place addition A = A + B
|
default DenseMatrix |
add(DenseMatrix b,
DenseMatrix c)
C = A + B
|
default DenseMatrix |
add(double x)
In place element-wise addition A = A + x
|
default DenseMatrix |
add(double x,
DenseMatrix c)
Element-wise addition C = A + x
|
double |
add(int i,
int j,
double x)
A[i][j] += x
|
default double[][] |
array()
Return the two-dimensional array of matrix.
|
DenseMatrix |
ata()
Returns A' * A
|
Cholesky |
cholesky()
Returns the Cholesky decomposition.
|
default Cholesky |
cholesky(boolean inPlace)
Returns the Cholesky decomposition.
|
default double[] |
colMeans()
Returns the mean of each column for a matrix.
|
default double[] |
colSums()
Returns the sum of each column for a matrix.
|
DenseMatrix |
copy()
Returns a copy of this matrix.
|
double[] |
data()
Returns the array of storing the matrix.
|
default DenseMatrix |
div(DenseMatrix b)
In place element-wise division A = A / B
A = A - B
|
default DenseMatrix |
div(DenseMatrix b,
DenseMatrix c)
C = A / B
|
default DenseMatrix |
div(double x)
In place element-wise division A = A / x
|
default DenseMatrix |
div(double x,
DenseMatrix c)
Element-wise addition C = A / x
|
double |
div(int i,
int j,
double x)
A[i][j] /= x
|
double[] |
eig()
Returns the eigen values in an array of size 2N.
|
default double[] |
eig(boolean inPlace)
Returns the eigen values in an array of size 2N.
|
EVD |
eigen()
Returns the eigen value decomposition.
|
default EVD |
eigen(boolean inPlace)
Returns the eigen value decomposition.
|
default DenseMatrix |
inverse()
Returns the inverse matrix.
|
default DenseMatrix |
inverse(boolean inPlace)
Returns the inverse matrix.
|
int |
ld()
The LDA (and LDB, LDC, etc.) parameter in BLAS is effectively
the stride of the matrix as it is laid out in linear memory.
|
LU |
lu()
Returns the LU decomposition.
|
default LU |
lu(boolean inPlace)
Returns the LU decomposition.
|
default DenseMatrix |
mul(DenseMatrix b)
In place element-wise multiplication A = A * B
|
default DenseMatrix |
mul(DenseMatrix b,
DenseMatrix c)
C = A * B
|
default DenseMatrix |
mul(double x)
In place element-wise multiplication A = A * x
|
default DenseMatrix |
mul(double x,
DenseMatrix c)
Element-wise addition C = A * x
|
double |
mul(int i,
int j,
double x)
A[i][j] *= x
|
default double |
norm()
L2 matrix norm.
|
default double |
norm1()
L1 matrix norm.
|
default double |
norm2()
L2 matrix norm.
|
default double |
normFro()
Frobenius matrix norm.
|
default double |
normInf()
Infinity matrix norm.
|
QR |
qr()
Returns the QR decomposition.
|
default QR |
qr(boolean inPlace)
Returns the QR decomposition.
|
default DenseMatrix |
replaceNaN(double x)
Replaces NaN's with given value.
|
default double[] |
rowMeans()
Returns the mean of each row for a matrix.
|
default double[] |
rowSums()
Returns the sum of each row for a matrix.
|
double |
set(int i,
int j,
double x)
Set the entry value at row i and column j.
|
default DenseMatrix |
sub(DenseMatrix b)
In place subtraction A = A - B
|
default DenseMatrix |
sub(DenseMatrix b,
DenseMatrix c)
C = A - B
|
default DenseMatrix |
sub(double x)
In place element-wise subtraction A = A - x
|
default DenseMatrix |
sub(double x,
DenseMatrix c)
Element-wise addition C = A - x
|
double |
sub(int i,
int j,
double x)
A[i][j] -= x
|
default double |
sum()
Returns the sum of all elements in the matrix.
|
SVD |
svd()
Returns the singular value decomposition.
|
default SVD |
svd(boolean inPlace)
Returns the singular value decomposition.
|
DenseMatrix |
transpose()
Returns the matrix transpose.
|
default double |
update(int i,
int j,
double x)
Set the entry value at row i and column j.
|
default double |
xax(double[] x)
Returns x' * A * x.
|
apply, atx, atxpy, atxpy, ax, axpy, axpy, diag, diag, eigen, eigen, eye, eye, get, isSymmetric, ncols, newInstance, newInstance, newInstance, nrows, ones, randn, randn, setSymmetric, svd, svd, toString, trace, zerosabmm, abtmm, atbmmdouble[] data()
int ld()
double set(int i,
int j,
double x)
default double update(int i,
int j,
double x)
LU lu()
default LU lu(boolean inPlace)
inPlace - if true, this matrix will be used for matrix decomposition.Cholesky cholesky()
java.lang.IllegalArgumentException - if the matrix is not positive definite.default Cholesky cholesky(boolean inPlace)
inPlace - if true, this matrix will be used for matrix decomposition.java.lang.IllegalArgumentException - if the matrix is not positive definite.QR qr()
default QR qr(boolean inPlace)
inPlace - if true, this matrix will be used for matrix decomposition.SVD svd()
default SVD svd(boolean inPlace)
inPlace - if true, this matrix will hold U on output.EVD eigen()
default EVD eigen(boolean inPlace)
inPlace - if true, this matrix will be overwritten U on output.double[] eig()
default double[] eig(boolean inPlace)
inPlace - if true, this matrix will be overwritten U on output.DenseMatrix transpose()
default DenseMatrix inverse()
default DenseMatrix inverse(boolean inPlace)
inPlace - if true, this matrix will be used for matrix decomposition.default double norm1()
default double norm2()
default double norm()
default double normInf()
default double normFro()
default double xax(double[] x)
default double[] rowSums()
default double[] rowMeans()
default double[] colSums()
default double[] colMeans()
DenseMatrix copy()
DenseMatrix ata()
MatrixDenseMatrix aat()
Matrixdouble add(int i,
int j,
double x)
double sub(int i,
int j,
double x)
double mul(int i,
int j,
double x)
double div(int i,
int j,
double x)
default DenseMatrix add(DenseMatrix b, DenseMatrix c)
default DenseMatrix add(DenseMatrix b)
default DenseMatrix sub(DenseMatrix b, DenseMatrix c)
default DenseMatrix sub(DenseMatrix b)
default DenseMatrix mul(DenseMatrix b, DenseMatrix c)
default DenseMatrix mul(DenseMatrix b)
default DenseMatrix div(DenseMatrix b, DenseMatrix c)
default DenseMatrix div(DenseMatrix b)
default DenseMatrix add(double x, DenseMatrix c)
default DenseMatrix add(double x)
default DenseMatrix sub(double x, DenseMatrix c)
default DenseMatrix sub(double x)
default DenseMatrix mul(double x, DenseMatrix c)
default DenseMatrix mul(double x)
default DenseMatrix div(double x, DenseMatrix c)
default DenseMatrix div(double x)
default DenseMatrix replaceNaN(double x)
default double sum()
default double[][] array()