Public Member Functions | Protected Types | Protected Attributes
mets::simple_tabu_list Class Reference

Simplistic implementation of a tabu-list. More...

#include <tabu-search.hh>

Inheritance diagram for mets::simple_tabu_list:
Inheritance graph
[legend]

List of all members.

Public Member Functions

bool is_tabu (feasible_solution &sol, move &mov) const
 True if the move is tabu for the given solution.
 simple_tabu_list (unsigned int tenure)
 Ctor. Makes a tabu list of the specified tenure.
 simple_tabu_list (tabu_list_chain *next, unsigned int tenure)
 Ctor. Makes a tabu list of the specified tenure.
void tabu (feasible_solution &sol, move &mov)
 Make move a tabu.
 ~simple_tabu_list ()
 Destructor.

Protected Types

typedef std::deque< move * > move_list_type
typedef
std::tr1::unordered_map
< mana_move *, int,
mana_move_hash,
dereferenced_equal_to
< mana_move * > > 
move_map_type

Protected Attributes

move_map_type tabu_hash_m
move_list_type tabu_moves_m

Detailed Description

Simplistic implementation of a tabu-list.

This class implements one of the simplest and less memory hungry tabu lists. This tabu list memorizes only the moves (not the solutions).

Moves must be of mets::mana_move type.

The comparison between moves is demanded to the move implementation.

A mets::mana_move is tabu if it's in the tabu list by means of its operator== and hash function.

Definition at line 282 of file tabu-search.hh.


Member Typedef Documentation

typedef std::deque<move*> mets::simple_tabu_list::move_list_type [protected]

Definition at line 328 of file tabu-search.hh.

typedef std::tr1::unordered_map< mana_move*, int, mana_move_hash, dereferenced_equal_to<mana_move*> > mets::simple_tabu_list::move_map_type [protected]

Definition at line 346 of file tabu-search.hh.


Constructor & Destructor Documentation

mets::simple_tabu_list::simple_tabu_list ( unsigned int  tenure) [inline]

Ctor. Makes a tabu list of the specified tenure.

Parameters:
tenureTenure (length) of the tabu list

Definition at line 289 of file tabu-search.hh.

mets::simple_tabu_list::simple_tabu_list ( tabu_list_chain next,
unsigned int  tenure 
) [inline]

Ctor. Makes a tabu list of the specified tenure.

Parameters:
tenureTenure (length) of the tabu list
nextNext list to invoke when this returns false

Definition at line 298 of file tabu-search.hh.

Destructor.

Definition at line 506 of file tabu-search.hh.


Member Function Documentation

bool mets::simple_tabu_list::is_tabu ( feasible_solution sol,
move mov 
) const [inline, virtual]

True if the move is tabu for the given solution.

This implementation considers tabu each move already made less then tenure() moves ago.

Parameters:
solThe current working solution
movThe move to make tabu
Returns:
True if this move was already made during the last tenure iterations

Implements mets::tabu_list_chain.

Definition at line 558 of file tabu-search.hh.

void mets::simple_tabu_list::tabu ( feasible_solution sol,
move mov 
) [inline, virtual]

Make move a tabu.

This implementation simply remembers "tenure" moves.

Parameters:
solThe current working solution
movThe move to make tabu

Implements mets::tabu_list_chain.

Definition at line 514 of file tabu-search.hh.


Member Data Documentation

Definition at line 349 of file tabu-search.hh.

Definition at line 348 of file tabu-search.hh.


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


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:38:54