jsat.linear
Class CholeskyDecomposition
- java.lang.Object
-
- jsat.linear.CholeskyDecomposition
-
- All Implemented Interfaces:
- java.io.Serializable
public class CholeskyDecomposition extends java.lang.Object implements java.io.SerializableThe Cholesky Decomposition factors a symmetric positive definite matrix A into the form A = L LT. The Cholesky Decomposition of a matrix is unique.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description CholeskyDecomposition(Matrix A)Computes the Cholesky Decomposition of the matrix A.CholeskyDecomposition(Matrix A, java.util.concurrent.ExecutorService threadpool)Computes the Cholesky Decomposition of the matrix A.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetDet()Computes the determinant of AMatrixgetLT()The Cholesky Decomposition computes the factorization A = L LT.Matrixsolve(Matrix B)Solves the linear system of equations A x = BMatrixsolve(Matrix B, java.util.concurrent.ExecutorService threadpool)Solves the linear system of equations A x = BVecsolve(Vec b)Solves the linear system of equations A x = b
-
-
-
Constructor Detail
-
CholeskyDecomposition
public CholeskyDecomposition(Matrix A)
Computes the Cholesky Decomposition of the matrix A. The matrix A will be altered to form the decomposition L. If A is still needed after this computation acloneof the matrix should be given instead.
NOTE: No check for the symmetric positive definite property will occur. The results of passing a matrix that does not meet this properties is undefined.- Parameters:
A- the matrix to create the Cholesky Decomposition of
-
CholeskyDecomposition
public CholeskyDecomposition(Matrix A, java.util.concurrent.ExecutorService threadpool)
Computes the Cholesky Decomposition of the matrix A. The matrix A will be altered to form the decomposition L. If A is still needed after this computation acloneof the matrix should be given instead.
NOTE: No check for the symmetric positive definite property will occur. The results of passing a matrix that does not meet this properties is undefined.- Parameters:
A- the matrix to create the Cholesky Decomposition ofthreadpool- the source of threads for computation
-
-
Method Detail
-
getLT
public Matrix getLT()
The Cholesky Decomposition computes the factorization A = L LT. This method returns LT- Returns:
- The upper triangular matrix LT
-
solve
public Vec solve(Vec b)
Solves the linear system of equations A x = b- Parameters:
b- the vectors of values- Returns:
- the vector x such that A x = b
-
solve
public Matrix solve(Matrix B)
Solves the linear system of equations A x = B- Parameters:
B- the matrix of values- Returns:
- the matrix c such that A x = B
-
solve
public Matrix solve(Matrix B, java.util.concurrent.ExecutorService threadpool)
Solves the linear system of equations A x = B- Parameters:
B- the matrix of valuesthreadpool- the source of threads for parallel evaluation- Returns:
- the matrix c such that A x = B
-
getDet
public double getDet()
Computes the determinant of A- Returns:
- the determinant of A
-
-
DataMelt 3.0 © DataMelt by jWork.ORG