Class Chol.CholMatrix

  • Enclosing interface:
    Chol<T>

    public static final class Chol.CholMatrix
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean isspd
      Symmetric and positive definite flag.
      private double[][] L
      Array for internal storage of decomposition.
      private int n
      Row and column dimension (square matrix).
      static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      CholMatrix​(Matrix Arg)
      Cholesky algorithm for symmetric and positive definite matrix.
    • Field Detail

      • L

        private final double[][] L
        Array for internal storage of decomposition.
      • n

        private final int n
        Row and column dimension (square matrix).
      • isspd

        private boolean isspd
        Symmetric and positive definite flag.
    • Constructor Detail

      • CholMatrix

        public CholMatrix​(Matrix Arg)
        Cholesky algorithm for symmetric and positive definite matrix.
        Parameters:
        A - Square, symmetric matrix.
    • Method Detail

      • isSPD

        public final boolean isSPD()
        Is the matrix symmetric and positive definite?
        Returns:
        true if A is symmetric and positive definite.
      • solve

        public final DenseDoubleMatrix2D solve​(Matrix B)
        Solve A*X = B
        Parameters:
        B - A Matrix with as many rows as A and any number of columns.
        Returns:
        X so that L*L'*X = B
        Throws:
        java.lang.IllegalArgumentException - Matrix row dimensions must agree.
        java.lang.RuntimeException - Matrix is not symmetric positive definite.