cern.colt.matrix.tdouble.algo.solver
Class DefaultDoubleIterationMonitor
- java.lang.Object
-
- cern.colt.matrix.tdouble.algo.solver.AbstractDoubleIterationMonitor
-
- cern.colt.matrix.tdouble.algo.solver.DefaultDoubleIterationMonitor
-
- All Implemented Interfaces:
- DoubleIterationMonitor
- Direct Known Subclasses:
- CGLSDoubleIterationMonitor, MRNSDDoubleIterationMonitor
public class DefaultDoubleIterationMonitor extends AbstractDoubleIterationMonitor
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
Constructors Constructor and Description DefaultDoubleIterationMonitor()Constructor for DefaultIterationMonitor.DefaultDoubleIterationMonitor(int maxIter, double rtol, double atol, double dtol)Constructor for DefaultIterationMonitor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetAbsoluteTolerance()Returns the absolute convergence tolerancedoublegetDivergenceTolerance()Returns the relative divergence toleranceintgetMaxIterations()Returns maximum number of iterations to permitdoublegetRelativeTolerance()Returns the relative convergence tolerancevoidsetAbsoluteTolerance(double atol)Sets the absolute convergence tolerancevoidsetDivergenceTolerance(double dtol)Sets the relative divergence tolerancevoidsetMaxIterations(int maxIter)Sets maximum number of iterations to permitvoidsetRelativeTolerance(double rtol)Sets the relative convergence tolerance-
Methods inherited from class cern.colt.matrix.tdouble.algo.solver.AbstractDoubleIterationMonitor
converged, converged, converged, converged, getIterationReporter, getNormType, isFirst, iterations, next, residual, setFirst, setIterationReporter, setNormType
-
-
-
-
Constructor Detail
-
DefaultDoubleIterationMonitor
public DefaultDoubleIterationMonitor(int maxIter, double rtol, double atol, double dtol)Constructor for DefaultIterationMonitor- Parameters:
maxIter- Maximum number of iterationsrtol- Relative convergence tolerance (to initial residual)atol- Absolute convergence tolerancedtol- Relative divergence tolerance (to initial residual)
-
DefaultDoubleIterationMonitor
public DefaultDoubleIterationMonitor()
Constructor for DefaultIterationMonitor. Default is 100000 iterations at most, relative tolerance of 1e-5, absolute tolerance of 1e-50 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(double rtol)
Sets the relative convergence tolerance- Parameters:
rtol- relative convergence tolerance (to initial residual)
-
getRelativeTolerance
public double getRelativeTolerance()
Returns the relative convergence tolerance- Returns:
- relative convergence tolerance (to initial residual)
-
setAbsoluteTolerance
public void setAbsoluteTolerance(double atol)
Sets the absolute convergence tolerance- Parameters:
atol- absolute convergence tolerance
-
getAbsoluteTolerance
public double getAbsoluteTolerance()
Returns the absolute convergence tolerance- Returns:
- absolute convergence tolerance
-
setDivergenceTolerance
public void setDivergenceTolerance(double dtol)
Sets the relative divergence tolerance- Parameters:
dtol- relative divergence tolerance (to initial residual)
-
getDivergenceTolerance
public double getDivergenceTolerance()
Returns the relative divergence tolerance- Returns:
- relative divergence tolerance (to initial residual)
-
-
DMelt 3.0 © DataMelt by jWork.ORG