realea::Running Class Reference

Allow to control the stopping criterion. More...

#include <running.h>

Inherits IReset, and realea::IFinish.

Collaboration diagram for realea::Running:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void increm (void)
void reset (void)
 Running (OptimeCriterion *isOptime)
void setMaxEval (unsigned int maxEval)
RunninggetSubRunning (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)

Detailed Description

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.


Constructor & Destructor Documentation

Running::Running ( OptimeCriterion *  isOptime  ) 

Constructor

Parameters:
isOptime optimum criterion

Definition at line 68 of file running.cc.


Member Function Documentation

RunningPtr Running::getSubRunning ( unsigned  submaxeval  ) 

Return a new subrunning (to let algorithm that uses anothers)

Parameters:
submaxeval maxeval of the new running returning
Returns:
a new running with the maxeval indicated

Definition at line 160 of file running.cc.

Here is the call graph for this function:

double Running::getThreshold ( void   ) 
Returns:
the threshold used

Definition at line 135 of file running.cc.

bool realea::Running::hasFoundOptime ( void   )  [inline]
Returns:
true if the optime has been achieved

Definition at line 243 of file running.h.

void Running::increm ( void   ) 

Increment the evaluation number

Definition at line 48 of file running.cc.

bool Running::isFinish ( void   ) 
Returns:
true if the algorithm must stop (following the optimum criterion of the maximum evaluations number)

Definition at line 96 of file running.cc.

Here is the call graph for this function:

bool Running::isOptime ( double  fitness  ) 

Check if the fitness is too close to optimum

Parameters:
fitness fitness of current solution
Returns:
true if abs(fitness - fitness_optimum) < threshold

Definition at line 85 of file running.cc.

unsigned int Running::maxEval ( void   ) 
Returns:
the maximum evaluation number

Definition at line 81 of file running.cc.

void Running::notifyEval ( double  fit  ) 

It is notify when a new chromosome is evaluated

Parameters:
fit new fitness obtained.

Definition at line 143 of file running.cc.

Here is the call graph for this function:

unsigned int Running::numEval ( void   ) 
Returns:
the current evaluation number

Definition at line 122 of file running.cc.

unsigned realea::Running::pending ( void   )  [inline]
Returns:
the maximum evaluation

Definition at line 230 of file running.h.

double Running::ratio ( void   ) 

Set the ratio of maximum evaluation done

Returns:
a real value between 0 and 1, the ratio of number evaluation currency 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

Parameters:
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

Parameters:
dif diference value

Definition at line 126 of file running.cc.


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

Generated on Sun May 9 12:26:14 2010 for Realea by  doxygen 1.6.1