public abstract class DenseMatrix extends Matrix implements MatrixMultiplication<DenseMatrix,DenseMatrix>
| Constructor and Description |
|---|
DenseMatrix() |
| Modifier and Type | Method and Description |
|---|---|
abstract DenseMatrix |
aat()
Returns A * A'
|
DenseMatrix |
add(DenseMatrix b)
In place addition A = A + B
|
DenseMatrix |
add(DenseMatrix b,
DenseMatrix c)
C = A + B
|
DenseMatrix |
add(double x)
In place element-wise addition A = A + x
|
DenseMatrix |
add(double x,
DenseMatrix c)
Element-wise addition C = A + x
|
abstract double |
add(int i,
int j,
double x)
A[i][j] += x
|
double[][] |
array()
Return the two-dimensional array of matrix.
|
abstract DenseMatrix |
ata()
Returns A' * A
|
abstract Cholesky |
cholesky()
Returns the Cholesky decomposition.
|
Cholesky |
cholesky(boolean inPlace)
Returns the Cholesky decomposition.
|
double[] |
colMeans()
Returns the mean of each column for a matrix.
|
double[] |
colSums()
Returns the sum of each column for a matrix.
|
abstract DenseMatrix |
copy()
Returns a copy of this matrix.
|
abstract double[] |
data()
Returns the array of storing the matrix.
|
DenseMatrix |
div(DenseMatrix b)
In place element-wise division A = A / B
A = A - B
|
DenseMatrix |
div(DenseMatrix b,
DenseMatrix c)
C = A / B
|
DenseMatrix |
div(double x)
In place element-wise division A = A / x
|
DenseMatrix |
div(double x,
DenseMatrix c)
Element-wise addition C = A / x
|
abstract double |
div(int i,
int j,
double x)
A[i][j] /= x
|
abstract double[] |
eig()
Returns the eigen values in an array of size 2N.
|
double[] |
eig(boolean inPlace)
Returns the eigen values in an array of size 2N.
|
abstract EVD |
eigen()
Returns the eigen value decomposition.
|
EVD |
eigen(boolean inPlace)
Returns the eigen value decomposition.
|
DenseMatrix |
inverse()
Returns the inverse matrix.
|
DenseMatrix |
inverse(boolean inPlace)
Returns the inverse matrix.
|
abstract 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.
|
abstract LU |
lu()
Returns the LU decomposition.
|
LU |
lu(boolean inPlace)
Returns the LU decomposition.
|
DenseMatrix |
mul(DenseMatrix b)
In place element-wise multiplication A = A * B
|
DenseMatrix |
mul(DenseMatrix b,
DenseMatrix c)
C = A * B
|
DenseMatrix |
mul(double x)
In place element-wise multiplication A = A * x
|
DenseMatrix |
mul(double x,
DenseMatrix c)
Element-wise addition C = A * x
|
abstract double |
mul(int i,
int j,
double x)
A[i][j] *= x
|
double |
norm()
L2 matrix norm.
|
double |
norm1()
L1 matrix norm.
|
double |
norm2()
L2 matrix norm.
|
double |
normFro()
Frobenius matrix norm.
|
double |
normInf()
Infinity matrix norm.
|
abstract QR |
qr()
Returns the QR decomposition.
|
QR |
qr(boolean inPlace)
Returns the QR decomposition.
|
DenseMatrix |
replaceNaN(double x)
Replaces NaN's with given value.
|
double[] |
rowMeans()
Returns the mean of each row for a matrix.
|
double[] |
rowSums()
Returns the sum of each row for a matrix.
|
abstract double |
set(int i,
int j,
double x)
Set the entry value at row i and column j.
|
DenseMatrix |
sub(DenseMatrix b)
In place subtraction A = A - B
|
DenseMatrix |
sub(DenseMatrix b,
DenseMatrix c)
C = A - B
|
DenseMatrix |
sub(double x)
In place element-wise subtraction A = A - x
|
DenseMatrix |
sub(double x,
DenseMatrix c)
Element-wise addition C = A - x
|
abstract double |
sub(int i,
int j,
double x)
A[i][j] -= x
|
double |
sum()
Returns the sum of all elements in the matrix.
|
abstract SVD |
svd()
Returns the singular value decomposition.
|
SVD |
svd(boolean inPlace)
Returns the singular value decomposition.
|
abstract DenseMatrix |
transpose()
Returns the matrix transpose.
|
double |
update(int i,
int j,
double x)
Set the entry value at row i and column j.
|
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, toString, trace, zerosclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitabmm, abtmm, atbmmpublic abstract double[] data()
public abstract int ld()
public abstract double set(int i,
int j,
double x)
public double update(int i,
int j,
double x)
public abstract LU lu()
public LU lu(boolean inPlace)
inPlace - if true, this matrix will be used for matrix decomposition.public abstract Cholesky cholesky()
java.lang.IllegalArgumentException - if the matrix is not positive definite.public 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.public abstract QR qr()
public QR qr(boolean inPlace)
inPlace - if true, this matrix will be used for matrix decomposition.public abstract SVD svd()
public SVD svd(boolean inPlace)
inPlace - if true, this matrix will hold U on output.public abstract EVD eigen()
public EVD eigen(boolean inPlace)
inPlace - if true, this matrix will be overwritten U on output.public abstract double[] eig()
public double[] eig(boolean inPlace)
inPlace - if true, this matrix will be overwritten U on output.public abstract DenseMatrix transpose()
public DenseMatrix inverse()
public DenseMatrix inverse(boolean inPlace)
inPlace - if true, this matrix will be used for matrix decomposition.public double norm1()
public double norm2()
public double norm()
public double normInf()
public double normFro()
public double xax(double[] x)
public double[] rowSums()
public double[] rowMeans()
public double[] colSums()
public double[] colMeans()
public abstract DenseMatrix copy()
public abstract DenseMatrix ata()
Matrixpublic abstract DenseMatrix aat()
Matrixpublic abstract double add(int i,
int j,
double x)
public abstract double sub(int i,
int j,
double x)
public abstract double mul(int i,
int j,
double x)
public abstract double div(int i,
int j,
double x)
public DenseMatrix add(DenseMatrix b, DenseMatrix c)
public DenseMatrix add(DenseMatrix b)
public DenseMatrix sub(DenseMatrix b, DenseMatrix c)
public DenseMatrix sub(DenseMatrix b)
public DenseMatrix mul(DenseMatrix b, DenseMatrix c)
public DenseMatrix mul(DenseMatrix b)
public DenseMatrix div(DenseMatrix b, DenseMatrix c)
public DenseMatrix div(DenseMatrix b)
public DenseMatrix add(double x, DenseMatrix c)
public DenseMatrix add(double x)
public DenseMatrix sub(double x, DenseMatrix c)
public DenseMatrix sub(double x)
public DenseMatrix mul(double x, DenseMatrix c)
public DenseMatrix mul(double x)
public DenseMatrix div(double x, DenseMatrix c)
public DenseMatrix div(double x)
public DenseMatrix replaceNaN(double x)
public double sum()
public double[][] array()