|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.math.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 IterationManager 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 - Maximum number of iterations.
public IterativeLinearSolver(IterationManager manager)
throws NullArgumentException
manager - 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 - Linear operator A of the system.b - Right-hand side vector.x0 - 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.public IterationManager getIterationManager()
IterationManager attached to this solver.
public RealVector solve(RealLinearOperator a,
RealVector b)
throws NullArgumentException,
NonSquareOperatorException,
DimensionMismatchException,
MaxCountExceededException
a - Linear operator A of the system.b - 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.
public RealVector solve(RealLinearOperator a,
RealVector b,
RealVector x0)
throws NullArgumentException,
NonSquareOperatorException,
DimensionMismatchException,
MaxCountExceededException
a - Linear operator A of the system.b - Right-hand side vector.x0 - 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.
public abstract RealVector solveInPlace(RealLinearOperator a,
RealVector b,
RealVector x0)
throws NullArgumentException,
NonSquareOperatorException,
DimensionMismatchException,
MaxCountExceededException
a - Linear operator A of the system.b - Right-hand side vector.x0 - 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||