EasyLocal++ Documentation


 
Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

easylocal::TokenRingSolver Class Template Reference

#include <EasyLocal.h>

Inheritance diagram for easylocal::TokenRingSolver

Inheritance graph
[legend]
Collaboration diagram for easylocal::TokenRingSolver:

Collaboration graph
[legend]
List of all members.

Public Methods

Protected Methods

Protected Attributes


Detailed Description

template<class Input, class Output, class State> class easylocal::TokenRingSolver

The Token-ring Solver alternates n runners for a number of rounds.

Definition at line 936 of file EasyLocal.h.


Constructor & Destructor Documentation

template<class Input, class Output, class State>
easylocal::TokenRingSolver< Input, Output, State >::TokenRingSolver<Input, Output, State> ( StateManager< Input, State > * sm,
OutputManager< Input, Output, State > * om,
Input * in = NULL,
Output * out = NULL ) [protected]
 

Constructs a token-ring runner solver by providing it links to a state manager, an output manager, an input, and an output object.

Parameters:
sm   a pointer to a compatible state manager
om   a pointer to a compatible output manager
in   a pointer to an input object
out   a pointer to an output object

Definition at line 1913 of file EasyLocalTemplates.cpp.


Member Function Documentation

template<class Input, class Output, class State>
void easylocal::TokenRingSolver< Input, Output, State >::Check ( ) [virtual]
 

Checks wether the object state is consistent with all the related objects.

Reimplemented from easylocal::LocalSearchSolver.

Definition at line 1923 of file EasyLocalTemplates.cpp.

template<class Input, class Output, class State>
void easylocal::TokenRingSolver< Input, Output, State >::Print ( std::ostream & os = std::cout ) const
 

Outputs the solver state on a given output stream.

Parameters:
os   the output stream

Definition at line 1939 of file EasyLocalTemplates.cpp.

template<class Input, class Output, class State>
void easylocal::TokenRingSolver< Input, Output, State >::Run ( ) [protected, virtual]
 

Runs all the managed runners one after another till no improvement has produced in a given number of rounds

Reimplemented from easylocal::LocalSearchSolver.

Definition at line 1954 of file EasyLocalTemplates.cpp.

template<class Input, class Output, class State>
void easylocal::TokenRingSolver< Input, Output, State >::SetRounds ( unsigned int r )
 

Sets the number of rounds to the given value.

Parameters:
r   the number of rounds.

Definition at line 1890 of file EasyLocalTemplates.cpp.

template<class Input, class Output, class State>
void easylocal::TokenRingSolver< Input, Output, State >::SetStartRunner ( unsigned int i )
 

Starts the token-ring from the i-th runner.

Parameters:
i   the runner which to start form

Definition at line 1899 of file EasyLocalTemplates.cpp.


Member Data Documentation

template<class Input, class Output, class State>
int easylocal::TokenRingSolver<Input, Output, State>::max_idle_rounds [protected]
 

Maximum number of runs without improvement allowed.

Definition at line 947 of file EasyLocal.h.


The documentation for this class was generated from the following files:
 
Go to: the Main Page of the documentation.