EasyLocal++ Documentation


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

easylocal::SteepestDescent Class Template Reference

#include <EasyLocal.h>

Inheritance diagram for easylocal::SteepestDescent

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

Collaboration graph
[legend]
List of all members.

Public Methods

Protected Methods


Detailed Description

template<class Input, class State, class Move> class easylocal::SteepestDescent

The Steepest Descent runner performs a simple local search. At each step of the search, the best move in the neighborhood of current solution is selected and performed. It is worth noticing that this algorithm leads straightly to the nearest local minimum of a given state.

Definition at line 655 of file EasyLocal.h.


Constructor & Destructor Documentation

template<class Input, class State, class Move>
easylocal::SteepestDescent< Input, State, Move >::SteepestDescent<Input, State, Move> ( StateManager< Input, State > * s,
NeighborhoodExplorer< Input, State, Move > * ne,
Input * in = NULL ) [protected]
 

Constructs a steepest descent runner by linking it to a state manager, a neighborhood explorer, and an input object.

Parameters:
s   a pointer to a compatible state manager
ne   a pointer to a compatible neighborhood explorer
in   a poiter to an input object

Definition at line 1203 of file EasyLocalTemplates.cpp.


Member Function Documentation

template<class Input, class State, class Move>
bool easylocal::SteepestDescent< Input, State, Move >::AcceptableMove ( ) [protected, virtual]
 

A move is accepted if it is an improving one.

Reimplemented from easylocal::MoveRunner.

Definition at line 1237 of file EasyLocalTemplates.cpp.

template<class Input, class State, class Move>
void easylocal::SteepestDescent< Input, State, Move >::InitializeRun ( ) [protected, virtual]
 

Invokes the companion superclass method, and initializes the move cost at a negative value for fulfilling the stop criterion the first time

Reimplemented from easylocal::MoveRunner.

Definition at line 1219 of file EasyLocalTemplates.cpp.

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

Outputs some steepest descent statistics on a given output stream.

Parameters:
os   the output stream

Reimplemented from easylocal::MoveRunner.

Definition at line 1257 of file EasyLocalTemplates.cpp.

template<class Input, class State, class Move>
void easylocal::SteepestDescent<Input, State, Move>::ReadParameters ( ) [inline, virtual]
 

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

Reimplemented from easylocal::Runner.

Definition at line 659 of file EasyLocal.h.

template<class Input, class State, class Move>
void easylocal::SteepestDescent< Input, State, Move >::SelectMove ( ) [protected, virtual]
 

Selects always the best move in the neighborhood.

Reimplemented from easylocal::MoveRunner.

Definition at line 1211 of file EasyLocalTemplates.cpp.

template<class Input, class State, class Move>
bool easylocal::SteepestDescent< Input, State, Move >::StopCriterion ( ) [protected, virtual]
 

The search is stopped when no (strictly) improving move has been found.

Reimplemented from easylocal::MoveRunner.

Definition at line 1230 of file EasyLocalTemplates.cpp.

template<class Input, class State, class Move>
void easylocal::SteepestDescent< Input, State, Move >::TerminateRun ( ) [protected, virtual]
 

At the end of the run, the best state found is set with the last visited state (it is always a local minimum).

Reimplemented from easylocal::MoveRunner.

Definition at line 1245 of file EasyLocalTemplates.cpp.


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