|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.math3.linear.IterativeLinearSolver
org.apache.commons.math3.linear.PreconditionedIterativeLinearSolver
public abstract class PreconditionedIterativeLinearSolver
This abstract class defines preconditioned iterative solvers. When A is ill-conditioned, instead of solving system A · x = b directly, it is preferable to solve either
Concrete implementations of this abstract class must be provided with the
preconditioner M, as a RealLinearOperator.
| Constructor Summary | |
|---|---|
PreconditionedIterativeLinearSolver(int maxIterations)
Creates a new instance of this class, with default iteration manager. |
|
PreconditionedIterativeLinearSolver(IterationManager manager)
Creates a new instance of this class, with custom iteration manager. |
|
| Method Summary | |
|---|---|
protected static void |
checkParameters(RealLinearOperator a,
RealLinearOperator m,
RealVector b,
RealVector x0)
Performs all dimension checks on the parameters of solve
and
solveInPlace,
and throws an exception if one of the checks fails. |
RealVector |
solve(RealLinearOperator a,
RealLinearOperator m,
RealVector b)
Returns an estimate of the solution to the linear system A · x = b. |
RealVector |
solve(RealLinearOperator a,
RealLinearOperator m,
RealVector b,
RealVector x0)
Returns an estimate of the solution to the linear system A · x = b. |
RealVector |
solve(RealLinearOperator a,
RealVector b)
Returns an estimate of the solution to the linear system A · x = b. |
RealVector |
solve(RealLinearOperator a,
RealVector b,
RealVector x0)
Returns an estimate of the solution to the linear system A · x = b. |
abstract RealVector |
solveInPlace(RealLinearOperator a,
RealLinearOperator m,
RealVector b,
RealVector x0)
Returns an estimate of the solution to the linear system A · x = b. |
RealVector |
solveInPlace(RealLinearOperator a,
RealVector b,
RealVector x0)
Returns an estimate of the solution to the linear system A · x = b. |
| Methods inherited from class org.apache.commons.math3.linear.IterativeLinearSolver |
|---|
checkParameters, getIterationManager |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PreconditionedIterativeLinearSolver(int maxIterations)
maxIterations - the maximum number of iterations
public PreconditionedIterativeLinearSolver(IterationManager manager)
throws NullArgumentException
manager - the custom iteration manager
NullArgumentException - if manager is null| Method Detail |
|---|
public RealVector solve(RealLinearOperator a,
RealLinearOperator m,
RealVector b,
RealVector x0)
throws NullArgumentException,
NonSquareOperatorException,
DimensionMismatchException,
MaxCountExceededException
a - the linear operator A of the systemm - the preconditioner, M (can be null)b - the right-hand side vectorx0 - the initial guess of the solution
NullArgumentException - if one of the parameters is null
NonSquareOperatorException - if a or m is not
square
DimensionMismatchException - if m, b or
x0 have dimensions inconsistent with a
MaxCountExceededException - at exhaustion of the iteration count,
unless a custom
callback
has been set at construction of the IterationManager
public RealVector solve(RealLinearOperator a,
RealVector b)
throws NullArgumentException,
NonSquareOperatorException,
DimensionMismatchException,
MaxCountExceededException
solve in class IterativeLinearSolvera - the linear operator A of the systemb - the right-hand side vector
NullArgumentException - if one of the parameters is null
NonSquareOperatorException - if a is not square
DimensionMismatchException - if b has dimensions
inconsistent with a
MaxCountExceededException - at exhaustion of the iteration count,
unless a custom
callback
has been set at construction of the IterationManager
public RealVector solve(RealLinearOperator a,
RealVector b,
RealVector x0)
throws NullArgumentException,
NonSquareOperatorException,
DimensionMismatchException,
MaxCountExceededException
solve in class IterativeLinearSolvera - the linear operator A of the systemb - the right-hand side vectorx0 - the initial guess of the solution
NullArgumentException - if one of the parameters is null
NonSquareOperatorException - if a is not square
DimensionMismatchException - if b or x0 have
dimensions inconsistent with a
MaxCountExceededException - at exhaustion of the iteration count,
unless a custom
callback
has been set at construction of the IterationManager
protected static void checkParameters(RealLinearOperator a,
RealLinearOperator m,
RealVector b,
RealVector x0)
throws NullArgumentException,
NonSquareOperatorException,
DimensionMismatchException
solve
and
solveInPlace,
and throws an exception if one of the checks fails.
a - the linear operator A of the systemm - the preconditioner, M (can be null)b - the right-hand side vectorx0 - the initial guess of the solution
NullArgumentException - if one of the parameters is null
NonSquareOperatorException - if a or m is not
square
DimensionMismatchException - if m, b or
x0 have dimensions inconsistent with a
public RealVector solve(RealLinearOperator a,
RealLinearOperator m,
RealVector b)
throws NullArgumentException,
NonSquareOperatorException,
DimensionMismatchException,
MaxCountExceededException
a - the linear operator A of the systemm - the preconditioner, M (can be null)b - the right-hand side vector
NullArgumentException - if one of the parameters is null
NonSquareOperatorException - if a or m is not
square
DimensionMismatchException - if m or b have
dimensions inconsistent with a
MaxCountExceededException - at exhaustion of the iteration count,
unless a custom
callback
has been set at construction of the IterationManager
public abstract RealVector solveInPlace(RealLinearOperator a,
RealLinearOperator m,
RealVector b,
RealVector x0)
throws NullArgumentException,
NonSquareOperatorException,
DimensionMismatchException,
MaxCountExceededException
a - the linear operator A of the systemm - the preconditioner, M (can be null)b - the right-hand side vectorx0 - the initial guess of the solution
x0 (shallow copy) updated with the
solution
NullArgumentException - if one of the parameters is null
NonSquareOperatorException - if a or m is not
square
DimensionMismatchException - if m, b or
x0 have dimensions inconsistent with a
MaxCountExceededException - at exhaustion of the iteration count,
unless a custom
callback
has been set at construction of the IterationManager
public RealVector solveInPlace(RealLinearOperator a,
RealVector b,
RealVector x0)
throws NullArgumentException,
NonSquareOperatorException,
DimensionMismatchException,
MaxCountExceededException
solveInPlace in class IterativeLinearSolvera - the linear operator A of the systemb - the right-hand side vectorx0 - initial guess of the solution
x0 (shallow copy) updated with the
solution
NullArgumentException - if one of the parameters is null
NonSquareOperatorException - if a is not square
DimensionMismatchException - if b or x0 have
dimensions inconsistent with a
MaxCountExceededException - at exhaustion of the iteration count,
unless a custom
callback
has been set at construction of the IterationManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||