bpp-core3  3.0.0
bpp::OptimizationStopCondition Class Referenceabstract

Interface for otimization stop condition objet. More...

#include <Bpp/Numeric/Function/OptimizationStopCondition.h>

+ Inheritance diagram for bpp::OptimizationStopCondition:
+ Collaboration diagram for bpp::OptimizationStopCondition:

Public Member Functions

 OptimizationStopCondition ()
 
virtual ~OptimizationStopCondition ()
 
OptimizationStopConditionclone () const =0
 Create a copy of this object and send a pointer to it. More...
 
virtual const OptimizergetOptimizer () const =0
 
virtual void setOptimizer (const Optimizer *optimizer)=0
 Set the optimizer attached to this instance. More...
 
virtual void init ()=0
 Initialize the condition. More...
 
virtual bool isToleranceReached () const =0
 Tell if the we reached the desired tolerance with a given new set of estimates. More...
 
virtual void setTolerance (double tolerance)=0
 Set the tolerance parameter. More...
 
virtual double getTolerance () const =0
 Get the tolerance parameter. More...
 
virtual double getCurrentTolerance () const =0
 Get the current tolerance. More...
 

Detailed Description

Interface for otimization stop condition objet.

Classes implementing the OptimizationStopCondition interface provides the isToleranceReached() function that tells when the optimization process reached a given tolerance parameter. This parameter may be set or retrieve using the setTolerance() and getTolerance() functions.

OptimizationStopCondition implementations may be general and work on parameter (

See also
ParametersStopCondition) or function (
FunctionStopCondition) values, or be specific to a given optimization method.

Definition at line 68 of file OptimizationStopCondition.h.

Constructor & Destructor Documentation

◆ OptimizationStopCondition()

bpp::OptimizationStopCondition::OptimizationStopCondition ( )
inline

Definition at line 72 of file OptimizationStopCondition.h.

◆ ~OptimizationStopCondition()

virtual bpp::OptimizationStopCondition::~OptimizationStopCondition ( )
inlinevirtual

Definition at line 73 of file OptimizationStopCondition.h.

Member Function Documentation

◆ clone()

◆ getCurrentTolerance()

virtual double bpp::OptimizationStopCondition::getCurrentTolerance ( ) const
pure virtual

Get the current tolerance.

This is computed from the last check performed. Initially, it is equal to the tolerance parameter.

Returns
The current tolerance achieved.

Implemented in bpp::PowellMultiDimensions::PMDStopCondition, bpp::FunctionStopCondition, bpp::ParametersStopCondition, bpp::NewtonBacktrackOneDimension::NBODStopCondition, bpp::GoldenSectionSearch::GSSStopCondition, bpp::DownhillSimplexMethod::DSMStopCondition, and bpp::BrentOneDimension::BODStopCondition.

◆ getOptimizer()

virtual const Optimizer* bpp::OptimizationStopCondition::getOptimizer ( ) const
pure virtual
Returns
The optimizer to which this instance belongs to.

Implemented in bpp::AbstractOptimizationStopCondition.

◆ getTolerance()

virtual double bpp::OptimizationStopCondition::getTolerance ( ) const
pure virtual

◆ init()

◆ isToleranceReached()

virtual bool bpp::OptimizationStopCondition::isToleranceReached ( ) const
pure virtual

Tell if the we reached the desired tolerance with a given new set of estimates.

The new parameter list is compared to the last estimates, and the lastParameterEstimates list is actulaized with the newParameters list.

Returns
True if the tolerance level is reached.

Implemented in bpp::PowellMultiDimensions::PMDStopCondition, bpp::FunctionStopCondition, bpp::ParametersStopCondition, bpp::NewtonBacktrackOneDimension::NBODStopCondition, bpp::GoldenSectionSearch::GSSStopCondition, bpp::DownhillSimplexMethod::DSMStopCondition, and bpp::BrentOneDimension::BODStopCondition.

Referenced by bpp::GoldenSectionSearch::doStep(), and bpp::AbstractOptimizer::step().

◆ setOptimizer()

virtual void bpp::OptimizationStopCondition::setOptimizer ( const Optimizer optimizer)
pure virtual

Set the optimizer attached to this instance.

Parameters
optimizerThe optimizer to which this instance belongs to.

Implemented in bpp::AbstractOptimizationStopCondition.

Referenced by bpp::AbstractOptimizer::AbstractOptimizer(), and bpp::AbstractOptimizer::operator=().

◆ setTolerance()

virtual void bpp::OptimizationStopCondition::setTolerance ( double  tolerance)
pure virtual

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