|
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
[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]
|
|
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]
|
|
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]
|
|
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 (
|
)
|
|
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]
|
|
template<class Input, class State> |
void easylocal::Runner<Input, State>::ReadParameters (
|
) [pure virtual]
|
|
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]
|
|
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]
|
|
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 (
|
)
|
|
Member Data Documentation
template<class Input, class State> |
std::string easylocal::Runner<Input, State>::name [protected]
|
|
template<class Input, class State> |
std::string easylocal::Runner<Input, State>::type [protected]
|
|
The documentation for this class was generated from the following files:
|