For an m-by-n matrix A with m >= n, the LU decomposition is an m-by-n unit lower triangular matrix L, an n-by-n upper triangular matrix U, and a permutation vector piv of length m so that A(piv,:) = L*U. If m < n, then L is m-by-m and U is m-by-n.
The LU decompostion with pivoting always exists, even if the matrix is singular, so the constructor will never fail. The primary use of the LU decomposition is in the solution of square systems of simultaneous linear equations. This will fail if isNonsingular() returns false.
det
method has been renamed as {@link #getDeterminant() getDeterminant},getDoublePivot
method has been removed (but the int based {@link #getPivot() getPivot} method has been kept),solve
and isNonSingular
methods have been replaced by a {@link #getSolver() getSolver} method and the equivalent methods provided bythe returned {@link DecompositionSolver}. LU Decomposition refactors the original matrix such that:
LU Decomposition is useful since once the decomposition has been performed linear equations can be quickly solved and the original matrix A inverted. Different algorithms can be selected to perform the decomposition, all will have the same end result.
To use this class first specify the size of the matrix that will be decomposed by it in the constructor. Only square m by m matrices can be decomposed. Then to decompose a matrix call {@link #decompose}. If it encounters any problems an exception will be thrown. After that all the other functions will be available for solving and inverting matrices.
@author Peter Abeles
|
|
|
|