Parallel Colt 0.7.2

cern.colt.matrix.tfloat.algo.solver
Class AbstractFloatIterationMonitor

java.lang.Object
  extended by cern.colt.matrix.tfloat.algo.solver.AbstractFloatIterationMonitor
All Implemented Interfaces:
FloatIterationMonitor
Direct Known Subclasses:
DefaultFloatIterationMonitor, HyBRFloatIterationMonitor

public abstract class AbstractFloatIterationMonitor
extends Object
implements FloatIterationMonitor

Partial implementation of an iteration reporter


Constructor Summary
AbstractFloatIterationMonitor()
          Constructor for AbstractIterationMonitor.
 
Method Summary
 boolean converged(float r)
          Checks for convergence
 boolean converged(float r, FloatMatrix1D x)
          Checks for convergence
 boolean converged(FloatMatrix1D r)
          Checks for convergence
 boolean converged(FloatMatrix1D r, FloatMatrix1D x)
          Checks for convergence
 FloatIterationReporter getIterationReporter()
          Returns current iteration reporter
 Norm getNormType()
          Returns the vector-norm in use
 boolean isFirst()
          Returns true for the first iteration
 int iterations()
          Number of iterations performed
 void next()
          Increases iteration counter
 float residual()
          Returns current residual
 void setFirst()
          Resets the iteration
 void setIterationReporter(FloatIterationReporter monitor)
          Sets new iteration reporter
 void setNormType(Norm normType)
          Sets the vector-norm to calculate with
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cern.colt.matrix.tfloat.algo.solver.FloatIterationMonitor
getMaxIterations, setMaxIterations
 

Constructor Detail

AbstractFloatIterationMonitor

public AbstractFloatIterationMonitor()
Constructor for AbstractIterationMonitor. Default norm is the 2-norm with no iteration reporting.

Method Detail

setFirst

public void setFirst()
Description copied from interface: FloatIterationMonitor
Resets the iteration

Specified by:
setFirst in interface FloatIterationMonitor

isFirst

public boolean isFirst()
Description copied from interface: FloatIterationMonitor
Returns true for the first iteration

Specified by:
isFirst in interface FloatIterationMonitor

next

public void next()
Description copied from interface: FloatIterationMonitor
Increases iteration counter

Specified by:
next in interface FloatIterationMonitor

iterations

public int iterations()
Description copied from interface: FloatIterationMonitor
Number of iterations performed

Specified by:
iterations in interface FloatIterationMonitor

converged

public boolean converged(FloatMatrix1D r,
                         FloatMatrix1D x)
                  throws IterativeSolverFloatNotConvergedException
Description copied from interface: FloatIterationMonitor
Checks for convergence

Specified by:
converged in interface FloatIterationMonitor
Parameters:
r - Residual-vector
x - State-vector
Returns:
True if converged
Throws:
IterativeSolverFloatNotConvergedException

converged

public boolean converged(float r,
                         FloatMatrix1D x)
                  throws IterativeSolverFloatNotConvergedException
Description copied from interface: FloatIterationMonitor
Checks for convergence

Specified by:
converged in interface FloatIterationMonitor
Parameters:
r - Residual-norm
x - State-vector
Returns:
True if converged
Throws:
IterativeSolverFloatNotConvergedException

converged

public boolean converged(float r)
                  throws IterativeSolverFloatNotConvergedException
Description copied from interface: FloatIterationMonitor
Checks for convergence

Specified by:
converged in interface FloatIterationMonitor
Parameters:
r - Residual-norm
Returns:
True if converged
Throws:
IterativeSolverFloatNotConvergedException

converged

public boolean converged(FloatMatrix1D r)
                  throws IterativeSolverFloatNotConvergedException
Description copied from interface: FloatIterationMonitor
Checks for convergence

Specified by:
converged in interface FloatIterationMonitor
Parameters:
r - Residual-vector
Returns:
True if converged
Throws:
IterativeSolverFloatNotConvergedException

getNormType

public Norm getNormType()
Description copied from interface: FloatIterationMonitor
Returns the vector-norm in use

Specified by:
getNormType in interface FloatIterationMonitor

setNormType

public void setNormType(Norm normType)
Description copied from interface: FloatIterationMonitor
Sets the vector-norm to calculate with

Specified by:
setNormType in interface FloatIterationMonitor

getIterationReporter

public FloatIterationReporter getIterationReporter()
Description copied from interface: FloatIterationMonitor
Returns current iteration reporter

Specified by:
getIterationReporter in interface FloatIterationMonitor

setIterationReporter

public void setIterationReporter(FloatIterationReporter monitor)
Description copied from interface: FloatIterationMonitor
Sets new iteration reporter

Specified by:
setIterationReporter in interface FloatIterationMonitor

residual

public float residual()
Description copied from interface: FloatIterationMonitor
Returns current residual

Specified by:
residual in interface FloatIterationMonitor

Parallel Colt 0.7.2

Jump to the Parallel Colt Homepage