Class RealCholesky

java.lang.Object
org.flag4j.linalg.decompositions.chol.Cholesky<Matrix>
org.flag4j.linalg.decompositions.chol.RealCholesky
All Implemented Interfaces:
Decomposition<Matrix>

public class RealCholesky extends Cholesky<Matrix>

An instance of this class allows for the computation of a Cholesky decomposition for a real dense matrix.

Given a symmetric positive-definite matrix A, the Cholesky decomposition will decompose the matrix into A=LLT where L is a lower triangular matrix and LT is the transpose of L.

  • Constructor Details

    • RealCholesky

      public RealCholesky()
      Constructs a Cholesky decomposer. If you would like to enforce a check for symmetry at the time of decomposition, see RealCholesky(boolean).
    • RealCholesky

      public RealCholesky(boolean enforceSymmetric)
      Constructs a Cholesky decomposer.
      Parameters:
      enforceSymmetric - Flag indicating if the symmetry of the matrix to be decomposed should be explicitly checked (true). If false, no check will be made and the matrix will be treated as if it were symmetric and only the lower half of the matrix will be accessed.
  • Method Details

    • decompose

      public RealCholesky decompose(Matrix src)
      Decompose a matrix into A=LLT where L is a lower triangular matrix and LT is the transpose of L.
      Parameters:
      src - The source matrix to decompose. Must be symmetric positive-definite. Note, symmetry will only be checked explicitly if enforceSymmetric was set to true when this decomposer was instantiated.
      Returns:
      A reference to this decomposer.
      Throws:
      IllegalArgumentException - If src is not symmetric and enforceSymmetric was set to true when this decomposer was instantiated.
      LinearAlgebraException - If this matrix is not positive-definite.