ell::WalkAdaptive Class Reference
#include <Walk.hh>
Inheritance diagram for ell::WalkAdaptive:
Detailed Description
Implements an adaptive (decent) walk in the landscape, i.e. every state along the walk is smaller than its predecessor. Therefore, an adaptive walk ends in a local minimum. For each step successively all neighbors of the current walk end are checked if they are smaller according to the 'Stateoperator<(s2)' until a smaller one is found or all neighbors have been checked (end of the walk).WalkAdaptive defines:
- an enum for the kind of adaptive walk
- a static function "walkAdaptive" which takes all neccesary params for an adaptive walk
- a virtual member function "walk" which does the same as "walkAdaptive" but substitutes the NeighborGentype of "walkAdaptive" with a member
Definition at line 97 of file Walk.hh.
Public Types | |
enum | NeighborGenType { SUCCESSIVE, RANDOM } |
Public Member Functions | |
virtual StateCollector * | walk (const State *const start, StateCollector *const scWalk, StateCollector *const scRejected=NULL) const |
WalkAdaptive (const NeighborGenType ngt) | |
virtual | ~WalkAdaptive () |
Static Public Member Functions | |
static StateCollector * | walk (const State *const start, StateCollector *const scWalk, const NeighborGenerator *const ng, const StateAcceptor *const sa, const WalkAbortionCriterion *const wac, StateCollector *scRejected=NULL) |
static StateCollector * | walkAdaptive (const State *const start, StateCollector *const scWalk, const NeighborGenType ngt, StateCollector *const scRejected=NULL) |
Protected Attributes | |
const NeighborGenType | t |
Member Enumeration Documentation
Constructor & Destructor Documentation
ell::WalkAdaptive::WalkAdaptive | ( | const NeighborGenType | ngt | ) |
constructor for a WalkAdaptive object, takes the type of walk
- Parameters:
-
ngt the type of the neighbor generator to use
virtual ell::WalkAdaptive::~WalkAdaptive | ( | ) | [inline, virtual] |
Member Function Documentation
StateCollector * ell::Walk::walk | ( | const State *const | start, | |
StateCollector *const | scWalk, | |||
const NeighborGenerator *const | ng, | |||
const StateAcceptor *const | sa, | |||
const WalkAbortionCriterion *const | wac, | |||
StateCollector * | scRejected = NULL | |||
) | [static, inherited] |
This function implements a generic walk starting from State start. The properties of this search are defined by the implementations of NeighborhoodGenerator, StateAcceptor WalkAbortionCriterion and StateCollector.
- Parameters:
-
start the begin of the walk scWalk the StateCollector each step of the walk is added to ng the NeighborGenerator used to get the neighbor list of the last walk State to generate the next possible steps sa the StateAcceptor that decides if a step is accepted or rejected wac the walk abortion criterion that decides if the end of the walk has been reached or a further step is to do scRejected the StateCollector each rejected possible step is added to
- Returns:
- the modified scWalk StateCollector
StateCollector * ell::WalkAdaptive::walk | ( | const State *const | start, | |
StateCollector *const | scWalk, | |||
StateCollector *const | scRejected = NULL | |||
) | const [virtual] |
pure virtual function, s is start state
- Parameters:
-
start the begin of the walk scWalk the StateCollector each step of the walk is added to scRejected the StateCollector each rejected possible step is added to
- Returns:
- the modified scWalk StateCollector
Implements ell::Walk.
StateCollector * ell::WalkAdaptive::walkAdaptive | ( | const State *const | start, | |
StateCollector *const | scWalk, | |||
const NeighborGenType | ngt, | |||
StateCollector *const | scRejected = NULL | |||
) | [static] |
This static function implements an adaptive walk starting from State start by executing Walk::walk.
- Parameters:
-
start the begin of the walk scWalk the StateCollector each step of the walk is added to ngt the type of the neighbor generator to use scRejected the StateCollector each rejected possible step is added to
- Returns:
- the modified scWalk StateCollector
Field Documentation
const NeighborGenType ell::WalkAdaptive::t [protected] |
WalkAdaptive object stores which kind neighbor generation is used.
The documentation for this class was generated from the following files: