Class CholeskyDecompositionCommon_ZDRM

java.lang.Object
org.ejml.dense.row.decompose.chol.CholeskyDecompositionCommon_ZDRM
All Implemented Interfaces:
CholeskyDecomposition<ZMatrixRMaj>, CholeskyDecomposition_F64<ZMatrixRMaj>, DecompositionInterface<ZMatrixRMaj>
Direct Known Subclasses:
CholeskyDecompositionInner_ZDRM

public abstract class CholeskyDecompositionCommon_ZDRM extends Object implements CholeskyDecomposition_F64<ZMatrixRMaj>

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

See Also:
  • Field Details

    • n

      protected int n
    • T

      protected ZMatrixRMaj T
    • t

      protected double[] t
    • lower

      protected boolean lower
    • det

      protected Complex_F64 det
  • Constructor Details

    • CholeskyDecompositionCommon_ZDRM

      protected CholeskyDecompositionCommon_ZDRM(boolean lower)
      Specifies if a lower or upper variant should be constructed.
      Parameters:
      lower - should a lower or upper triangular matrix be used.
  • Method Details

    • 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 CholeskyDecomposition<ZMatrixRMaj>
      Returns:
      True if lower, false if upper.
    • decompose

      public boolean decompose(ZMatrixRMaj mat)
      Computes the decomposition of the input matrix. Depending on the implementation the input matrix might be stored internally or modified. If it is modified then the function DecompositionInterface.inputModified() will return true and the matrix should not be modified until the decomposition is no longer needed.
      Specified by:
      decompose in interface DecompositionInterface<ZMatrixRMaj>
      Parameters:
      mat - The matrix which is being decomposed. Modification is implementation dependent.
      Returns:
      Returns if it was able to decompose the matrix.
    • inputModified

      public boolean inputModified()
      Description copied from interface: DecompositionInterface
      Checks if the input matrix to DecompositionInterface.decompose(org.ejml.data.Matrix) is modified during the decomposition process.
      Specified by:
      inputModified in interface DecompositionInterface<ZMatrixRMaj>
      Returns:
      true if the input matrix to decompose() is modified.
    • 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 ZMatrixRMaj getT(@Nullable @Nullable ZMatrixRMaj T)
      Description copied from interface: CholeskyDecomposition

      Returns the triangular matrix from the decomposition.

      If an input is provided that matrix is used to write the results to. Otherwise a new matrix is created and the results written to it.

      Specified by:
      getT in interface CholeskyDecomposition<ZMatrixRMaj>
      Parameters:
      T - If not null then the decomposed matrix is written here.
      Returns:
      A lower or upper triangular matrix.
    • _getT

      public ZMatrixRMaj _getT()
      Returns the raw decomposed matrix.
      Returns:
      A lower or upper triangular matrix.
    • computeDeterminant

      public Complex_F64 computeDeterminant()
      Description copied from interface: CholeskyDecomposition_F64
      Computes the matrix's determinant using the decomposition.
      Specified by:
      computeDeterminant in interface CholeskyDecomposition_F64<ZMatrixRMaj>
      Returns:
      The determinant.