#include <moBestImprSelect.h>
Inheritance diagram for moBestImprSelect< 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. | |
All neighbors are considered, and the movement which enables the best improvement is selected.
Definition at line 22 of file moBestImprSelect.h.
| 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.
| __move | a move. | |
| __fit | a fitness linked to the move. |
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.
| void moBestImprSelect< 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 68 of file moBestImprSelect.h.
References moBestImprSelect< M >::best_fit, moBestImprSelect< M >::best_move, and moBestImprSelect< M >::first_time.
1.4.7