cern.colt.matrix.tdouble.algo.solver
Class AbstractDoubleIterationMonitor
- java.lang.Object
-
- cern.colt.matrix.tdouble.algo.solver.AbstractDoubleIterationMonitor
-
- All Implemented Interfaces:
- DoubleIterationMonitor
- Direct Known Subclasses:
- DefaultDoubleIterationMonitor, HyBRDoubleIterationMonitor
public abstract class AbstractDoubleIterationMonitor extends java.lang.Object implements DoubleIterationMonitor
Partial implementation of an iteration reporter
-
-
Constructor Summary
Constructors Constructor and Description AbstractDoubleIterationMonitor()Constructor for AbstractIterationMonitor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanconverged(double r)Checks for convergencebooleanconverged(double r, DoubleMatrix1D x)Checks for convergencebooleanconverged(DoubleMatrix1D r)Checks for convergencebooleanconverged(DoubleMatrix1D r, DoubleMatrix1D x)Checks for convergenceDoubleIterationReportergetIterationReporter()Returns current iteration reporterNormgetNormType()Returns the vector-norm in usebooleanisFirst()Returns true for the first iterationintiterations()Number of iterations performedvoidnext()Increases iteration counterdoubleresidual()Returns current residualvoidsetFirst()Resets the iterationvoidsetIterationReporter(DoubleIterationReporter monitor)Sets new iteration reportervoidsetNormType(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.tdouble.algo.solver.DoubleIterationMonitor
getMaxIterations, setMaxIterations
-
-
-
-
Constructor Detail
-
AbstractDoubleIterationMonitor
public AbstractDoubleIterationMonitor()
Constructor for AbstractIterationMonitor. Default norm is the 2-norm with no iteration reporting.
-
-
Method Detail
-
setFirst
public void setFirst()
Description copied from interface:DoubleIterationMonitorResets the iteration- Specified by:
setFirstin interfaceDoubleIterationMonitor
-
isFirst
public boolean isFirst()
Description copied from interface:DoubleIterationMonitorReturns true for the first iteration- Specified by:
isFirstin interfaceDoubleIterationMonitor
-
next
public void next()
Description copied from interface:DoubleIterationMonitorIncreases iteration counter- Specified by:
nextin interfaceDoubleIterationMonitor
-
iterations
public int iterations()
Description copied from interface:DoubleIterationMonitorNumber of iterations performed- Specified by:
iterationsin interfaceDoubleIterationMonitor
-
converged
public boolean converged(DoubleMatrix1D r, DoubleMatrix1D x) throws IterativeSolverDoubleNotConvergedException
Description copied from interface:DoubleIterationMonitorChecks for convergence- Specified by:
convergedin interfaceDoubleIterationMonitor- Parameters:
r- Residual-vectorx- State-vector- Returns:
- True if converged
- Throws:
IterativeSolverDoubleNotConvergedException
-
converged
public boolean converged(double r, DoubleMatrix1D x) throws IterativeSolverDoubleNotConvergedExceptionDescription copied from interface:DoubleIterationMonitorChecks for convergence- Specified by:
convergedin interfaceDoubleIterationMonitor- Parameters:
r- Residual-normx- State-vector- Returns:
- True if converged
- Throws:
IterativeSolverDoubleNotConvergedException
-
converged
public boolean converged(double r) throws IterativeSolverDoubleNotConvergedExceptionDescription copied from interface:DoubleIterationMonitorChecks for convergence- Specified by:
convergedin interfaceDoubleIterationMonitor- Parameters:
r- Residual-norm- Returns:
- True if converged
- Throws:
IterativeSolverDoubleNotConvergedException
-
converged
public boolean converged(DoubleMatrix1D r) throws IterativeSolverDoubleNotConvergedException
Description copied from interface:DoubleIterationMonitorChecks for convergence- Specified by:
convergedin interfaceDoubleIterationMonitor- Parameters:
r- Residual-vector- Returns:
- True if converged
- Throws:
IterativeSolverDoubleNotConvergedException
-
getNormType
public Norm getNormType()
Description copied from interface:DoubleIterationMonitorReturns the vector-norm in use- Specified by:
getNormTypein interfaceDoubleIterationMonitor
-
setNormType
public void setNormType(Norm normType)
Description copied from interface:DoubleIterationMonitorSets the vector-norm to calculate with- Specified by:
setNormTypein interfaceDoubleIterationMonitor
-
getIterationReporter
public DoubleIterationReporter getIterationReporter()
Description copied from interface:DoubleIterationMonitorReturns current iteration reporter- Specified by:
getIterationReporterin interfaceDoubleIterationMonitor
-
setIterationReporter
public void setIterationReporter(DoubleIterationReporter monitor)
Description copied from interface:DoubleIterationMonitorSets new iteration reporter- Specified by:
setIterationReporterin interfaceDoubleIterationMonitor
-
residual
public double residual()
Description copied from interface:DoubleIterationMonitorReturns current residual- Specified by:
residualin interfaceDoubleIterationMonitor
-
-
DMelt 3.0 © DataMelt by jWork.ORG