EvolvingObjects
|
Counts the number of evaluations actually performed and throw an eoEvalFuncCounterBounderException when the maximum number of allowed evaluations is reached. More...
#include <eoEvalFuncCounterBounder.h>
Public Member Functions | |
eoEvalFuncCounterBounder (eoEvalFunc< EOT > &func, unsigned long threshold, std::string name="Eval. ") | |
virtual void | operator() (EOT &eo) |
The pure virtual function that needs to be implemented by the subclass. | |
Private Attributes | |
unsigned long | _threshold |
Counts the number of evaluations actually performed and throw an eoEvalFuncCounterBounderException when the maximum number of allowed evaluations is reached.
This eval counter permits to stop a search during a generation, without waiting for a continue to be checked at the end of the loop. Useful if you have 10 individuals and 10 generations, but want to stop after 95 evaluations.
Definition at line 38 of file eoEvalFuncCounterBounder.h.