A mets::mana_move that swaps two elements in a mets::permutation_problem. More...
#include <model.hh>

Public Member Functions | |
| void | apply (mets::feasible_solution &s) const |
| Virtual method that applies the move on a point. | |
| void | change (int from, int to) |
| Modify this swap move. | |
| clonable * | clone () const |
| Clones this move (so that the tabu list can store it) | |
| gol_type | evaluate (const mets::feasible_solution &s) const |
| Virtual method that applies the move on a point. | |
| size_t | hash () const |
| An hash function used by the tabu list (the hash value is used to insert the move in an hash set). | |
| bool | operator== (const mets::mana_move &o) const |
| Comparison operator used to tell if this move is equal to a move in the simple tabu list move set. | |
| swap_elements (int from, int to) | |
| A move that swaps from and to. | |
Protected Attributes | |
| int | p1 |
| the first element to swap | |
| int | p2 |
| the second element to swap | |
Friends | |
| class | swap_neighborhood |
A mets::mana_move that swaps two elements in a mets::permutation_problem.
Each instance swaps two specific objects.
| mets::swap_elements::swap_elements | ( | int | from, |
| int | to | ||
| ) | [inline] |
| void mets::swap_elements::apply | ( | mets::feasible_solution & | s | ) | const [inline, virtual] |
Virtual method that applies the move on a point.
Implements mets::move.
| void mets::swap_elements::change | ( | int | from, |
| int | to | ||
| ) | [inline] |
| clonable* mets::swap_elements::clone | ( | ) | const [inline, virtual] |
Clones this move (so that the tabu list can store it)
Implements mets::clonable.
| gol_type mets::swap_elements::evaluate | ( | const mets::feasible_solution & | s | ) | const [inline, virtual] |
Virtual method that applies the move on a point.
Implements mets::move.
| size_t mets::swap_elements::hash | ( | ) | const [inline, virtual] |
An hash function used by the tabu list (the hash value is used to insert the move in an hash set).
Implements mets::hashable.
| bool mets::swap_elements::operator== | ( | const mets::mana_move & | o | ) | const [inline, virtual] |
Comparison operator used to tell if this move is equal to a move in the simple tabu list move set.
Implements mets::mana_move.
friend class swap_neighborhood [friend] |
int mets::swap_elements::p1 [protected] |
int mets::swap_elements::p2 [protected] |