Serializable
DefaultIterativeLinearSolverEvent
public abstract class IterativeLinearSolverEvent extends IterationEvent
IterativeLinearSolver
.source
Constructor | Description |
---|---|
IterativeLinearSolverEvent(Object source,
int iterations) |
Creates a new instance of this class.
|
Modifier and Type | Method | Description |
---|---|---|
abstract double |
getNormOfResidual() |
Returns the norm of the residual.
|
RealVector |
getResidual() |
Returns the residual.
|
abstract RealVector |
getRightHandSideVector() |
Returns the current right-hand side of the linear system to be solved.
|
abstract RealVector |
getSolution() |
Returns the current estimate of the solution to the linear system to be
solved.
|
boolean |
providesResidual() |
Returns
true if getResidual() is supported. |
getSource, toString
getIterations
public IterativeLinearSolverEvent(Object source, int iterations)
source
- the iterative algorithm on which the event initially
occurrediterations
- the number of iterations performed at the time
this
event is createdpublic abstract RealVector getRightHandSideVector()
IterativeLinearSolver
.public abstract double getNormOfResidual()
conjugate gradient
method computes a sequence
of residuals, the norm of which is cheap to compute. However, due to
accumulation of round-off errors, this residual might differ from the
true residual after some iterations. See e.g. A. Greenbaum and
Z. Strakos, Predicting the Behavior of Finite Precision Lanzos and
Conjugate Gradient Computations, Technical Report 538, Department of
Computer Science, New York University, 1991 (available
here).public RealVector getResidual()
Returns the residual. This is an optional operation, as all iterative linear solvers do not provide cheap estimate of the updated residual vector, in which case
MathRuntimeException
,providesResidual()
returns false
.
The default implementation throws a
MathRuntimeException
. If this method is overriden,
then providesResidual()
should be overriden as well.
public abstract RealVector getSolution()
IterativeLinearSolver
.public boolean providesResidual()
false
if getResidual()
throws a
MathRuntimeException
Copyright © 2016–2018 Hipparchus.org. All rights reserved.