Class CholeskyDecomposition.Solver

java.lang.Object
org.apache.commons.math3.linear.CholeskyDecomposition.Solver
All Implemented Interfaces:
DecompositionSolver
Enclosing class:
CholeskyDecomposition

private static class CholeskyDecomposition.Solver extends Object implements DecompositionSolver
Specialized solver.
  • Field Details

    • lTData

      private final double[][] lTData
      Row-oriented storage for LT matrix data.
  • Constructor Details

    • Solver

      private Solver(double[][] lTData)
      Build a solver from decomposed matrix.
      Parameters:
      lTData - row-oriented storage for LT matrix data
  • Method Details

    • isNonSingular

      public boolean isNonSingular()
      Check if the decomposed matrix is non-singular.
      Specified by:
      isNonSingular in interface DecompositionSolver
      Returns:
      true if the decomposed matrix is non-singular.
    • solve

      public RealVector solve(RealVector b)
      Solve the linear equation A × X = B for matrices A.

      The A matrix is implicit, it is provided by the underlying decomposition algorithm.

      Specified by:
      solve in interface DecompositionSolver
      Parameters:
      b - right-hand side of the equation A × X = B
      Returns:
      a vector X that minimizes the two norm of A × X - B
    • solve

      public RealMatrix solve(RealMatrix b)
      Solve the linear equation A × X = B for matrices A.

      The A matrix is implicit, it is provided by the underlying decomposition algorithm.

      Specified by:
      solve in interface DecompositionSolver
      Parameters:
      b - right-hand side of the equation A × X = B
      Returns:
      a matrix X that minimizes the two norm of A × X - B
    • getInverse

      public RealMatrix getInverse()
      Get the inverse of the decomposed matrix.
      Specified by:
      getInverse in interface DecompositionSolver
      Returns:
      the inverse matrix.