Allow to control the stopping criterion. More...
#include <running.h>
Inherits IReset, and realea::IFinish.
Public Member Functions | |
void | increm (void) |
void | reset (void) |
Running (OptimeCriterion *isOptime) | |
void | setMaxEval (unsigned int maxEval) |
Running * | getSubRunning (unsigned submaxeval) |
unsigned int | maxEval (void) |
bool | isFinish (void) |
double | ratio () |
bool | isOptime (double fitness) |
void | setThreshold (double dif) |
unsigned int | numEval (void) |
double | getThreshold (void) |
unsigned | pending (void) |
void | notifyEval (double fit) |
bool | hasFoundOptime (void) |
Allow to control the stopping criterion.
It detect if the algorithm must stop, or because the maximum evaluation number is achieved or because the difference between the current solution and optimum is < threshold
Definition at line 146 of file running.h.
Running::Running | ( | OptimeCriterion * | isOptime | ) |
RunningPtr Running::getSubRunning | ( | unsigned | submaxeval | ) |
Return a new subrunning (to let algorithm that uses anothers)
submaxeval | maxeval of the new running returning |
Definition at line 160 of file running.cc.
double Running::getThreshold | ( | void | ) |
Definition at line 135 of file running.cc.
bool realea::Running::hasFoundOptime | ( | void | ) | [inline] |
void Running::increm | ( | void | ) |
Increment the evaluation number
Definition at line 48 of file running.cc.
bool Running::isFinish | ( | void | ) |
Definition at line 96 of file running.cc.
bool Running::isOptime | ( | double | fitness | ) |
Check if the fitness is too close to optimum
fitness | fitness of current solution |
Definition at line 85 of file running.cc.
unsigned int Running::maxEval | ( | void | ) |
Definition at line 81 of file running.cc.
void Running::notifyEval | ( | double | fit | ) |
It is notify when a new chromosome is evaluated
fit | new fitness obtained. |
Definition at line 143 of file running.cc.
unsigned int Running::numEval | ( | void | ) |
Definition at line 122 of file running.cc.
unsigned realea::Running::pending | ( | void | ) | [inline] |
double Running::ratio | ( | void | ) |
Set the ratio of maximum evaluation done
Definition at line 113 of file running.cc.
void Running::reset | ( | void | ) |
Reset the counting (for restart the experimentation)
Definition at line 62 of file running.cc.
void Running::setMaxEval | ( | unsigned int | maxEval | ) |
Set the maximum evaluation
maxEval | new maximum evaluation number |
Definition at line 76 of file running.cc.
void Running::setThreshold | ( | double | dif | ) |
Set the threshold required to identify two solution are equivalent
dif | diference value |
Definition at line 126 of file running.cc.