EasyLocal++ Documentation


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

easylocal::Runner Class Template Reference

#include <EasyLocal.h>

Inheritance diagram for easylocal::Runner

Inheritance graph
[legend]
List of all members.

Public Methods

Protected Attributes


Detailed Description

template<class Input, class State> class easylocal::Runner

This is the interface for an abstract runner. Each runner has many data objects for representing the state of the search (current state, best state, current move, number of iterations, ...), and it maintain links to all the helpers, which are invoked for performing specific tasks on its own data. Example of actual runners are tabu search and simulated annealing.

Definition at line 495 of file EasyLocal.h.


Constructor & Destructor Documentation

template<class Input, class State>
easylocal::Runner<Input, State>::~Runner<Input, State> ( ) [inline, virtual]
 

Virtual destructor.

Definition at line 499 of file EasyLocal.h.

template<class Input, class State>
easylocal::Runner< Input, State >::Runner<Input, State> ( std::string s = "Runner<Input, State> name",
std::string t = "Runner<Input, State> type" )
 

Constructs a runner and associates a name and a type to it.

Parameters:
s   the name of the runner
t   the type of the runner (used for parameter setting)

Definition at line 736 of file EasyLocalTemplates.cpp.


Member Function Documentation

template<class Input, class State>
fvalue easylocal::Runner<Input, State>::BestStateCost ( ) [pure virtual]
 

Gets the cost of the best state found by the runner.

Returns:
the cost of the best state found by the runner

Reimplemented in easylocal::MoveRunner.

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

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

Reimplemented in easylocal::MoveRunner.

template<class Input, class State>
void easylocal::Runner<Input, State>::ComputeCost ( ) [pure virtual]
 

Computes the cost of the current state.

Reimplemented in easylocal::MoveRunner.

template<class Input, class State>
fvalue easylocal::Runner<Input, State>::CurrentStateCost ( ) [pure virtual]
 

Gets the cost of the internal state of the runner.

Returns:
the cost of the current state of the runner

Reimplemented in easylocal::MoveRunner.

template<class Input, class State>
State easylocal::Runner<Input, State>::GetBestState ( ) [pure virtual]
 

Gets the best state found by the runner.

Returns:
the best state found by the runner

Reimplemented in easylocal::MoveRunner.

template<class Input, class State>
State easylocal::Runner<Input, State>::GetCurrentState ( ) [pure virtual]
 

Gets the internal state of the runner.

Returns:
the current state of the runner

Reimplemented in easylocal::MoveRunner.

template<class Input, class State>
Input * easylocal::Runner<Input, State>::GetInput ( ) [pure virtual]
 

Returns the input pointer which the object is attached to.

Returns:
the pointer to the input object

Reimplemented in easylocal::MoveRunner.

template<class Input, class State>
void easylocal::Runner<Input, State>::Go ( ) [pure virtual]
 

Performs a full run of the search method.

Reimplemented in easylocal::MoveRunner.

template<class Input, class State>
bool easylocal::Runner<Input, State>::LowerBoundReached ( ) [pure virtual]
 

Checks whether the lower bound of the cost function has been reached.

Returns:
true if the lower bound of the cost function has reached, false otherwise

Reimplemented in easylocal::MoveRunner.

template<class Input, class State>
std::string easylocal::Runner< Input, State >::Name ( )
 

Inspects the name of the runner.

Returns:
the name of the runner

Definition at line 746 of file EasyLocalTemplates.cpp.

template<class Input, class State>
unsigned long easylocal::Runner<Input, State>::NumberOfIterations ( ) const [pure virtual]
 

Gets the number of iterations performed by the runner.

Returns:
the number of iterations performed

Reimplemented in easylocal::MoveRunner.

template<class Input, class State>
void easylocal::Runner<Input, State>::Print ( std::ostream & os = std::cout ) const [pure virtual]
 

Outputs some informations about the runner on a given output stream (cout for default).

Parameters:
os   the output stream

Reimplemented in easylocal::MoveRunner, easylocal::SteepestDescent, easylocal::HillClimbing, easylocal::TabuSearch, and easylocal::SimulatedAnnealing.

template<class Input, class State>
void easylocal::Runner<Input, State>::ReadParameters ( ) [pure virtual]
 

Reads runner parameters from the standard input and it sets them.

Reimplemented in easylocal::SteepestDescent, easylocal::HillClimbing, easylocal::TabuSearch, and easylocal::SimulatedAnnealing.

template<class Input, class State>
void easylocal::Runner<Input, State>::SetCurrentState ( const State & s ) [pure virtual]
 

Sets the internal state of the runner to be equal to the parameter.

Parameters:
st   the state to become the new internal state

Reimplemented in easylocal::MoveRunner.

template<class Input, class State>
void easylocal::Runner<Input, State>::SetInput ( Input * in ) [pure virtual]
 

Sets the internal input pointer to the new value passed as parameter.

Parameters:
in   the new input object

Reimplemented in easylocal::MoveRunner, and easylocal::TabuSearch.

template<class Input, class State>
void easylocal::Runner< Input, State >::SetName ( std::string s )
 

Sets the name of the runner to the given parameter.

Parameters:
s   the name to give to the runner

Definition at line 764 of file EasyLocalTemplates.cpp.

template<class Input, class State>
void easylocal::Runner<Input, State>::SetParameters ( const ParameterBox & pb ) [pure virtual]
 

Sets the runner parameters, passed through a parameter box.

Parameters:
pb   the object containing the parameter setting for the runner

Reimplemented in easylocal::MoveRunner, easylocal::TabuSearch, and easylocal::SimulatedAnnealing.

template<class Input, class State>
void easylocal::Runner<Input, State>::Step ( unsigned int n ) [pure virtual]
 

Performs a given number of steps of the search method.

Parameters:
n   the number of steps to make

Reimplemented in easylocal::MoveRunner.

template<class Input, class State>
std::string easylocal::Runner< Input, State >::Type ( )
 

Inspects the type of the runner.

Returns:
the type of the runner

Definition at line 755 of file EasyLocalTemplates.cpp.


Member Data Documentation

template<class Input, class State>
std::string easylocal::Runner<Input, State>::name [protected]
 

The name of the runner.

Definition at line 554 of file EasyLocal.h.

template<class Input, class State>
std::string easylocal::Runner<Input, State>::type [protected]
 

The type of the runner.

Definition at line 554 of file EasyLocal.h.


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