bpp-core3  3.0.0
bpp::AbstractOptimizationStopCondition Class Referenceabstract

Partial implementation of the OptimizationStopCondition interface. More...

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

+ Inheritance diagram for bpp::AbstractOptimizationStopCondition:
+ Collaboration diagram for bpp::AbstractOptimizationStopCondition:

Public Member Functions

 AbstractOptimizationStopCondition (const OptimizerInterface *optimizer)
 
 AbstractOptimizationStopCondition (const OptimizerInterface *optimizer, double tolerance)
 
 AbstractOptimizationStopCondition (const OptimizerInterface *optimizer, int burnin)
 
 AbstractOptimizationStopCondition (const OptimizerInterface *optimizer, double tolerance, int burnin)
 
 AbstractOptimizationStopCondition (const AbstractOptimizationStopCondition &aosc)
 
AbstractOptimizationStopConditionoperator= (const AbstractOptimizationStopCondition &aosc)
 
virtual ~AbstractOptimizationStopCondition ()
 
const OptimizerInterfacegetOptimizer () const
 
void setOptimizer (const OptimizerInterface *optimizer)
 Set the optimizer attached to this instance. More...
 
void setTolerance (double tolerance)
 Set the tolerance parameter. More...
 
double getTolerance () const
 Get the tolerance parameter. More...
 
void init ()
 Initialize the condition. More...
 
virtual void resetCounter ()
 
virtual void setBurnin (int burnin)
 
virtual int getBurnin () const
 
OptimizationStopConditionclone () const =0
 Create a copy of this object and send a pointer to it. More...
 
virtual bool isToleranceReached () const =0
 Tell if the we reached the desired tolerance with a given new set of estimates. More...
 
virtual double getCurrentTolerance () const =0
 Get the current tolerance. More...
 

Protected Attributes

const OptimizerInterfaceoptimizer_
 
double tolerance_
 
double callCount_
 Count the number of times the isToleranceReached() function has been called. More...
 
int burnin_
 

Detailed Description

Partial implementation of the OptimizationStopCondition interface.

This class provides:

  • A pointer toward the Optimizer this objet deals with,
  • A tolerance value,
  • A counter of the number of calls toward the isToleranceReached() function,
  • A burnin function, that prohibe the optimization to stop prematurely.

Definition at line 105 of file OptimizationStopCondition.h.

Constructor & Destructor Documentation

◆ AbstractOptimizationStopCondition() [1/5]

bpp::AbstractOptimizationStopCondition::AbstractOptimizationStopCondition ( const OptimizerInterface optimizer)
inline

Definition at line 121 of file OptimizationStopCondition.h.

◆ AbstractOptimizationStopCondition() [2/5]

bpp::AbstractOptimizationStopCondition::AbstractOptimizationStopCondition ( const OptimizerInterface optimizer,
double  tolerance 
)
inline

Definition at line 127 of file OptimizationStopCondition.h.

◆ AbstractOptimizationStopCondition() [3/5]

bpp::AbstractOptimizationStopCondition::AbstractOptimizationStopCondition ( const OptimizerInterface optimizer,
int  burnin 
)
inline

Definition at line 133 of file OptimizationStopCondition.h.

◆ AbstractOptimizationStopCondition() [4/5]

bpp::AbstractOptimizationStopCondition::AbstractOptimizationStopCondition ( const OptimizerInterface optimizer,
double  tolerance,
int  burnin 
)
inline

Definition at line 139 of file OptimizationStopCondition.h.

◆ AbstractOptimizationStopCondition() [5/5]

bpp::AbstractOptimizationStopCondition::AbstractOptimizationStopCondition ( const AbstractOptimizationStopCondition aosc)
inline

Definition at line 145 of file OptimizationStopCondition.h.

◆ ~AbstractOptimizationStopCondition()

virtual bpp::AbstractOptimizationStopCondition::~AbstractOptimizationStopCondition ( )
inlinevirtual

Definition at line 160 of file OptimizationStopCondition.h.

Member Function Documentation

◆ clone()

OptimizationStopCondition* bpp::OptimizationStopCondition::clone ( ) const
pure virtualinherited

◆ getBurnin()

virtual int bpp::AbstractOptimizationStopCondition::getBurnin ( ) const
inlinevirtual

Definition at line 177 of file OptimizationStopCondition.h.

◆ getCurrentTolerance()

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

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::FunctionStopCondition, bpp::ParametersStopCondition, bpp::NewtonBacktrackOneDimension::NBODStopCondition, bpp::DownhillSimplexMethod::DSMStopCondition, bpp::BrentOneDimension::BODStopCondition, bpp::GoldenSectionSearch::GSSStopCondition, and bpp::PowellMultiDimensions::PMDStopCondition.

◆ getOptimizer()

const OptimizerInterface* bpp::AbstractOptimizationStopCondition::getOptimizer ( ) const
inlinevirtual
Returns
The optimizer to which this instance belongs to.

Implements bpp::OptimizationStopCondition.

Definition at line 163 of file OptimizationStopCondition.h.

◆ getTolerance()

double bpp::AbstractOptimizationStopCondition::getTolerance ( ) const
inlinevirtual

Get the tolerance parameter.

Returns
The tolerance parameter.

Implements bpp::OptimizationStopCondition.

Definition at line 169 of file OptimizationStopCondition.h.

Referenced by bpp::GoldenSectionSearch::GSSStopCondition::isToleranceReached().

◆ init()

void bpp::AbstractOptimizationStopCondition::init ( )
inlinevirtual

◆ isToleranceReached()

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

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::FunctionStopCondition, bpp::ParametersStopCondition, bpp::NewtonBacktrackOneDimension::NBODStopCondition, bpp::DownhillSimplexMethod::DSMStopCondition, bpp::BrentOneDimension::BODStopCondition, bpp::GoldenSectionSearch::GSSStopCondition, and bpp::PowellMultiDimensions::PMDStopCondition.

◆ operator=()

AbstractOptimizationStopCondition& bpp::AbstractOptimizationStopCondition::operator= ( const AbstractOptimizationStopCondition aosc)
inline

Definition at line 151 of file OptimizationStopCondition.h.

References burnin_, callCount_, optimizer_, and tolerance_.

◆ resetCounter()

virtual void bpp::AbstractOptimizationStopCondition::resetCounter ( )
inlinevirtual

Definition at line 173 of file OptimizationStopCondition.h.

◆ setBurnin()

virtual void bpp::AbstractOptimizationStopCondition::setBurnin ( int  burnin)
inlinevirtual

Definition at line 175 of file OptimizationStopCondition.h.

◆ setOptimizer()

void bpp::AbstractOptimizationStopCondition::setOptimizer ( const OptimizerInterface optimizer)
inlinevirtual

Set the optimizer attached to this instance.

Parameters
optimizerThe optimizer to which this instance belongs to.

Implements bpp::OptimizationStopCondition.

Definition at line 165 of file OptimizationStopCondition.h.

◆ setTolerance()

void bpp::AbstractOptimizationStopCondition::setTolerance ( double  tolerance)
inlinevirtual

Set the tolerance parameter.

Parameters
toleranceThe tolerance parameter.

Implements bpp::OptimizationStopCondition.

Definition at line 167 of file OptimizationStopCondition.h.

Member Data Documentation

◆ burnin_

◆ callCount_

◆ optimizer_

◆ tolerance_


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