moNoFitImprSolContinue< EOT > Class Template Reference

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

#include <moNoFitImprSolContinue.h>

Inheritance diagram for moNoFitImprSolContinue< 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

 moNoFitImprSolContinue (unsigned int __maxNumberOfIterationWithoutImprovement)
 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

unsigned int maxNumberOfIterationsWithoutImprovement
 Maximum number of iterations without improvement allowed.
bool firstFitnessSaved
 Flag that this is the first time that the fitness is used.
Fitness fitness
 Current Fitness.
unsigned int counter
 The iteration couter.

Detailed Description

template<class EOT>
class moNoFitImprSolContinue< EOT >

One possible stop criterion for a solution-based heuristic.

The stop criterion corresponds to a maximum number of iterations without improvement.

Definition at line 21 of file moNoFitImprSolContinue.h.


Constructor & Destructor Documentation

template<class EOT>
moNoFitImprSolContinue< EOT >::moNoFitImprSolContinue ( unsigned int  __maxNumberOfIterationWithoutImprovement  )  [inline]

Basic constructor.

Parameters:
__maxNumberOfIterationWithoutImprovement The number of iterations without fitness improvement to reach for stop.

Definition at line 33 of file moNoFitImprSolContinue.h.


Member Function Documentation

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

Function that activates the stopping criterion.

Indicates if the fitness has not been improved since a given number of iterations (after a minimum of iterations).

Parameters:
__sol the current solution.
Returns:
true or false.

Implements eoUF< const EOT &, bool >.

Definition at line 43 of file moNoFitImprSolContinue.h.

References moNoFitImprSolContinue< EOT >::counter, moNoFitImprSolContinue< EOT >::firstFitnessSaved, moNoFitImprSolContinue< EOT >::fitness, and moNoFitImprSolContinue< EOT >::maxNumberOfIterationsWithoutImprovement.

template<class EOT>
void moNoFitImprSolContinue< EOT >::init (  )  [inline, virtual]

Procedure which allows to initialise all the stuff needed.

It can be also used to reinitialize all the needed things.

Implements moSolContinue< EOT >.

Definition at line 77 of file moNoFitImprSolContinue.h.

References moNoFitImprSolContinue< EOT >::counter, and moNoFitImprSolContinue< EOT >::firstFitnessSaved.


The documentation for this class was generated from the following file:
Generated on Tue Sep 25 16:25:47 2007 for PARADISEO-MO by  doxygen 1.5.2