
Parallel Colt 0.7.2  
PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object cern.colt.matrix.tfloat.algo.decomposition.FloatLUDecompositionQuick
public class FloatLUDecompositionQuick
A low level version of FloatLUDecomposition
, avoiding unnecessary
memory allocation and copying. The input to decompose methods is
overriden with the result (LU). The input to solve methods is
overriden with the result (X). In addition to LUDecomposition, this
class also includes a faster variant of the decomposition, specialized for
tridiagonal (and hence also diagonal) matrices, as well as a solver tuned for
vectors. Its disadvantage is that it is a bit more difficult to use than
LUDecomposition. Thus, you may want to disregard this class and come
back later, if a need for speed arises.
An instance of this class remembers the result of its last decomposition. Usage pattern is as follows: Create an instance of this class, call a decompose method, then retrieve the decompositions, determinant, and/or solve as many equation problems as needed. Once another matrix needs to be LUdecomposed, you need not create a new instance of this class. Start again by calling a decompose method, then retrieve the decomposition and/or solve your equations, and so on. In case a LU matrix is already available, call method setLU instead of decompose and proceed with solving et al.
If a matrix shall not be overriden, use matrix.copy() and hand the the copy to methods.
For an m x n matrix A with m >= n, the LU decomposition is an m x n unit lower triangular matrix L, an n x 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 x m and U is m x n.
The LU decomposition with pivoting always exists, even if the matrix is singular, so the decompose methods will never fail. The primary use of the LU decomposition is in the solution of square systems of simultaneous linear equations. Attempting to solve such a system will throw an exception if isNonsingular() returns false.
Constructor Summary  

FloatLUDecompositionQuick()
Constructs and returns a new LU Decomposition object with default tolerance 1.0E9 for singularity detection. 

FloatLUDecompositionQuick(float tolerance)
Constructs and returns a new LU Decomposition object which uses the given tolerance for singularity detection; 
Method Summary  

void 
decompose(FloatMatrix2D A)
Decomposes matrix A into L and U (inplace). 
void 
decompose(FloatMatrix2D A,
int semiBandwidth)
Decomposes the banded and square matrix A into L and U (inplace). 
float 
det()
Returns the determinant, det(A). 
FloatMatrix2D 
getL()
Returns the lower triangular factor, L. 
FloatMatrix2D 
getLU()
Returns a copy of the combined lower and upper triangular factor, LU. 
int[] 
getPivot()
Returns the pivot permutation vector (not a copy of it). 
FloatMatrix2D 
getU()
Returns the upper triangular factor, U. 
boolean 
isNonsingular()
Returns whether the matrix is nonsingular (has an inverse). 
void 
setLU(FloatMatrix2D LU)
Sets the combined lower and upper triangular factor, LU. 
void 
solve(FloatMatrix1D B)
Solves the system of equations A*X = B (inplace). 
void 
solve(FloatMatrix2D B)
Solves the system of equations A*X = B (inplace). 
String 
toString()
Returns a String with (propertyName, propertyValue) pairs. 
Methods inherited from class java.lang.Object 

equals, getClass, hashCode, notify, notifyAll, wait, wait, wait 
Constructor Detail 

public FloatLUDecompositionQuick()
public FloatLUDecompositionQuick(float tolerance)
Method Detail 

public void decompose(FloatMatrix2D A)
A
 any matrix.public void decompose(FloatMatrix2D A, int semiBandwidth)
decompose(FloatMatrix2D)
.
semiBandwidth
 == 1 > A is diagonal, == 2 > A is tridiagonal.A
 any matrix.public float det()
IllegalArgumentException
 if A.rows() != A.columns() (Matrix must be
square).public FloatMatrix2D getL()
public FloatMatrix2D getLU()
public int[] getPivot()
public FloatMatrix2D getU()
public boolean isNonsingular()
public void setLU(FloatMatrix2D LU)
public void solve(FloatMatrix1D B)
B
 A vector with B.size() == A.rows().
IllegalArgumentException
 if B.size() != A.rows().
IllegalArgumentException
 if A is singular, that is, if !isNonsingular().
IllegalArgumentException
 if A.rows() < A.columns().public void solve(FloatMatrix2D B)
B
 A matrix with as many rows as A and any number of
columns.
IllegalArgumentException
 if B.rows() != A.rows().
IllegalArgumentException
 if A is singular, that is, if !isNonsingular().
IllegalArgumentException
 if A.rows() < A.columns().public String toString()
rank : 3 trace : 0
toString
in class Object

Parallel Colt 0.7.2  
PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 