| 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectmpv2.LUPDecomposition
public class LUPDecomposition
LUP Decomposition, P*A = L*U A is N-by-K, P is N-by-N, M is Math.min(N,K), then L is N-by-M and U is M-by-K
| Constructor Summary | |
|---|---|
LUPDecomposition(AllMatrices A)
LUP Decomposition, P*A = L*U Constructor returns a structure to access L, U and P.  | 
|
LUPDecomposition(double[] vals)
LUP Decomposition, P*A = L*U.  | 
|
LUPDecomposition(int N,
                 int K,
                 double[] vals)
LUP Decomposition, P*A = L*U Constructor returns a structure to access L, U and P.  | 
|
| Method Summary | |
|---|---|
 double | 
det()
Determinant  | 
 int | 
getK()
Get number of columns in the original matrix A, i.e. length of each row vector.  | 
 double[] | 
getLArray()
Return lower triangular factor as a column-ordered array of length N*M.  | 
 BandMatrix | 
getLMatrix()
Return lower triangular factor as a BandMatrix object.  | 
 int | 
getM()
Get number of columns in L and rows in U.  | 
 int | 
getN()
Get number of rows in the original matrix A, i.e. length of each column vector.  | 
 int[] | 
getPivot()
Return pivot permutation vector, P(n,k)=1 when p[n]=k.  | 
 PermutationMatrix | 
getPmatrix()
Return the permutation matrix, P as a PermutationMatrix object.  | 
 double[] | 
getUArray()
Return upper triangular factor as a column-ordered array of length M*K.  | 
 BandMatrix | 
getUMatrix()
Return upper triangular factor as a BandMatrix object.  | 
 boolean | 
isNonsingular()
Is the matrix nonsingular?  | 
 double[] | 
solveArray(AllMatrices B)
Solve A*X = B, X is returned as an array.  | 
 double[] | 
solveArray(double[] b)
Solve A*x = b  | 
 SimpleMatrix | 
solveMatrix(AllMatrices B)
Solve A*X = B, X is returned as a SimpleMatrix object.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public LUPDecomposition(AllMatrices A)
A - Rectangular matrix of any AllMatrices type
public LUPDecomposition(int N,
                        int K,
                        double[] vals)
N - Number of rows in the matrixK - Number of columns in the matrixvals - The (N*K) matrix elements ordered by columns in an array
java.lang.IllegalArgumentExceptionpublic LUPDecomposition(double[] vals)
vals - The (N*N) matrix elements ordered by columns in an array
java.lang.IllegalArgumentException| Method Detail | 
|---|
public int getN()
public int getK()
public int getM()
public boolean isNonsingular()
public BandMatrix getLMatrix()
public double[] getLArray()
public BandMatrix getUMatrix()
public double[] getUArray()
public int[] getPivot()
public PermutationMatrix getPmatrix()
public double det()
java.lang.IllegalArgumentException - Matrix must be squarepublic double[] solveArray(double[] b)
b - An array with as many elements as rows in A.
java.lang.IllegalArgumentException - Matrix row dimensions must agree.
java.lang.RuntimeException - Matrix is singular.public SimpleMatrix solveMatrix(AllMatrices B)
B - A Matrix with as many rows as A and any number of columns.
java.lang.IllegalArgumentException - Matrix row dimensions must agree.
java.lang.RuntimeException - Matrix is singular.public double[] solveArray(AllMatrices B)
B - A Matrix with as many rows as A and any number of columns.
java.lang.IllegalArgumentException - Matrix row dimensions must agree.
java.lang.RuntimeException - Matrix is singular.
  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||