moBestImprSelect(3)

NAME
moBestImprSelect - One of the possible moMoveSelect.

SYNOPSIS

#include <moBestImprSelect.h>

Inherits moMoveSelect< M >< M >.

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

  Public Member Functions
void init (const Fitness &_fitness)
Procedure which initialise the exploration.
bool update (const M &_move, const Fitness &_fitness)
Function that indicates if the current move has not improved the fitness.
void operator() (M &_move, Fitness &_fitness)
Procedure which saved the best move and fitness.

  Private Attributes
bool first_time
Allowing to know if at least one move has been generated.
M best_move
The best move.
Fitness best_fitness
The best fitness.

Detailed Description

  template<class M> class moBestImprSelect< M >
One of the possible moMoveSelect. All neighbors are considered, and the movement which enables the best improvement is selected.

Definition at line 47 of file moBestImprSelect.h.

Member Function Documentation

  template<class M> void moBestImprSelect< M >::init (const Fitness & _fitness) [inline, virtual]

Procedure which initialise the exploration.

Parameters:
    _fitness The current fitness.

Implements moMoveSelect< M >.

Definition at line 58 of file moBestImprSelect.h.

References moBestImprSelect< M >::first_time.

  template<class M> bool moBestImprSelect< M >::update (const M & _move, const Fitness & _fitness) [inline, virtual]

Function that indicates if the current move has not improved the fitness.

If the given fitness enables an improvment, the move (moMove) and the fitness linked to this move are saved.

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

Returns:
    TRUE if the move does not improve the fitness.

Implements moMoveSelect< M >.

Definition at line 76 of file moBestImprSelect.h.

References moBestImprSelect< M >::best_fitness, moBestImprSelect< M >::best_move, and moBestImprSelect< M >::first_time.

  template<class M> void moBestImprSelect< M >::operator() (M & _move, Fitness & _fitness) [inline, virtual]

Procedure which saved the best move and fitness.

Parameters:
    _move the current move (result of the procedure).
    _fitness the current fitness (result of the procedure).

Implements eoBF< M &, M::EOType::Fitness &, void >.

Definition at line 94 of file moBestImprSelect.h.

References moBestImprSelect< M >::best_fitness, moBestImprSelect< M >::best_move, and moBestImprSelect< M >::first_time.

Author

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