cern.colt.matrix.tdouble.algo.decomposition.SparseDoubleLUDecomposition Maven / Gradle / Ivy
Show all versions of parallelcolt Show documentation
package cern.colt.matrix.tdouble.algo.decomposition;
import cern.colt.matrix.tdouble.DoubleMatrix1D;
import cern.colt.matrix.tdouble.DoubleMatrix2D;
import edu.emory.mathcs.csparsej.tdouble.Dcs_common.Dcss;
/**
* For a square matrix A, the LU decomposition is an unit lower
* triangular matrix L, an upper triangular matrix U, and a
* permutation vector piv so that A(piv,:) = L*U
*
* 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. This will fail if
* isNonsingular() returns false.
*
* @author Piotr Wendykier ([email protected])
*/
public interface SparseDoubleLUDecomposition {
/**
* Returns the determinant, det(A).
*
*/
public abstract double det();
/**
* Returns the lower triangular factor, L.
*
* @return L
*/
public abstract DoubleMatrix2D getL();
/**
* Returns a copy of the pivot permutation vector.
*
* @return piv
*/
public abstract int[] getPivot();
/**
* Returns the upper triangular factor, U.
*
* @return U
*/
public abstract DoubleMatrix2D getU();
/**
* Returns a copy of the symbolic LU analysis object
*
* @return symbolic LU analysis
*/
public abstract Object getSymbolicAnalysis();
/**
* Returns whether the matrix is nonsingular (has an inverse).
*
* @return true if U, and hence A, is nonsingular; false
* otherwise.
*/
public abstract boolean isNonsingular();
/**
* Solves A*x = b(in-place). Upon return b is overridden
* with the result x.
*
* @param b
* A vector with of size A.rows();
* @exception IllegalArgumentException
* if b.size() != A.rows() or if A is singular.
*/
public abstract void solve(DoubleMatrix1D b);
}