Parallel Colt 0.7.2

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

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

public class DefaultFloatIterationMonitor
extends AbstractFloatIterationMonitor

Default iteration monitor. This tester checks declares convergence if the absolute value of the residual norm is sufficiently small, or if the relative decrease is small. Divergence is decleared if too many iterations are spent, or the residual has grown too much. NaNs will also cause divergence to be flagged.


Constructor Summary
DefaultFloatIterationMonitor()
          Constructor for DefaultIterationMonitor.
DefaultFloatIterationMonitor(int maxIter, float rtol, float atol, float dtol)
          Constructor for DefaultIterationMonitor
 
Method Summary
 float getAbsoluteTolerance()
          Returns the absolute convergence tolerance
 float getDivergenceTolerance()
          Returns the relative divergence tolerance
 int getMaxIterations()
          Returns maximum number of iterations to permit
 float getRelativeTolerance()
          Returns the relative convergence tolerance
 void setAbsoluteTolerance(float atol)
          Sets the absolute convergence tolerance
 void setDivergenceTolerance(float dtol)
          Sets the relative divergence tolerance
 void setMaxIterations(int maxIter)
          Sets maximum number of iterations to permit
 void setRelativeTolerance(float rtol)
          Sets the relative convergence tolerance
 
Methods inherited from class cern.colt.matrix.tfloat.algo.solver.AbstractFloatIterationMonitor
converged, converged, converged, converged, getIterationReporter, getNormType, isFirst, iterations, next, residual, setFirst, setIterationReporter, setNormType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFloatIterationMonitor

public DefaultFloatIterationMonitor(int maxIter,
                                    float rtol,
                                    float atol,
                                    float dtol)
Constructor for DefaultIterationMonitor

Parameters:
maxIter - Maximum number of iterations
rtol - Relative convergence tolerance (to initial residual)
atol - Absolute convergence tolerance
dtol - Relative divergence tolerance (to initial residual)

DefaultFloatIterationMonitor

public DefaultFloatIterationMonitor()
Constructor for DefaultIterationMonitor. Default is 100000 iterations at most, relative tolerance of 1e-5, absolute tolerance of 1e-25 and a divergence tolerance of 1e+5.

Method Detail

setMaxIterations

public void setMaxIterations(int maxIter)
Sets maximum number of iterations to permit

Parameters:
maxIter - Maximum number of iterations

getMaxIterations

public int getMaxIterations()
Returns maximum number of iterations to permit


setRelativeTolerance

public void setRelativeTolerance(float rtol)
Sets the relative convergence tolerance

Parameters:
rtol - relative convergence tolerance (to initial residual)

getRelativeTolerance

public float getRelativeTolerance()
Returns the relative convergence tolerance

Returns:
relative convergence tolerance (to initial residual)

setAbsoluteTolerance

public void setAbsoluteTolerance(float atol)
Sets the absolute convergence tolerance

Parameters:
atol - absolute convergence tolerance

getAbsoluteTolerance

public float getAbsoluteTolerance()
Returns the absolute convergence tolerance

Returns:
absolute convergence tolerance

setDivergenceTolerance

public void setDivergenceTolerance(float dtol)
Sets the relative divergence tolerance

Parameters:
dtol - relative divergence tolerance (to initial residual)

getDivergenceTolerance

public float getDivergenceTolerance()
Returns the relative divergence tolerance

Returns:
relative divergence tolerance (to initial residual)

Parallel Colt 0.7.2

Jump to the Parallel Colt Homepage