moSimpleMoveTabuList< M > Class Template Reference

Class describing a move tabu list with a limited memory. More...

#include <moSimpleMoveTabuList.h>

Inheritance diagram for moSimpleMoveTabuList< M >:

moTabuList< M > eoBF< A1, A2, R > eoFunctorBase

List of all members.

Public Types

typedef M::EOType EOT
 Alias for the type.
typedef std::list< M >::iterator moveIterator
 Alias for an iterator of a move list.

Public Member Functions

 moSimpleMoveTabuList (unsigned int _memory_maximum_size)
 Constructor.
bool operator() (const M &_move, const EOT &_solution)
 Function that indicates if, in a given state, the _move is tabu or not.
void add (const M &_move, const EOT &_solution)
 Procedure to add a move in the tabu list.
void update ()
 Procedure that updates the tabu list content.
void init ()
 Procedure which initialises the tabu list.

Private Member Functions

void removeMove (const M &_move)
 Procedure that removes a given move from the tabu list (if it is into, else do nothing).

Private Attributes

unsigned int memory_maximum_size
 The maximum size of the tabu list.
unsigned int memory_size
 The current size of the tabu list.
std::list< M > tabuList
 The move tabu list.


Detailed Description

template<class M>
class moSimpleMoveTabuList< M >

Class describing a move tabu list with a limited memory.

Definition at line 46 of file moSimpleMoveTabuList.h.


Member Function Documentation

template<class M>
bool moSimpleMoveTabuList< M >::operator() ( const M &  _move,
const EOT _solution 
) [inline]

Function that indicates if, in a given state, the _move is tabu or not.

Parameters:
_move A given moMove.
_solution A solution.
Returns:
true or false.

Definition at line 69 of file moSimpleMoveTabuList.h.

References moSimpleMoveTabuList< M >::tabuList.

template<class M>
void moSimpleMoveTabuList< M >::add ( const M &  _move,
const EOT _solution 
) [inline, virtual]

Procedure to add a move in the tabu list.

The two parameters have not to be modified so they are constant parameters.

Parameters:
_move a new tabu move.
_solution the origianl solution associated to this move.

Implements moTabuList< M >.

Definition at line 86 of file moSimpleMoveTabuList.h.

References moSimpleMoveTabuList< M >::memory_maximum_size, moSimpleMoveTabuList< M >::memory_size, moSimpleMoveTabuList< M >::removeMove(), and moSimpleMoveTabuList< M >::tabuList.

template<class M>
void moSimpleMoveTabuList< M >::update (  )  [inline, virtual]

Procedure that updates the tabu list content.

Generally, a counter associated to each saved move is decreased by one.

Implements moTabuList< M >.

Definition at line 110 of file moSimpleMoveTabuList.h.

template<class M>
void moSimpleMoveTabuList< M >::init (  )  [inline, virtual]

Procedure which initialises the tabu list.

Can be useful if the data structure needs to be allocated before being used.

Implements moTabuList< M >.

Definition at line 115 of file moSimpleMoveTabuList.h.

template<class M>
void moSimpleMoveTabuList< M >::removeMove ( const M &  _move  )  [inline, private]

Procedure that removes a given move from the tabu list (if it is into, else do nothing).

Parameters:
_move A given moMove.

Definition at line 126 of file moSimpleMoveTabuList.h.

References moSimpleMoveTabuList< M >::tabuList.

Referenced by moSimpleMoveTabuList< M >::add().


The documentation for this class was generated from the following file:
Generated on Wed Jan 16 15:50:41 2008 for ParadisEO-MOMovingObjects by  doxygen 1.5.4