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 &__fit)
Procedure which initialise the exploration.
bool update (const M &__move, const Fitness &__fit)
Function that indicates if the current move has not improved the fitness.
void operator() (M &__move, Fitness &__fit) throw (EmptySelection)
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_fit
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 22 of file moBestImprSelect.h.

Member Function Documentation

  template<class M> bool moBestImprSelect< M >::update (const M & __move, const Fitness & __fit) [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.
    __fit a fitness linked to the move.

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

Implements moMoveSelect< M >.

Definition at line 47 of file moBestImprSelect.h.

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

  template<class M> void moBestImprSelect< M >::operator() (M & __move, Fitness & __fit) throw (EmptySelection) [inline]

Procedure which saved the best move and fitness.

Parameters:
    __move the current move (result of the procedure).
    __fit the current fitness (result of the procedure).

Exceptions:
    EmptySelection if no move has improved the fitness.

Definition at line 68 of file moBestImprSelect.h.

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

Author

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