org.apache.commons.math3.linear
Class SymmLQ.SymmLQEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.apache.commons.math3.util.IterationEvent
          extended by org.apache.commons.math3.linear.IterativeLinearSolverEvent
              extended by org.apache.commons.math3.linear.SymmLQ.SymmLQEvent
All Implemented Interfaces:
Serializable
Enclosing class:
SymmLQ

private static class SymmLQ.SymmLQEvent
extends IterativeLinearSolverEvent

The type of all events fired by this implementation of the SYMMLQ method.

Version:
$Id: SymmLQ.java 1295953 2012-03-01 22:30:26Z erans $

Field Summary
private static long serialVersionUID
          Identifier.
private  SymmLQ.State state
          A reference to the state of this solver.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
SymmLQ.SymmLQEvent(SymmLQ source, SymmLQ.State state)
          Creates a new instance of this class.
 
Method Summary
 int getIterations()
          Returns the number of iterations performed at the time this event is created.
 double getNormOfResidual()
          Returns the norm of the residual.
 RealVector getRightHandSideVector()
          Returns the current right-hand side of the linear system to be solved.
 RealVector getSolution()
          Returns the current estimate of the solution to the linear system to be solved.
 
Methods inherited from class org.apache.commons.math3.linear.IterativeLinearSolverEvent
getResidual, providesResidual
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Identifier.

See Also:
Constant Field Values

state

private final transient SymmLQ.State state
A reference to the state of this solver.

Constructor Detail

SymmLQ.SymmLQEvent

public SymmLQ.SymmLQEvent(SymmLQ source,
                          SymmLQ.State state)
Creates a new instance of this class.

Parameters:
source - the iterative algorithm on which the event initially occurred
state - the state of this solver at the time of creation
Method Detail

getIterations

public int getIterations()
Returns the number of iterations performed at the time this event is created.

Overrides:
getIterations in class IterationEvent
Returns:
the number of iterations performed

getNormOfResidual

public double getNormOfResidual()
Returns the norm of the residual. The returned value is not required to be exact. Instead, the norm of the so-called updated residual (if available) should be returned. For example, the 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).

Specified by:
getNormOfResidual in class IterativeLinearSolverEvent
Returns:
the norm of the residual, ||r||

getRightHandSideVector

public RealVector getRightHandSideVector()
Returns the current right-hand side of the linear system to be solved. This method should return an unmodifiable view, or a deep copy of the actual right-hand side vector, in order not to compromise subsequent iterations of the source IterativeLinearSolver.

Specified by:
getRightHandSideVector in class IterativeLinearSolverEvent
Returns:
the right-hand side vector, b

getSolution

public RealVector getSolution()
Returns the current estimate of the solution to the linear system to be solved. This method should return an unmodifiable view, or a deep copy of the actual current solution, in order not to compromise subsequent iterations of the source IterativeLinearSolver.

Specified by:
getSolution in class IterativeLinearSolverEvent
Returns:
the solution, x


Copyright (c) 2003-2013 Apache Software Foundation