moImprBestFitAspirCrit(3)

NAME
moImprBestFitAspirCrit - One of the possible moAspirCrit.

SYNOPSIS

#include <moImprBestFitAspirCrit.h>

Inherits moAspirCrit< M >< M >.

  Public Types
typedef M::EOType::Fitness Fitness
Alias for the fitness.

  Public Member Functions
moImprBestFitAspirCrit ()
Contructor.
void init ()
Initialisation procedure.
bool operator() (const M &_move, const Fitness &_fitness)
Function that indicates if the current fitness is better that the already saved fitness.

  Private Attributes
Fitness best_fitness
Best fitness found until now.
bool first_time
Indicates that a fitness has been already saved or not.

Detailed Description

  template<class M> class moImprBestFitAspirCrit< M >
One of the possible moAspirCrit. This criterion is satisfied when a given fitness is the best ever considered.

Definition at line 47 of file moImprBestFitAspirCrit.h.

Member Function Documentation

  template<class M> bool moImprBestFitAspirCrit< M >::operator() (const M & _move, const Fitness & _fitness) [inline]

Function that indicates if the current fitness is better that the already saved fitness.

The first time, the function only saved the current move and fitness.

Parameters:
    _move A move.
    _fitness A fitness linked to the move.

Returns:
    true The first time and if _fitntess > best_fitness, else false.

Definition at line 75 of file moImprBestFitAspirCrit.h.

References moImprBestFitAspirCrit< M >::best_fitness, and moImprBestFitAspirCrit< M >::first_time.

Author

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