GClasses
GClasses::GActionPathSearch Class Referenceabstract

Detailed Description

This is the base class of search algorithms that can only perform a discreet set of actions (as opposed to jumping to anywhere in the search space), and seeks to minimize the error of a path of actions.

#include <GOptimizer.h>

Public Member Functions

 GActionPathSearch (GActionPathState *pStartState, size_t nActionCount)
 Takes ownership of pStartState. More...
 
virtual ~GActionPathSearch ()
 
size_t actionCount ()
 Returns the number of possible actions. More...
 
virtual GActionPathbestPath ()=0
 Returns the best known path so far. More...
 
virtual double bestPathError ()=0
 Returns the error of the best known path. More...
 
virtual bool iterate ()=0
 Call this in a loop to do the searching. If it returns true, then it's done so don't call it anymore. More...
 

Protected Attributes

size_t m_nActionCount
 

Constructor & Destructor Documentation

GClasses::GActionPathSearch::GActionPathSearch ( GActionPathState pStartState,
size_t  nActionCount 
)
inline

Takes ownership of pStartState.

virtual GClasses::GActionPathSearch::~GActionPathSearch ( )
inlinevirtual

Member Function Documentation

size_t GClasses::GActionPathSearch::actionCount ( )
inline

Returns the number of possible actions.

virtual GActionPath* GClasses::GActionPathSearch::bestPath ( )
pure virtual

Returns the best known path so far.

virtual double GClasses::GActionPathSearch::bestPathError ( )
pure virtual

Returns the error of the best known path.

virtual bool GClasses::GActionPathSearch::iterate ( )
pure virtual

Call this in a loop to do the searching. If it returns true, then it's done so don't call it anymore.

Member Data Documentation

size_t GClasses::GActionPathSearch::m_nActionCount
protected