# ParadisEO-MOMovingObjects: moItRandNextMove< M > Class Template Reference

# moItRandNextMove< M > Class Template Reference

One of the possible moNextMove. More...

`#include <moItRandNextMove.h>`

Inheritance diagram for moItRandNextMove< M >:

List of all members.

## Public Member Functions

| moItRandNextMove (moRandMove< M > &_random_move_generator, unsigned int _iteration_maximum_number)
| The constructor.
bool | operator() (M &_move, const EOT &_solution)
| Generation of a new move.

## Private Types

typedef M::EOType | EOT
| Alias for the type.

## Private Attributes

moRandMove< M > & | random_move_generator
| A move generator (generally randomly).
unsigned int | iteration_maximum_number
| Iteration maximum number.
unsigned int | iteration_number
| Iteration current number.

## Detailed Description

### template<class M>
class moItRandNextMove< M >

One of the possible moNextMove.

This class is a move (moMove) generator with a bound for the maximum number of iterations.

Definition at line 47 of file moItRandNextMove.h.

## Constructor & Destructor Documentation

template<class M>

moItRandNextMove< M >::moItRandNextMove | ( | moRandMove< M > & | _random_move_generator,
|  | unsigned int | _iteration_maximum_number |
| ) |  |  | `[inline]`

The constructor.

Parameters only for initialising the attributes.

Parameters:

  | _random_move_generator | The random move generator.
  | _iteration_maximum_number | The iteration maximum number.

Definition at line 61 of file moItRandNextMove.h.

## Member Function Documentation

template<class M>

bool moItRandNextMove< M >::operator() | ( | M & | _move,
|  | const EOT & | _solution |
| ) |  |  | `[inline]`

Generation of a new move.

If the maximum number is not already reached, the current move is forgotten and remplaced by another one.

Parameters:

  | _move | the current move.
  | _solution | the current solution.

Returns:
  false if the maximum number of iteration is reached, else true.

Definition at line 73 of file moItRandNextMove.h.

References moItRandNextMove< M >::iteration_maximum_number, moItRandNextMove< M >::iteration_number, and moItRandNextMove< M >::random_move_generator.

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

- moItRandNextMove.h