gov.sandia.cognition.math.matrix.custom

## Class DenseMatrix.LU

• java.lang.Object
• gov.sandia.cognition.math.matrix.custom.DenseMatrix.LU
• Enclosing class:
DenseMatrix

```public static class DenseMatrix.LU
extends java.lang.Object```
Simple container class for LU decompositions. LU decomposition results in a lower triangular matrix (L) and an upper triangular matrix (U). This decomposition can be used for matrix inversion, determinant computation, etc.
• ### Field Summary

Fields
Modifier and Type Field and Description
`Matrix` `L`
The lower triangular matrix resulting from the factorization.
`java.util.List<java.lang.Integer>` `P`
The 0-based list of row swaps used in the factorization.
`Matrix` `U`
The upper triangular matrix resulting from the factorization.
• ### Method Summary

All Methods
Modifier and Type Method and Description
`Matrix` `getPivotMatrix()`
Helper method converts P into a pivot matrix that can pre-multiply L*U.
• ### Methods inherited from class java.lang.Object

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

• #### P

`public java.util.List<java.lang.Integer> P`
The 0-based list of row swaps used in the factorization. NOTE: If row 0 is swapped with row 1, P will contain [1, 1, 2, ...] (because if it said [1, 0, 2, ...] that would mean that it swapped row 0 with 1 and then row 1 with 0 (swapping back the original rows)). If this seems too confusing, just use the getPivotMatrix helper method.
• #### L

`public Matrix L`
The lower triangular matrix resulting from the factorization.
• #### U

`public Matrix U`
The upper triangular matrix resulting from the factorization.
• ### Method Detail

• #### getPivotMatrix

`public Matrix getPivotMatrix()`
Helper method converts P into a pivot matrix that can pre-multiply L*U.
Returns:
an identity matrix with the appropriate row swaps to re-generate the original matrix A when P * L * U is calculated.