|
JMSLTM Numerical Library 5.0.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.imsl.math.ComplexSparseCholesky
public class ComplexSparseCholesky
Sparse Cholesky factorization of a matrix of type ComplexSparseMatrix
.
Class ComplexSparseCholesky
computes the Cholesky factorization
of a sparse Hermitian positive definite matrix A. This factorization can
then be used to compute the solution of the linear system
.
Typically, the solution of a large sparse positive definite system is done in four steps.
Class ComplexSparseCholesky
realizes all four steps by algorithms
described in George and Liu (1981). Especially, step one, is a realization of a minimum
degree ordering algorithm. The numerical factorization in its standard form is based on
a sparse compressed storage scheme. Alternatively, a multifrontal method can be used.
The multifrontal method requires more storage but will be faster than the standard
method in certain cases. The multifrontal method is based on the routines in Liu
(1987). For a detailed description of this method, see Liu (1990), also Duff and
Reid(1983, 1984), Ashcraft (1987) et al. (1987), and Liu (1986, 1989, 1992). The
numerical factorization method can be specified by using the
setNumericFactorizationMethod
The solve
factorSymbolically
factorNumerically
setNumericFactor
setSymbolicFactor
solve
method when different right-hand sides are to be solved.
There is a special situation where computations can be simplified.
If an application generates different sparse Hermitian positive definite
coefficient matrices that all have the same sparsity pattern, then by using
methods
getSymbolicFactor
setSymbolicFactor
Nested Class Summary | |
---|---|
static class |
ComplexSparseCholesky.NotSPDException
The matrix is not Hermitian, positive definite. |
static class |
ComplexSparseCholesky.NumericFactor
Data structures and functions for the numeric Cholesky factor. |
static class |
ComplexSparseCholesky.SymbolicFactor
Data structures and functions for the symbolic Cholesky factor. |
Field Summary | |
---|---|
static int |
MULTIFRONTAL_METHOD
Indicates the multifrontal method will be used for numeric factorization. |
static int |
STANDARD_METHOD
Indicates that the method of George/Liu (1981) is used for numeric factorization. |
Constructor Summary | |
---|---|
ComplexSparseCholesky(ComplexSparseMatrix A)
Constructs the matrix structure for the Cholesky factorization of a sparse Hermitian positive definite matrix of type ComplexSparseMatrix . |
Method Summary | |
---|---|
void |
factorNumerically()
Computes the numeric factorization of a sparse Hermitian positive definite matrix. |
void |
factorSymbolically()
Computes the symbolic factorization of a sparse Hermitian positive definite matrix. |
double |
getLargestDiagonalElement()
Returns the largest diagonal element of the Cholesky factor. |
long |
getNumberOfNonzeros()
Returns the number of nonzeros in the Cholesky factor. |
ComplexSparseCholesky.NumericFactor |
getNumericFactor()
Returns the numeric Cholesky factor. |
int |
getNumericFactorizationMethod()
Returns the method used in the numerical factorization of the permuted input matrix. |
double |
getSmallestDiagonalElement()
Returns the smallest diagonal element of the Cholesky factor. |
ComplexSparseCholesky.SymbolicFactor |
getSymbolicFactor()
Returns the symbolic Cholesky factor. |
void |
setNumericFactor(ComplexSparseCholesky.NumericFactor numericFactor)
Sets the numeric Cholesky factor to use in solving a sparse complex Hermitian positive definite system of linear equations . |
void |
setNumericFactorizationMethod(int method)
Defines the method used in the numerical factorization of the permuted input matrix. |
void |
setSymbolicFactor(ComplexSparseCholesky.SymbolicFactor symbolicFactor)
Sets the symbolic Cholesky factor to use in solving a sparse complex Hermitian positive definite system of linear equations . |
Complex[] |
solve(Complex[] b)
Computes the solution of a sparse Hermitian positive definite system of linear equations . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MULTIFRONTAL_METHOD
public static final int STANDARD_METHOD
Constructor Detail |
---|
public ComplexSparseCholesky(ComplexSparseMatrix A)
ComplexSparseMatrix
.
A
- The ComplexSparseMatrix
Hermitian positive definite matrix to
be factored. Only the lower triangular part of the input matrix is used.Method Detail |
---|
public void factorNumerically() throws ComplexSparseCholesky.NotSPDException
This method numerically factors the instance of the constructed matrix
A, where A is of type ComplexSparseMatrix
and
is Hermitian positive definite. The factorization is obtained in several
steps:
Note that the symbolic factorization is not done if the symbolic factor
has been supplied by the user through the setSymbolicFactor
method.
ComplexSparseCholesky.NotSPDException
- is thrown if the input matrix is not Hermitian, positive definite.public void factorSymbolically() throws ComplexSparseCholesky.NotSPDException
This method symbolically factors the instance of the constructed
matrix A, where A is of type ComplexSparseMatrix
and is Hermitian positive definite. The factorization is obtained in
several steps:
ComplexSparseCholesky.NotSPDException
- is thrown if the input matrix is not Hermitian, positive definite.public double getLargestDiagonalElement()
double
value specifying the largest
diagonal element of the Cholesky factor. Use of this
method is only sensible if a numeric factorization of
the input matrix was done beforehand.public long getNumberOfNonzeros()
long
value specifying the number of
nonzeros (including the diagonal) of the Cholesky
factor.public ComplexSparseCholesky.NumericFactor getNumericFactor()
NumericFactor
containing the numeric Cholesky factor.public int getNumericFactorizationMethod()
int
value equal to STANDARD_METHOD
= 0
or MULTIFRONTAL_METHOD
= 1 representing the method used in the
numeric factorization of the permuted input matrix. See
setNumericFactorizationMethod
for more details.public double getSmallestDiagonalElement()
double
value specifying the smallest
diagonal element of the Cholesky factor. Use of this
method is only sensible if a numeric factorization of
the input matrix was done beforehand.public ComplexSparseCholesky.SymbolicFactor getSymbolicFactor()
SymbolicFactor
containing the symbolic Cholesky factor.public void setNumericFactor(ComplexSparseCholesky.NumericFactor numericFactor)
numericFactor
- a NumericFactor
object containing
the numeric Cholesky factor. By default the numeric factorization is computed.public void setNumericFactorizationMethod(int method)
method
- an int
value specifying the method to choose:
Method Name |
Description |
STANDARD_METHOD |
standard method as described by George/Liu (1981). This is the default. |
MULTIFRONTAL_METHOD |
multifrontal method |
IllegalArgumentException
- This exception is thrown when the value for method is not
STANDARD_METHOD
or MULTIFRONTAL_METHOD
.public void setSymbolicFactor(ComplexSparseCholesky.SymbolicFactor symbolicFactor)
symbolicFactor
- a SymbolicFactor
containing the symbolic
Cholesky factor. By default the symbolic factorization is computed.public Complex[] solve(Complex[] b) throws ComplexSparseCholesky.NotSPDException
This method solves the linear system , where A is Hermitian positive definite. The solution is obtained in several steps:
By default this method implements all of the above steps. The factorizations are retained for later use by subsequent solves. By choosing appropriate methods within this class, the computation can be reduced to the solution of the system for a given or precomputed symbolic or numeric factor.
b
- A Complex
vector of length equal to the order
of A containing the right-hand side.
Complex
vector of length equal to the order of
matrix A containing the solution of the system
.
ComplexSparseCholesky.NotSPDException
- is thrown if the input matrix is not Hermitian, positive definite.
|
JMSLTM Numerical Library 5.0.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |