METSlib 0.5
|
A mets::mana_move that swaps two elements in a mets::permutation_problem. More...
#include <model.hh>
Public Member Functions | |
swap_elements (int from, int to) | |
A move that swaps from and to. | |
gol_type | evaluate (const mets::feasible_solution &s) const |
Virtual method that applies the move on a point. More... | |
void | apply (mets::feasible_solution &s) const |
Virtual method that applies the move on a point. More... | |
clonable * | clone () const |
Clones this move (so that the tabu list can store it) More... | |
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). More... | |
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. More... | |
void | change (int from, int to) |
Modify this swap move. | |
![]() | |
virtual mana_move * | opposite_of () const |
Create and return a new move that is the reverse of this one. More... | |
virtual bool | operator== (const mana_move &other) const =0 |
Tell if this move equals another w.r.t. the tabu list management (for mets::simple_tabu_list) More... | |
virtual gol_type | evaluate (const feasible_solution &sol) const =0 |
Evaluate the cost after the move. More... | |
virtual void | apply (feasible_solution &sol) const =0 |
Operates this move on sol. More... | |
virtual clonable * | clone () const =0 |
virtual size_t | hash () const =0 |
Protected Attributes | |
int | p1 |
the first element to swap | |
int | p2 |
the second element to swap | |
Friends | |
template<typename > | |
class | swap_neighborhood |
A mets::mana_move that swaps two elements in a mets::permutation_problem.
Each instance swaps two specific objects.
|
inlinevirtual |
Virtual method that applies the move on a point.
Implements mets::move.
|
inlinevirtual |
Clones this move (so that the tabu list can store it)
Implements mets::clonable.
|
inlinevirtual |
Virtual method that applies the move on a point.
Implements mets::move.
|
inlinevirtual |
An hash function used by the tabu list (the hash value is used to insert the move in an hash set).
Implements mets::hashable.
|
inlinevirtual |
Comparison operator used to tell if this move is equal to a move in the simple tabu list move set.
Implements mets::mana_move.
Return to METSlib home page