|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.math3.linear.IterativeLinearSolver
public abstract class IterativeLinearSolver
This abstract class defines an iterative solver for the linear system A · x = b. In what follows, the residual r is defined as r = b - A · x, where A is the linear operator of the linear system, b is the right-hand side vector, and x the current estimate of the solution.
| Constructor Summary | |
|---|---|
IterativeLinearSolver(int maxIterations)
Creates a new instance of this class, with default iteration manager. |
|
IterativeLinearSolver(IterationManager manager)
Creates a new instance of this class, with custom iteration manager. |
|
| Method Summary | |
|---|---|
protected static void |
checkParameters(RealLinearOperator a,
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. |
IterationManager |
getIterationManager()
Returns the iteration manager attached to this solver. |
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,
RealVector b,
RealVector x0)
Returns an estimate of the solution to the linear system A · x = b. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IterativeLinearSolver(int maxIterations)
maxIterations - the maximum number of iterations
public IterativeLinearSolver(IterationManager manager)
throws NullArgumentException
manager - the custom iteration manager
NullArgumentException - if manager is null| Method Detail |
|---|
protected static void checkParameters(RealLinearOperator a,
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 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 apublic IterationManager getIterationManager()
public RealVector solve(RealLinearOperator a,
RealVector b)
throws NullArgumentException,
NonSquareOperatorException,
DimensionMismatchException,
MaxCountExceededException
a - 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
a - 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
public abstract RealVector solveInPlace(RealLinearOperator a,
RealVector b,
RealVector x0)
throws NullArgumentException,
NonSquareOperatorException,
DimensionMismatchException,
MaxCountExceededException
a - 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 | |||||||||