- Main Page
- Classes
- Files

- Search for |

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

# moSimpleSolutionTabuList< M > Class Template Reference

Class describing a solution tabu list with limited length. More...

`#include <moSimpleSolutionTabuList.h>`

Inheritance diagram for moSimpleSolutionTabuList< M >:

List of all members.

## Public Types
typedef M::EOType | EOT
| Alias for the type.
typedef std::list< EOT >::iterator | solutionIterator
| Alias for an iterator of a solution list.
## Public Member Functions
| moSimpleSolutionTabuList (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 | removeSolution (const EOT &_solution)
| Procedure that removes a given solution from the tabu list (if it is into, else does 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< EOT > | tabuList
| The solution tabu list.

## Detailed Description

### template<class M>
class moSimpleSolutionTabuList< M >

Class describing a solution tabu list with limited length.

Definition at line 46 of file moSimpleSolutionTabuList.h.

## Constructor & Destructor Documentation

template<class M>

moSimpleSolutionTabuList< M >::moSimpleSolutionTabuList | ( | unsigned int | _memory_maximum_size | ) | `[inline]`

Constructor.

Parameters:

  | _memory_maximum_size | The maximum size of the solution tabu list.

Definition at line 60 of file moSimpleSolutionTabuList.h.

## Member Function Documentation

template<class M>

bool moSimpleSolutionTabuList< 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 moSimpleSolutionTabuList.h.

References moSimpleSolutionTabuList< M >::tabuList.

template<class M>

void moSimpleSolutionTabuList< 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 89 of file moSimpleSolutionTabuList.h.

References moSimpleSolutionTabuList< M >::memory_maximum_size, moSimpleSolutionTabuList< M >::memory_size, moSimpleSolutionTabuList< M >::removeSolution(), and moSimpleSolutionTabuList< M >::tabuList.

template<class M>

void moSimpleSolutionTabuList< 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 115 of file moSimpleSolutionTabuList.h.

template<class M>

void moSimpleSolutionTabuList< 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 120 of file moSimpleSolutionTabuList.h.

template<class M>

void moSimpleSolutionTabuList< M >::removeSolution | ( | const EOT & | _solution | ) | `[inline, private]`

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

Parameters:

  | _solution | A given solution.

Definition at line 131 of file moSimpleSolutionTabuList.h.

References moSimpleSolutionTabuList< M >::tabuList.

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

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

- moSimpleSolutionTabuList.h