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 Details

    • lMatrix

      public DenseMatrix 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 interface Matrix.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 interface Matrix.Factorization
      Returns:
      Second dimension size.
    • determinant

      public double determinant()
      Compute the matrix determinant of the factorized matrix.
      Specified by:
      determinant in interface Matrix.Factorization
      Returns:
      The matrix determinant.
    • solve

      public DenseVector solve(SGDVector vector)
      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 interface Matrix.Factorization
      Parameters:
      vector - The input vector y.
      Returns:
      The vector b.
    • solve

      public DenseMatrix solve(Matrix matrix)
      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 interface Matrix.Factorization
      Parameters:
      matrix - The input matrix B.
      Returns:
      The matrix X.