org.ojalgo.matrix.decomposition

## Interface LDU<N extends Number>

• All Superinterfaces:
All Known Subinterfaces:
Cholesky<N>, LDL<N>, LU<N>

```public interface LDU<N extends Number>
extends MatrixDecomposition<N>, MatrixDecomposition.Solver<N>, MatrixDecomposition.Determinant<N>, MatrixDecomposition.RankRevealing<N>```

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]
Author:
apete
• ### Nested Class Summary

`SolverTask.Factory<N extends Number>`

`InverterTask.Factory<N extends Number>`

`DeterminantTask.Factory<N extends Number>`
• ### Nested classes/interfaces inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition

`MatrixDecomposition.Determinant<N extends Number>, MatrixDecomposition.EconomySize<N extends Number>, MatrixDecomposition.Hermitian<N extends Number>, MatrixDecomposition.Ordered<N extends Number>, MatrixDecomposition.Pivoting<N extends Number>, MatrixDecomposition.RankRevealing<N extends Number>, MatrixDecomposition.Solver<N extends Number>, MatrixDecomposition.Values<N extends Number>`
• ### Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure2D

`Structure2D.IntRowColumn, Structure2D.Logical<S extends Structure2D,B extends Structure2D.Logical<S,?>>, Structure2D.LongRowColumn, Structure2D.ReducibleTo1D<R extends Structure1D>, Structure2D.RowColumnCallback, Structure2D.RowColumnKey<R,C>, Structure2D.RowColumnMapper<R,C>`
• ### Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure1D

`Structure1D.BasicMapper<T>, Structure1D.IndexCallback, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.LongIndex, Structure1D.LoopCallback`
• ### Field Summary

`COMPLEX, PRIMITIVE, QUATERNION, RATIONAL`

`COMPLEX, PRIMITIVE, QUATERNION, RATIONAL`

`COMPLEX, PRIMITIVE, QUATERNION, RATIONAL`
• ### Fields inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition

`TYPICAL`
• ### Method Summary

All Methods
Modifier and Type Method and Description
`default boolean` `isOrdered()`
This is a property of the algorithm/implementation, not the data.
• ### Methods inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition.Solver

`compute, getInverse, getInverse, getSolution, getSolution, isSolvable`

`preallocate, preallocate, solve, solve`

`invert, invert, preallocate, preallocate`
• ### Methods inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition.Determinant

`getDeterminant`

`calculateDeterminant`
• ### Methods inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition.RankRevealing

`countSignificant, getRank, getRankThreshold, isFullRank`
• ### Methods inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition

`decompose, isComputed, reconstruct, reset`
• ### Methods inherited from interface org.ojalgo.structure.Structure2D

`column, column, column, column, column, count, count, countColumns, countRows, index, index, isEmpty, isFat, isScalar, isSquare, isTall, isVector, loopAll, loopColumn, loopColumn, loopDiagonal, loopMatching, loopRow, loopRow, mapperOf, row, row, row, row, row`
• ### Methods inherited from interface org.ojalgo.structure.Structure1D

`index, loopAll, loopMatching, loopRange, mapper, size`
• ### Method Detail

• #### isOrdered

`default boolean isOrdered()`
Description copied from interface: `MatrixDecomposition.Ordered`
This is a property of the algorithm/implementation, not the data. Typically relevant for `SingularValue`, `Eigenvalue` or any `MatrixDecomposition.RankRevealing` decomposition.
Specified by:
`isOrdered` in interface `MatrixDecomposition.Ordered<N extends Number>`
Returns:
true if the rows/columns of the returned matrix factors are guaranteed some specific order; false if there is no such guarantee.