libcmaes
A C++11 library for stochastic optimization with CMA-ES
 All Classes Namespaces Functions Variables Typedefs
Public Member Functions | Friends | List of all members
libcmaes::CMAStopCriteria< TGenoPheno > Class Template Reference

CMA-ES termination criteria, see reference paper in cmastrategy.h. More...

#include <cmastopcriteria.h>

Public Member Functions

 CMAStopCriteria ()
 Constructor: instanciates a predefined set of termination criteria tests, see reference paper in cmastrategy.h.
 
int stop (const CMAParameters< TGenoPheno > &cmap, const CMASolutions &cmas) const
 Termination criteria evaluation: the function iterates and evaluates the predefined criteria. More...
 
int set_criteria_active (const int &c, const bool &active)
 activates / deactivates a stopping criteria More...
 

Friends

class CMASolutions
 

Detailed Description

template<class TGenoPheno = NoBoundStrategy>
class libcmaes::CMAStopCriteria< TGenoPheno >

CMA-ES termination criteria, see reference paper in cmastrategy.h.

Member Function Documentation

template<class TGenoPheno >
int libcmaes::CMAStopCriteria< TGenoPheno >::set_criteria_active ( const int &  c,
const bool &  active 
)

activates / deactivates a stopping criteria

Parameters
cthe criteria to modify
trueto activate, false to deactivate
Returns
1 if criteria cannot be found, 0 otherwise
template<class TGenoPheno >
int libcmaes::CMAStopCriteria< TGenoPheno >::stop ( const CMAParameters< TGenoPheno > &  cmap,
const CMASolutions cmas 
) const

Termination criteria evaluation: the function iterates and evaluates the predefined criteria.

Returns
0 if no termination criteria triggers, the termination code otherwise (< 0 for an error, > 1 for a partial success).

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