public static class FloatSymmMatrix.BunchKaufman
extends java.lang.Object
implements java.io.Serializable
The LU decomposition with pivoting always exists, even if the matrix is singular. The primary use of the LU decomposition is in the solution of square systems of simultaneous linear equations if it is not singular. The decomposition can also be used to calculate the determinant.
Modifier and Type | Field and Description |
---|---|
int |
info
If info = 0, the LU decomposition was successful.
|
int[] |
ipiv
The pivot vector.
|
FloatSymmMatrix |
lu
The Bunch–Kaufman decomposition.
|
Constructor and Description |
---|
BunchKaufman(FloatSymmMatrix lu,
int[] ipiv,
int info)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
float |
det()
Returns the matrix determinant.
|
FloatMatrix |
inverse()
Returns the matrix inverse.
|
boolean |
isSingular()
Returns if the matrix is singular.
|
float[] |
solve(float[] b)
Solve A * x = b.
|
void |
solve(FloatMatrix B)
Solve A * X = B.
|
public final FloatSymmMatrix lu
public final int[] ipiv
public final int info
public BunchKaufman(FloatSymmMatrix lu, int[] ipiv, int info)
lu
- LU decomposition matrixipiv
- the pivot vectorinfo
- info > 0 if the matrix is singularpublic boolean isSingular()
public float det()
public FloatMatrix inverse()
public float[] solve(float[] b)
b
- right hand side of linear system.
On output, b will be overwritten with the solution matrix.java.lang.RuntimeException
- if matrix is singular.public void solve(FloatMatrix B)
B
- right hand side of linear system.
On output, B will be overwritten with the solution matrix.java.lang.RuntimeException
- if matrix is singular.