Public Member Functions | Protected Attributes | Friends
mets::swap_elements Class Reference

A mets::mana_move that swaps two elements in a mets::permutation_problem. More...

#include <model.hh>

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

List of all members.

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.
clonableclone () 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

Detailed Description

A mets::mana_move that swaps two elements in a mets::permutation_problem.

Each instance swaps two specific objects.

See also:
mets::permutation_problem, mets::mana_move

Definition at line 386 of file model.hh.


Constructor & Destructor Documentation

mets::swap_elements::swap_elements ( int  from,
int  to 
) [inline]

A move that swaps from and to.

Definition at line 391 of file model.hh.


Member Function Documentation

void mets::swap_elements::apply ( mets::feasible_solution s) const [inline, virtual]

Virtual method that applies the move on a point.

Implements mets::move.

Definition at line 404 of file model.hh.

void mets::swap_elements::change ( int  from,
int  to 
) [inline]

Modify this swap move.

Definition at line 425 of file model.hh.

clonable* mets::swap_elements::clone ( ) const [inline, virtual]

Clones this move (so that the tabu list can store it)

Implements mets::clonable.

Definition at line 410 of file model.hh.

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.

Definition at line 397 of file model.hh.

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.

Definition at line 416 of file model.hh.

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.

Definition at line 732 of file model.hh.


Friends And Related Function Documentation

friend class swap_neighborhood [friend]

Definition at line 433 of file model.hh.


Member Data Documentation

int mets::swap_elements::p1 [protected]

the first element to swap

Definition at line 429 of file model.hh.

int mets::swap_elements::p2 [protected]

the second element to swap

Definition at line 430 of file model.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