public class IncompleteCholeskyDecomposition extends java.lang.Object implements LinearTransformNd
Providing a separate class for the Cholesky decomposition allows an application to perform such decompositions repeatedly without having to reallocate temporary storage space.
Modifier and Type | Field and Description |
---|---|
SparseMatrixNd |
C |
Constructor and Description |
---|
IncompleteCholeskyDecomposition()
Creates an uninitialized CholeskyDecomposition.
|
IncompleteCholeskyDecomposition(SparseMatrixNd M)
Creates a CholeskyDecomposition for the Matrix specified by M.
|
Modifier and Type | Method and Description |
---|---|
int |
colSize()
Number of columns in the matrix associated with this transformation.
|
void |
factor(SparseMatrixNd A)
Peforms an Cholesky decomposition on the Matrix M.
|
void |
factor(SparseMatrixNd A,
double tol) |
void |
get(MatrixNd L)
Gets the lower-triangular matrix L associated with the Cholesky
decomposition.
|
void |
mul(VectorNd vr,
VectorNd v1)
Applies this transformation to vector v1 and returns the result in vr.
|
int |
rowSize()
Number of rows in the matrix associated with this transformation.
|
boolean |
solve(VectorNd x,
VectorNd b)
Solves L * x = b
|
boolean |
solveTranspose(VectorNd x,
VectorNd b)
Solves L' * x = b
|
public SparseMatrixNd C
public IncompleteCholeskyDecomposition()
public IncompleteCholeskyDecomposition(SparseMatrixNd M) throws ImproperSizeException
M
- matrix to perform the Cholesky decomposition onImproperSizeException
- if M is not squarepublic void factor(SparseMatrixNd A)
A
- matrix on which to perform the Cholesky decompositionImproperSizeException
- if M is not squarejava.lang.IllegalArgumentException
- if M is detected to be not symmetric positive definitepublic void factor(SparseMatrixNd A, double tol)
public void get(MatrixNd L)
L
- lower triangular matrixImproperStateException
- if this CholeskyDecomposition is uninitializedImproperSizeException
- if L is not of the proper dimension and cannot be resizedpublic boolean solve(VectorNd x, VectorNd b) throws ImproperStateException, ImproperSizeException
public boolean solveTranspose(VectorNd x, VectorNd b) throws ImproperStateException, ImproperSizeException
public int colSize()
LinearTransformNd
mul
.colSize
in interface LinearTransformNd
public int rowSize()
LinearTransformNd
mul
.rowSize
in interface LinearTransformNd
public void mul(VectorNd vr, VectorNd v1)
LinearTransformNd
mul
in interface LinearTransformNd
vr
- vector in which result is returnedv1
- vector to transform