moNoFitImprSolContinue(3)

NAME
moNoFitImprSolContinue - One possible stop criterion for a solution-based heuristic.

SYNOPSIS

#include <moNoFitImprSolContinue.h>

Inherits moSolContinue< EOT >< EOT >.

  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 46 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 58 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 68 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 102 of file moNoFitImprSolContinue.h.

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

Author

Generated automatically by Doxygen for ParadisEO-MOMovingObjects from the source code.