Package org.tribuo.math.la
Class DenseMatrix.CholeskyFactorization
java.lang.Object
org.tribuo.math.la.DenseMatrix.CholeskyFactorization
- All Implemented Interfaces:
Matrix.Factorization
- Enclosing class:
- DenseMatrix
public static final class DenseMatrix.CholeskyFactorization
extends Object
implements Matrix.Factorization
The output of a successful Cholesky factorization.
Essentially wraps a DenseMatrix
, but has additional
operations which allow more efficient implementations when the
matrix is known to be the result of a Cholesky factorization.
Mutating the wrapped matrix will cause undefined behaviour in the methods of this class.
May be refactored into a record in the future.
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Compute the matrix determinant of the factorized matrix.int
dim1()
First dimension of the factorized matrix.int
dim2()
Second dimension of the factorized matrix.lMatrix()
The lower triangular factorized matrix.Solves the system A * X = B, where B is the input matrix, and A is the matrix which produced this Cholesky factorization.Solves a system of linear equations A * b = y, where y is the input vector, A is the matrix which produced this Cholesky factorization, and b is the returned value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.tribuo.math.la.Matrix.Factorization
inverse
-
Method Details
-
lMatrix
The lower triangular factorized matrix.- Returns:
- The factorization matrix.
-
dim1
public int dim1()Description copied from interface:Matrix.Factorization
First dimension of the factorized matrix.- Specified by:
dim1
in interfaceMatrix.Factorization
- Returns:
- First dimension size.
-
dim2
public int dim2()Description copied from interface:Matrix.Factorization
Second dimension of the factorized matrix.- Specified by:
dim2
in interfaceMatrix.Factorization
- Returns:
- Second dimension size.
-
determinant
public double determinant()Compute the matrix determinant of the factorized matrix.- Specified by:
determinant
in interfaceMatrix.Factorization
- Returns:
- The matrix determinant.
-
solve
Solves a system of linear equations A * b = y, where y is the input vector, A is the matrix which produced this Cholesky factorization, and b is the returned value.- Specified by:
solve
in interfaceMatrix.Factorization
- Parameters:
vector
- The input vector y.- Returns:
- The vector b.
-
solve
Solves the system A * X = B, where B is the input matrix, and A is the matrix which produced this Cholesky factorization.- Specified by:
solve
in interfaceMatrix.Factorization
- Parameters:
matrix
- The input matrix B.- Returns:
- The matrix X.
-