public class IncompleteLUDecomposition 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 |
L |
SparseMatrixNd |
LU |
SparseMatrixNd |
U |
Constructor and Description |
---|
IncompleteLUDecomposition()
Creates an uninitialized CholeskyDecomposition.
|
IncompleteLUDecomposition(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 droptol) |
void |
get(MatrixNd LU)
Gets the lower and upper triangular matrices L and U associated with this
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 |
solveL(VectorNd x,
VectorNd b)
Solves L * x = b
|
boolean |
solveU(VectorNd x,
VectorNd b)
Solves U * x = b
|
public SparseMatrixNd LU
public SparseMatrixNd L
public SparseMatrixNd U
public IncompleteLUDecomposition()
public IncompleteLUDecomposition(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 decompositionpublic void factor(SparseMatrixNd A, double droptol)
public void get(MatrixNd LU)
LU
- lower and upper triangular matrices (sharing the same space)ImproperStateException
- if this decomposition is uninitializedImproperSizeException
- if LU is not of the proper dimension and cannot be resizedpublic boolean solveL(VectorNd x, VectorNd b) throws ImproperStateException, ImproperSizeException
public boolean solveU(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