#include <moFirstImprSelect.h>
Inheritance diagram for moFirstImprSelect< M >:

Public Types | |
| typedef M::EOType::Fitness | Fitness |
| Alias for the fitness. | |
Public Member Functions | |
| virtual void | init (const Fitness &__fit) |
| Procedure which initialise the exploration. | |
| bool | update (const M &__move, const typename M::EOType::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 | valid |
| Allow to know if at least one move has improved the solution. | |
| M | best_move |
| Best stored movement. | |
| Fitness | init_fit |
| Initial fitness. | |
| Fitness | best_fit |
| Best stored fitness. | |
The neighborhood is explored until a move enables an improvment of the current solution.
Definition at line 23 of file moFirstImprSelect.h.
| virtual void moFirstImprSelect< M >::init | ( | const Fitness & | __fit | ) | [inline, virtual] |
Procedure which initialise the exploration.
It save the current fitness as the initial value for the fitness.
Implements moMoveSelect< M >.
Definition at line 35 of file moFirstImprSelect.h.
References moFirstImprSelect< M >::init_fit, and moFirstImprSelect< M >::valid.
| bool moFirstImprSelect< M >::update | ( | const M & | __move, | |
| const typename M::EOType::Fitness & | __fit | |||
| ) | [inline] |
Function that indicates if the current move has not improved the fitness.
If the given fitness enables an improvment, the move (moMove) should be applied to the current solution.
| __move | a move. | |
| __fit | a fitness linked to the move. |
Definition at line 52 of file moFirstImprSelect.h.
References moFirstImprSelect< M >::best_fit, moFirstImprSelect< M >::best_move, moFirstImprSelect< M >::init_fit, and moFirstImprSelect< M >::valid.
| void moFirstImprSelect< M >::operator() | ( | M & | __move, | |
| Fitness & | __fit | |||
| ) | throw (EmptySelection) [inline, virtual] |
Procedure which saved the best move and fitness.
| __move | the current move (result of the procedure). | |
| __fit | the current fitness (result of the procedure). |
| EmptySelection | if no move has improved the fitness. |
Implements eoBF< M &, M::EOType::Fitness &, void >.
Definition at line 76 of file moFirstImprSelect.h.
References moFirstImprSelect< M >::best_fit, moFirstImprSelect< M >::best_move, and moFirstImprSelect< M >::valid.
1.4.7