moFitSolContinue< EOT > Class Template Reference

One possible stop criterion for a solution-based heuristic. More...

#include <moFitSolContinue.h>

Inheritance diagram for moFitSolContinue< EOT >:

moSolContinue< EOT > eoUF< const EOT &, bool > eoFunctorBase List of all members.

Public Types

typedef EOT::Fitness Fitness
 Alias for the fitness.

Public Member Functions

 moFitSolContinue (Fitness __fitness, bool __minimization=true)
 Basic constructor.
bool operator() (const EOT &__sol)
 Function that activates the stopping criterion.
void init ()
 Procedure which allows to initialise all the stuff needed.

Private Attributes

Fitness fitness
 Fitness target.
bool minimization
 Flag that indicate if there is a minimization (true) or a maximization (false) of the fitness value.

Detailed Description

template<class EOT>
class moFitSolContinue< EOT >

One possible stop criterion for a solution-based heuristic.

The stop criterion corresponds to a fitness threshold gained.

Definition at line 21 of file moFitSolContinue.h.


Constructor & Destructor Documentation

template<class EOT>
moFitSolContinue< EOT >::moFitSolContinue ( Fitness  __fitness,
bool  __minimization = true 
) [inline]

Basic constructor.

Parameters:
__fitness The fitness to reach.
__minimization Indicate if the the aim is to maximize or minimize the fitness.

Definition at line 34 of file moFitSolContinue.h.


Member Function Documentation

template<class EOT>
bool moFitSolContinue< EOT >::operator() ( const EOT &  __sol  )  [inline, virtual]

Function that activates the stopping criterion.

Indicates if the fitness threshold has not yet been reached.

Parameters:
__sol the current solution.
Returns:
true or false according to the value of the fitness.

Implements eoUF< const EOT &, bool >.

Definition at line 44 of file moFitSolContinue.h.

References moFitSolContinue< EOT >::fitness, and moFitSolContinue< EOT >::minimization.


Member Data Documentation

template<class EOT>
bool moFitSolContinue< EOT >::minimization [private]

Flag that indicate if there is a minimization (true) or a maximization (false) of the fitness value.

It can be interesting to know this information because some solution-based metaheuristics can generate solution with a fitness that is worse that the best known fitness (in this case, the counter is not reinitialized).

Definition at line 72 of file moFitSolContinue.h.

Referenced by moFitSolContinue< EOT >::operator()().


The documentation for this class was generated from the following file:
Generated on Thu Aug 2 09:02:25 2007 for PARADISEO-MO by  doxygen 1.5.2