public class DMatrixLud
extends java.lang.Object
The LU decomposition with pivoting never fails, even if the matrix A is singular. However, the primary use of LU decomposition is in the solution of square systems of linear equations, which will fail if A is singular (or not square).
Constructor and Description |
---|
DMatrixLud(DMatrix a)
Constructs an LU decomposition of the specified matrix A.
|
Modifier and Type | Method and Description |
---|---|
double |
det()
Returns the determinant of the square matrix A.
|
DMatrix |
getL()
Gets the lower triangular (or lower trapezoidal) factor L.
|
DMatrix |
getP()
Gets the row permutation matrix P.
|
int[] |
getPivotIndices()
Gets the array of row permutation (pivot) indices p.
|
DMatrix |
getU()
Gets the upper triangular (or upper trapezoidal) factor U.
|
boolean |
isSingular()
Determines whether the matrix A is singular.
|
DMatrix |
solve(DMatrix b)
Returns the solution X of the linear system A*X = B.
|
public DMatrixLud(DMatrix a)
a
- the matrix.public boolean isSingular()
public DMatrix getL()
public DMatrix getU()
public DMatrix getP()
public int[] getPivotIndices()
public double det()