程序包 weka.core.matrix
类 LUDecomposition
java.lang.Object
weka.core.matrix.LUDecomposition
- 所有已实现的接口:
Serializable
,RevisionHandler
LU Decomposition.
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.
Adapted from the JAMA package.- 版本:
- $Revision: 1.4 $
- 作者:
- The Mathworks and NIST, Fracpete (fracpete at waikato dot ac dot nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明double
det()
Determinantdouble[]
Return pivot permutation vector as a one-dimensional double arraygetL()
Return lower triangular factorint[]
getPivot()
Return pivot permutation vectorReturns the revision string.getU()
Return upper triangular factorboolean
Is the matrix nonsingular?Solve A*X = B
-
构造器详细资料
-
LUDecomposition
LU Decomposition- 参数:
A
- Rectangular matrix
-
-
方法详细资料
-
isNonsingular
public boolean isNonsingular()Is the matrix nonsingular?- 返回:
- true if U, and hence A, is nonsingular.
-
getL
Return lower triangular factor- 返回:
- L
-
getU
Return upper triangular factor- 返回:
- U
-
getPivot
public int[] getPivot()Return pivot permutation vector- 返回:
- piv
-
getDoublePivot
public double[] getDoublePivot()Return pivot permutation vector as a one-dimensional double array- 返回:
- (double) piv
-
det
public double det()Determinant- 返回:
- det(A)
- 抛出:
IllegalArgumentException
- Matrix must be square
-
solve
Solve A*X = B- 参数:
B
- A Matrix with as many rows as A and any number of columns.- 返回:
- X so that L*U*X = B(piv,:)
- 抛出:
IllegalArgumentException
- Matrix row dimensions must agree.RuntimeException
- Matrix is singular.
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-