public abstract class IterativeLinearSolverEvent extends IterationEvent
IterativeLinearSolver
.source
Constructor and Description |
---|
IterativeLinearSolverEvent(Object source,
int iterations)
Creates a new instance of this class.
|
Modifier and Type | Method and 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. |
getIterations
getSource, toString
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
MathUnsupportedOperationException
,providesResidual()
returns false
.
The default implementation throws a
MathUnsupportedOperationException
. 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
MathUnsupportedOperationException
Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.