Class CholeskyDecompositionCommon_FDRM

  • All Implemented Interfaces:
    org.ejml.interfaces.decomposition.CholeskyDecomposition<org.ejml.data.FMatrixRMaj>, org.ejml.interfaces.decomposition.CholeskyDecomposition_F32<org.ejml.data.FMatrixRMaj>, org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.FMatrixRMaj>
    Direct Known Subclasses:
    CholeskyDecompositionBlock_FDRM, CholeskyDecompositionInner_FDRM

    public abstract class CholeskyDecompositionCommon_FDRM
    extends java.lang.Object
    implements org.ejml.interfaces.decomposition.CholeskyDecomposition_F32<org.ejml.data.FMatrixRMaj>

    This is an abstract class for a Cholesky decomposition. It provides the solvers, but the actual decomposition is provided in other classes.

    See Also:
    CholeskyDecomposition_F32
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.ejml.data.Complex_F32 det  
      protected boolean lower  
      protected int maxWidth  
      protected int n  
      protected float[] t  
      protected org.ejml.data.FMatrixRMaj T  
      protected float[] vv  
    • Constructor Summary

      Constructors 
      Constructor Description
      CholeskyDecompositionCommon_FDRM​(boolean lower)
      Specifies if a lower or upper variant should be constructed.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      float[] _getVV()  
      org.ejml.data.Complex_F32 computeDeterminant()  
      boolean decompose​(org.ejml.data.FMatrixRMaj mat)
      Performs Choleksy decomposition on the provided matrix.
      protected abstract boolean decomposeLower()
      Performs an lower triangular decomposition.
      protected abstract boolean decomposeUpper()
      Performs an upper triangular decomposition.
      org.ejml.data.FMatrixRMaj getT()
      Returns the triangular matrix from the decomposition.
      org.ejml.data.FMatrixRMaj getT​(org.ejml.data.FMatrixRMaj T)  
      boolean inputModified()  
      boolean isLower()
      If true the decomposition was for a lower triangular matrix.
      void setExpectedMaxSize​(int numRows, int numCols)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • maxWidth

        protected int maxWidth
      • n

        protected int n
      • T

        protected org.ejml.data.FMatrixRMaj T
      • t

        protected float[] t
      • vv

        protected float[] vv
      • lower

        protected boolean lower
      • det

        protected org.ejml.data.Complex_F32 det
    • Constructor Detail

      • CholeskyDecompositionCommon_FDRM

        public CholeskyDecompositionCommon_FDRM​(boolean lower)
        Specifies if a lower or upper variant should be constructed.
        Parameters:
        lower - should a lower or upper triangular matrix be used.
    • Method Detail

      • setExpectedMaxSize

        public void setExpectedMaxSize​(int numRows,
                                       int numCols)
      • isLower

        public boolean isLower()
        If true the decomposition was for a lower triangular matrix. If false it was for an upper triangular matrix.
        Specified by:
        isLower in interface org.ejml.interfaces.decomposition.CholeskyDecomposition<org.ejml.data.FMatrixRMaj>
        Returns:
        True if lower, false if upper.
      • decompose

        public boolean decompose​(org.ejml.data.FMatrixRMaj mat)

        Performs Choleksy decomposition on the provided matrix.

        If the matrix is not positive definite then this function will return false since it can't complete its computations. Not all errors will be found. This is an efficient way to check for positive definiteness.

        Specified by:
        decompose in interface org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.FMatrixRMaj>
        Parameters:
        mat - A symmetric positive definite matrix with n ≤ widthMax.
        Returns:
        True if it was able to finish the decomposition.
      • inputModified

        public boolean inputModified()
        Specified by:
        inputModified in interface org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.FMatrixRMaj>
      • decomposeLower

        protected abstract boolean decomposeLower()
        Performs an lower triangular decomposition.
        Returns:
        true if the matrix was decomposed.
      • decomposeUpper

        protected abstract boolean decomposeUpper()
        Performs an upper triangular decomposition.
        Returns:
        true if the matrix was decomposed.
      • getT

        public org.ejml.data.FMatrixRMaj getT​(org.ejml.data.FMatrixRMaj T)
        Specified by:
        getT in interface org.ejml.interfaces.decomposition.CholeskyDecomposition<org.ejml.data.FMatrixRMaj>
      • getT

        public org.ejml.data.FMatrixRMaj getT()
        Returns the triangular matrix from the decomposition.
        Returns:
        A lower or upper triangular matrix.
      • _getVV

        public float[] _getVV()
      • computeDeterminant

        public org.ejml.data.Complex_F32 computeDeterminant()
        Specified by:
        computeDeterminant in interface org.ejml.interfaces.decomposition.CholeskyDecomposition_F32<org.ejml.data.FMatrixRMaj>