Interface LDU<N extends Comparable<N>>

All Superinterfaces:
DeterminantTask<N>, InverterTask<N>, InvertibleFactor<N>, MatrixDecomposition<N>, MatrixDecomposition.Determinant<N>, MatrixDecomposition.Ordered<N>, MatrixDecomposition.RankRevealing<N>, MatrixDecomposition.Solver<N>, MatrixTask<N>, Provider2D, Provider2D.Determinant<N>, Provider2D.Inverse<Optional<MatrixStore<N>>>, Provider2D.Rank, Provider2D.Solution<Optional<MatrixStore<N>>>, SolverTask<N>, Structure1D, Structure2D
All Known Subinterfaces:
Cholesky<N>, LDL<N>, LU<N>
All Known Implementing Classes:
CholeskyDecomposition, CholeskyDecomposition.C128, CholeskyDecomposition.H256, CholeskyDecomposition.Q128, CholeskyDecomposition.R064, CholeskyDecomposition.R128, LDLDecomposition, LDLDecomposition.C128, LDLDecomposition.H256, LDLDecomposition.Q128, LDLDecomposition.R064, LDLDecomposition.R128, LUDecomposition, LUDecomposition.C128, LUDecomposition.H256, LUDecomposition.Q128, LUDecomposition.R064, LUDecomposition.R128, RawCholesky, RawLU

LDU: [A] = [L][D][U] ( [PL][L][D][U][PU] )

  • [A] can be any matrix.
  • [L] is a unit lower (left) triangular matrix. It has the same number of rows as [A], and ones on the diagonal.
  • [D] is a square diagonal matrix.
  • [U] is a unit upper (right) triangular matrix. It has the same number of columns as [A], and ones on the diagonal.
  • [PL] is a permutation matrix (row pivot order).
  • [PU] is a permutation matrix (column pivot order).

Row and/or column permutations may not be necessary and are therefore optional. Numerical stability usually does require ordering of either the rows or columns (most algorithms reorder rows).

Solving the equation system [A][X]=[B] turns into this [L][D][U][X] = [B] and is solved in these steps:

  1. [L][Z]=[B] ( [Z] = [D][U][X] )
  2. [D][Y]=[Z] ( [Y] = [U][X] )
  3. [U][X]=[Y]

[A]H = [U]H[D]H[L]H

ojAlgo does not have a full/general LDU decompositions but contains 3 variations of it:

  • LU: [A] = [L][U] where [ULU] = [DLDU][ULDU]
  • Cholesky: [A] = [L][L]H where [A] is hermitian positive definite and [LCholesky] = [LLDU][DLDU]½
  • LDL: [A] = [L][D][L]H where [A] is hermitian and [LLDL]H = [U LDU]