|
Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages
easylocal::MoveRunner Class Template Reference#include <EasyLocal.h>
Inheritance diagram for easylocal::MoveRunner
[legend]Collaboration diagram for easylocal::MoveRunner:
[legend]List of all members.Public Methods
Protected Methods
Protected Attributes
Detailed Description
template<class Input, class State, class Move> class easylocal::MoveRunner
A Move Runner is an instance of the Runner interface which it compel with a particular definition of @Move (given as template instantiation). It is at the root of the inheritance hierarchy of actual runners.
Definition at line 564 of file EasyLocal.h.
Constructor & Destructor Documentation
template<class Input, class State, class Move> |
easylocal::MoveRunner<Input, State, Move>::~MoveRunner<Input, State, Move> (
|
) [inline, virtual]
|
|
template<class Input, class State, class Move> |
easylocal::MoveRunner< Input, State, Move >::MoveRunner<Input, State, Move> (
|
StateManager< Input, State > * sm,
|
|
NeighborhoodExplorer< Input, State, Move > * ne,
|
|
Input * in = NULL,
|
|
std::string name = "Runner name",
|
|
std::string type = "Move Runner" ) [protected]
|
|
|
Creates a move runner and links it to a given state manager, neighborhood explorer and input objects. In addition, it sets its name and type to the given values. -
Parameters:
-
sm
|
a pointer to a compatible state manager |
ne
|
a pointer to a compatible neighborhood explorer |
in
|
a pointer to the input object |
name
|
the name of the runner |
type
|
the type of the runner |
Definition at line 779 of file EasyLocalTemplates.cpp. |
Member Function Documentation
template<class Input, class State, class Move> |
bool easylocal::MoveRunner< Input, State, Move >::AcceptableMove (
|
) [protected, virtual]
|
|
template<class Input, class State, class Move> |
fvalue easylocal::MoveRunner< Input, State, Move >::BestStateCost (
|
) [virtual]
|
|
template<class Input, class State, class Move> |
void easylocal::MoveRunner< Input, State, Move >::Check (
|
) [virtual]
|
|
template<class Input, class State, class Move> |
void easylocal::MoveRunner< Input, State, Move >::ComputeCost (
|
) [virtual]
|
|
template<class Input, class State, class Move> |
void easylocal::MoveRunner< Input, State, Move >::ComputeMoveCost (
|
) [protected, virtual]
|
|
template<class Input, class State, class Move> |
fvalue easylocal::MoveRunner< Input, State, Move >::CurrentStateCost (
|
) [virtual]
|
|
template<class Input, class State, class Move> |
State easylocal::MoveRunner< Input, State, Move >::GetBestState (
|
) [virtual]
|
|
template<class Input, class State, class Move> |
State easylocal::MoveRunner< Input, State, Move >::GetCurrentState (
|
) [virtual]
|
|
template<class Input, class State, class Move> |
Input * easylocal::MoveRunner< Input, State, Move >::GetInput (
|
) [virtual]
|
|
template<class Input, class State, class Move> |
void easylocal::MoveRunner< Input, State, Move >::Go (
|
) [virtual]
|
|
template<class Input, class State, class Move> |
void easylocal::MoveRunner< Input, State, Move >::InitializeRun (
|
) [protected, virtual]
|
|
template<class Input, class State, class Move> |
bool easylocal::MoveRunner< Input, State, Move >::LowerBoundReached (
|
) [virtual]
|
|
|
Checks whether the lower bound of the cost function has been reached. The tentative definition verifies whether the current state cost is equal to zero.
Reimplemented from easylocal::Runner.
Definition at line 897 of file EasyLocalTemplates.cpp.
Referenced by Go(), and Step(). |
template<class Input, class State, class Move> |
void easylocal::MoveRunner< Input, State, Move >::MakeMove (
|
) [protected, virtual]
|
|
template<class Input, class State, class Move> |
unsigned long easylocal::MoveRunner< Input, State, Move >::MaxIteration (
|
) const
|
|
|
Returns the maximum value of iterations allowed for the runner.
-
Returns:
-
the maximum value of iterations allowed
Definition at line 915 of file EasyLocalTemplates.cpp. |
template<class Input, class State, class Move> |
bool easylocal::MoveRunner< Input, State, Move >::MaxIterationExpired (
|
) [protected]
|
|
|
Verifies whether the upper bound on the number of iterations allowed for the strategy has been reached.
-
Returns:
-
true if the maximum number of iteration has been reached, false otherwise
Definition at line 1046 of file EasyLocalTemplates.cpp.
Referenced by Go(). |
template<class Input, class State, class Move> |
unsigned long easylocal::MoveRunner< Input, State, Move >::NumberOfIterations (
|
) const [virtual]
|
|
template<class Input, class State, class Move> |
void easylocal::MoveRunner< Input, State, Move >::Print (
|
std::ostream & os = std::cout ) const [virtual]
|
|
template<class Input, class State, class Move> |
void easylocal::MoveRunner<Input, State, Move>::SelectMove (
|
) [protected, pure virtual]
|
|
template<class Input, class State, class Move> |
void easylocal::MoveRunner< Input, State, Move >::SetCurrentState (
|
const State & s ) [virtual]
|
|
|
Sets the internal state of the runner to the value passed as parameter. -
Parameters:
-
s
|
the state to become the current state of the runner |
Reimplemented from easylocal::Runner.
Definition at line 840 of file EasyLocalTemplates.cpp. |
template<class Input, class State, class Move> |
void easylocal::MoveRunner< Input, State, Move >::SetInput (
|
Input * in ) [virtual]
|
|
template<class Input, class State, class Move> |
void easylocal::MoveRunner< Input, State, Move >::SetMaxIteration (
|
unsigned long max )
|
|
|
Sets a bound on the maximum number of iterations allowed for the runner. -
Parameters:
-
max
|
the maximum number of iterations allowed |
Definition at line 923 of file EasyLocalTemplates.cpp. |
template<class Input, class State, class Move> |
void easylocal::MoveRunner< Input, State, Move >::SetParameters (
|
const ParameterBox & pb ) [virtual]
|
|
template<class Input, class State, class Move> |
void easylocal::MoveRunner<Input, State, Move>::SetPlotStream (
|
std::ostream * os = &std::cerr ) [inline]
|
|
|
Sets the output stream which is used to write the plot of the cost function during a run. -
Parameters:
-
os
|
the output stream to use (cerr for default). |
Definition at line 589 of file EasyLocal.h. |
template<class Input, class State, class Move> |
void easylocal::MoveRunner< Input, State, Move >::Step (
|
unsigned int n ) [virtual]
|
|
template<class Input, class State, class Move> |
bool easylocal::MoveRunner<Input, State, Move>::StopCriterion (
|
) [protected, pure virtual]
|
|
template<class Input, class State, class Move> |
void easylocal::MoveRunner<Input, State, Move>::StoreMove (
|
) [inline, protected, virtual]
|
|
template<class Input, class State, class Move> |
void easylocal::MoveRunner<Input, State, Move>::TerminateRun (
|
) [inline, protected, virtual]
|
|
template<class Input, class State, class Move> |
void easylocal::MoveRunner< Input, State, Move >::UpdateIterationCounter (
|
) [protected, virtual]
|
|
template<class Input, class State, class Move> |
void easylocal::MoveRunner< Input, State, Move >::UpdateStateCost (
|
) [protected, virtual]
|
|
Member Data Documentation
template<class Input, class State, class Move> |
State easylocal::MoveRunner<Input, State, Move>::best_state [protected]
|
|
template<class Input, class State, class Move> |
fvalue easylocal::MoveRunner<Input, State, Move>::best_state_cost [protected]
|
|
|
The cost of the best state.
Definition at line 631 of file EasyLocal.h. |
template<class Input, class State, class Move> |
Move easylocal::MoveRunner<Input, State, Move>::current_move [protected]
|
|
|
The currently selected move.
Definition at line 627 of file EasyLocal.h. |
template<class Input, class State, class Move> |
fvalue easylocal::MoveRunner<Input, State, Move>::current_move_cost [protected]
|
|
|
The cost of the selected move.
Definition at line 628 of file EasyLocal.h. |
template<class Input, class State, class Move> |
State easylocal::MoveRunner<Input, State, Move>::current_state [protected]
|
|
template<class Input, class State, class Move> |
fvalue easylocal::MoveRunner<Input, State, Move>::current_state_cost [protected]
|
|
|
The cost of the current state.
Definition at line 624 of file EasyLocal.h. |
template<class Input, class State, class Move> |
bool easylocal::MoveRunner<Input, State, Move>::current_state_set [protected]
|
|
|
A flag that whether the current state is set. It is so until a new input is given.
Definition at line 625 of file EasyLocal.h. |
template<class Input, class State, class Move> |
unsigned long easylocal::MoveRunner<Input, State, Move>::iteration_of_best [protected]
|
|
|
The iteration when the best state has found.
Definition at line 633 of file EasyLocal.h. |
template<class Input, class State, class Move> |
unsigned long easylocal::MoveRunner<Input, State, Move>::max_idle_iteration [protected]
|
|
|
The maximum number of iterations allowed since the best state has been found.
Definition at line 635 of file EasyLocal.h. |
template<class Input, class State, class Move> |
unsigned long easylocal::MoveRunner<Input, State, Move>::max_iteration [protected]
|
|
|
The overall maximum number of iterations allowed.
Definition at line 641 of file EasyLocal.h. |
template<class Input, class State, class Move> |
unsigned long easylocal::MoveRunner<Input, State, Move>::number_of_iterations [protected]
|
|
|
The overall number of iterations performed.
Definition at line 639 of file EasyLocal.h. |
template<class Input, class State, class Move> |
Input * easylocal::MoveRunner<Input, State, Move>::p_in [protected]
|
|
|
A pointer to the input object.
Definition at line 613 of file EasyLocal.h. |
template<class Input, class State, class Move> |
NeighborhoodExplorer< Input, State, Move > * easylocal::MoveRunner<Input, State, Move>::p_nhe [protected]
|
|
|
A pointer to the attached neighborhood explorer.
Definition at line 618 of file EasyLocal.h. |
template<class Input, class State, class Move> |
StateManager< Input, State > * easylocal::MoveRunner<Input, State, Move>::p_sm [protected]
|
|
|
A pointer to the attached state manager.
Definition at line 616 of file EasyLocal.h. |
template<class Input, class State, class Move> |
std::ostream * easylocal::MoveRunner<Input, State, Move>::pos [protected]
|
|
|
The output stream used for plotting.
Definition at line 644 of file EasyLocal.h. |
The documentation for this class was generated from the following files:
|