|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DirectSolver
Method Summary | |
---|---|
void |
analyze(Matrix M,
int size,
int type)
Performs prefactor analysis on a specified matrix. |
void |
analyzeAndFactor(Matrix M)
Factors a matrix. |
void |
autoFactorAndSolve(VectorNd x,
VectorNd b,
int tolExp)
Factors a previously analyzed matrix M and then solves the system |
void |
dispose()
Releases all internal resources allocated by this solver. |
void |
factor()
Factors a previously analyzed matrix. |
boolean |
hasAutoIterativeSolving()
Returns true if this solver supports automatic iterative solving using a recent directly-factored matrix as a preconditioner. |
void |
solve(VectorNd x,
VectorNd b)
Solves the system |
Method Detail |
---|
void analyze(Matrix M, int size, int type)
factor()
. If
size
is less than the actual matrix size, then the analysis
is done on the principal submatrix of M defined by the first
size
rows and columns.
M
- matrix to analyzesize
- size of the matrix to factor.type
- or-ed flags giving information about the matrix type. Typical flags are
SYMMETRIC
or
POSITIVE_DEFINITE
java.lang.IllegalArgumentException
- if the matrix is not square, or the matrix type is not supported by the
solver.
NumericException
- if the analysis failed for numeric reasons.void factor()
java.lang.IllegalStateException
- if no previous call to analyze
has been made.
NumericException
- if the factor failed for numeric reasons.void analyzeAndFactor(Matrix M)
analyze (M, M.rowSize(), 0) factor()
M
- matrix to factor
java.lang.IllegalArgumentException
- if the matrix is not square, or general matrices are not supported by the
solver.
NumericException
- if the analysis or factoring failed for numeric reasons.void solve(VectorNd x, VectorNd b)
M x = bwhere M was specified using previous calls to
analyze
or
factor
.
x
- vector in which result is returnedb
- right hand vector of matrix equation
java.lang.IllegalStateException
- if no previous call to analyze
or
factor
has been made.
NumericException
- if the solve failed for numeric reasons.void autoFactorAndSolve(VectorNd x, VectorNd b, int tolExp)
M x = bThis is equivalent to
factor() solve (x, b)but is included because it may be faster depending on the underlying implementation. If auto-iterative solving is available (as determined by
hasAutoIterativeSolving
), this method also
allows the solver to automatically employ iterative solving using a recent
direct factorization as a preconditioner. To enable auto-iterative
solving, the argument tolExp should be set to a positive value giving the
(negative) exponent of the desired relative residual.
x
- vector in which result is returnedb
- right hand vector of matrix equationtolExp
- if positive, enables auto-iterative solving with the specified value
giving the (negative) exponent of the desired relative residual.
NumericException
- if the factoring or solving failed for numeric reasonsboolean hasAutoIterativeSolving()
autoFactorAndSolve
method.
void dispose()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |