bpp-core  2.2.0
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
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 67 of file OptimizationStopCondition.h.

Constructor & Destructor Documentation

bpp::OptimizationStopCondition::OptimizationStopCondition ( )
inline

Definition at line 71 of file OptimizationStopCondition.h.

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

Definition at line 72 of file OptimizationStopCondition.h.

Member Function Documentation

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

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

Implemented in bpp::AbstractOptimizationStopCondition.

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

Get the tolerance parameter.

Returns
The tolerance parameter.

Implemented in bpp::AbstractOptimizationStopCondition.

Referenced by bpp::BrentOneDimension::doStep(), and bpp::MetaOptimizer::doStep().

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

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

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=().

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

Set the tolerance parameter.

Parameters
toleranceThe tolerance parameter.

Implemented in bpp::AbstractOptimizationStopCondition.

Referenced by bpp::MetaOptimizer::doStep(), bpp::OneDimensionOptimizationTools::lineMinimization(), and bpp::OneDimensionOptimizationTools::lineSearch().


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