- Main Page
- Classes
- Files

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# moFirstImprSelect< M > Class Template Reference

One possible moMoveSelect. More...

`#include <moFirstImprSelect.h>`

Inheritance diagram for moFirstImprSelect< M >:

List of all members.

## 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.

## Detailed Description

### template<class M>
class moFirstImprSelect< M >

One possible moMoveSelect.

The neighborhood is explored until a move enables an improvment of the current solution.

Definition at line 23 of file moFirstImprSelect.h.

## Member Function Documentation

template<class M>

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.

template<class M>

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.

Parameters:

  | __move | a move.
  | __fit | a fitness linked to the move.

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

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.

template<class M>

void moFirstImprSelect< M >::operator() | ( | M & | __move,
|  | Fitness & | __fit |
| ) |  |  | throw (EmptySelection)`[inline, virtual]`

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.

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.

The documentation for this class was generated from the following file:

- moFirstImprSelect.h