|
Orbital library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object orbital.math.LUDecomposition
public final class LUDecomposition
LUDecomposition class, decomposing A into P∙A = L∙U. Solves linear equation systems.
decompose(Matrix)
,
NumericalAlgorithms
,
Serialized FormConstructor Summary | |
---|---|
protected |
LUDecomposition(Matrix A,
Matrix P,
boolean sign)
Gaussian LU-decomposition implementation. |
Method Summary | |
---|---|
static LUDecomposition |
decompose(Matrix M)
Get the Gaussian LU-decomposition of a matrix. |
Arithmetic |
det()
The determinant of A. |
Matrix |
getL()
lower triangular matrix L with diagonal 1s. |
Matrix |
getP()
permutation matrix. |
Matrix |
getU()
upper triangular matrix U. |
boolean |
isInvertible()
A is regular if and only if U is which depends upon whether there is a 0 on the diagonal. |
boolean |
isRegular()
Deprecated. Since Orbital1.1 use isInvertible() instead. |
int |
linearRank()
Rank of the matrix. |
Vector |
solve(Vector b)
Solve linear equation system A∙b. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected LUDecomposition(Matrix A, Matrix P, boolean sign)
Method Detail |
---|
public static LUDecomposition decompose(Matrix M)
Number of multiplications is 1/3*(n3-n)
public boolean isInvertible() throws java.lang.ArithmeticException
java.lang.ArithmeticException
Matrix.isInvertible()
public boolean isRegular() throws java.lang.ArithmeticException
isInvertible()
instead.
java.lang.ArithmeticException
public int linearRank()
Matrix.linearRank()
public Arithmetic det()
det A = (-1)p*det U where p = sign P is the number of permutations in P. Since det(P)*det(A) = det(P∙A) = det(L∙U) = det(L)*det(U) = det(U).
Matrix.det()
public Matrix getL()
Because of pivotising for numberical stability, this matrix only contains values with an absolute ≤1.
public Matrix getU()
public Matrix getP()
public Vector solve(Vector b)
Implementation solves L∙z = P∙b per forward-substitution, and then solves R∙x = z per backward-substitution.
|
Orbital library 1.3.0: 11 Apr 2009 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |