Public Member Functions | Protected Member Functions | List of all members
mirtk::StoppingCriterion Class Referenceabstract

#include <StoppingCriterion.h>

Inheritance diagram for mirtk::StoppingCriterion:
Inheritance graph
Collaboration diagram for mirtk::StoppingCriterion:
Collaboration graph

Public Member Functions

virtual bool Fulfilled (int iter, double value, const double *delta)=0
 
virtual void Initialize ()
 Initialize stopping criterion after input and parameters are set.
 
virtual StoppingCriterionNew () const =0
 Create new copy of this instance.
 
virtual void Print (ostream &) const
 
virtual ~StoppingCriterion ()
 Destructor.
 
- Public Member Functions inherited from mirtk::Object
virtual const char * NameOfClass () const =0
 Get name of class, which this object is an instance of.
 
virtual ParameterList Parameter () const
 Get parameter name/value pairs.
 
bool Parameter (const ParameterList &)
 Set parameters from name/value pairs.
 
virtual bool Set (const char *name, const char *value)
 
virtual ~Object ()
 Destructor.
 

Protected Member Functions

StoppingCriterionoperator= (const StoppingCriterion &)
 Assignment operator.
 
 StoppingCriterion (const ObjectiveFunction *=NULL)
 Constructor.
 
 StoppingCriterion (const LocalOptimizer *)
 Constructor.
 
 StoppingCriterion (const StoppingCriterion &)
 Copy constructor.
 
- Protected Member Functions inherited from mirtk::Object
template<typename... Args>
void Throw (ErrorType err, const char *func, Args... args) const
 

Additional Inherited Members

- Static Public Member Functions inherited from mirtk::Object
static const char * NameOfType ()
 Get name of this class type.
 
- Static Protected Member Functions inherited from mirtk::Object
template<typename... Args>
static void ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args)
 

Detailed Description

Stopping criterion for iterative optimization

Definition at line 37 of file StoppingCriterion.h.

Member Function Documentation

§ Fulfilled()

virtual bool mirtk::StoppingCriterion::Fulfilled ( int  iter,
double  value,
const double *  delta 
)
pure virtual

Test stopping criterion

The objective function must be up-to-date when this function is called. This is usually the case anyway because the current objective function value after a change of the parameters must be evaluated before this function is called to be able to provide this value as argument.

Note
The objective function value may be infinite in case of a non-parametric deformable surface model. In this case, stopping criteria are based only on the current surface geometry or last node displacements. Stopping criteria based on the objective function value should never be fulfilled in this case and always return false.
Parameters
[in]iterCurrent number of iterations.
[in]valueObjective function value at current iteration.
[in]deltaLast change of objective function parameters.
Returns
Whether stopping criterion is fulfilled.

Implemented in mirtk::MinActiveStoppingCriterion, mirtk::InflationStoppingCriterion, and mirtk::EnergyThreshold.

§ Print()

virtual void mirtk::StoppingCriterion::Print ( ostream &  ) const
virtual

Print current stopping criterion status / value

This function must be called after Fulfilled, which should update any cached values that are needed by this function to avoid a costly reevaluation of the stopping criterion.

Note
The printed string is expected to be considerably short and must not end with a newline or space characters.

Reimplemented in mirtk::MinActiveStoppingCriterion, mirtk::InflationStoppingCriterion, and mirtk::EnergyThreshold.


The documentation for this class was generated from the following file: