Main   Class Hierarchy   Classes   Compound List   Files   Compound Members   File Members   Pages  

PathFind::Search Class Reference

#include <search.h>

Inheritance diagram for PathFind::Search:

Inheritance graph
[legend]
List of all members.

Detailed Description

Abstract search engine.

Definition at line 27 of file search.h.

Public Member Functions

 Search ()
virtual ~Search ()
virtual StatisticsCollection createStatistics ()=0
 Create a StatisticsCollection.

virtual bool findPath (const Environment &env, int start, int target)=0
 Find a path.

long long int getNodesLimit () const
virtual const vector< int > & getPath () const=0
virtual const vector< char > & getVisitedNodes () const=0
 Get a vector with char labels for each visited node.

virtual const StatisticsCollectiongetStatistics () const=0
 Get statistics of last search.

void setNodesLimit (long long int nodesLimit)
 Set nodes limit for search engine.


Public Attributes

long long int m_nodesLimit


Constructor & Destructor Documentation

Search::Search  ) 
 

Definition at line 16 of file search.cpp.

References m_nodesLimit.

Search::~Search  )  [virtual]
 

Definition at line 21 of file search.cpp.


Member Function Documentation

virtual StatisticsCollection PathFind::Search::createStatistics  )  [pure virtual]
 

Create a StatisticsCollection.

Contains Statistics instances for all values tracked. Useful for keeping accumulated statistics by creating the collection and merging the statistics of a search as returned by getStatistics().

Implemented in PathFind::AStar< MARKER, CLOSED >, PathFind::FringeSearch< MARKER >, and PathFind::IDAStar.

virtual bool PathFind::Search::findPath const Environment env,
int  start,
int  target
[pure virtual]
 

Find a path.

Returns:
false, if search was aborted due to node limit.

Implemented in PathFind::AStar< MARKER, CLOSED >, PathFind::FringeSearch< MARKER >, and PathFind::IDAStar.

long long int PathFind::Search::getNodesLimit  )  const [inline]
 

Definition at line 48 of file search.h.

References m_nodesLimit.

virtual const vector<int>& PathFind::Search::getPath  )  const [pure virtual]
 

Implemented in PathFind::AStar< MARKER, CLOSED >, PathFind::FringeSearch< MARKER >, and PathFind::IDAStar.

virtual const StatisticsCollection& PathFind::Search::getStatistics  )  const [pure virtual]
 

Get statistics of last search.

Implemented in PathFind::AStar< MARKER, CLOSED >, PathFind::FringeSearch< MARKER >, and PathFind::IDAStar.

virtual const vector<char>& PathFind::Search::getVisitedNodes  )  const [pure virtual]
 

Get a vector with char labels for each visited node.

Space char means not visited, otherwise the char can have different values and meanings depending on the concrete search engine.

Implemented in PathFind::AStar< MARKER, CLOSED >, PathFind::FringeSearch< MARKER >, and PathFind::IDAStar.

void PathFind::Search::setNodesLimit long long int  nodesLimit  )  [inline]
 

Set nodes limit for search engine.

The default is -1 and means unlimited search. The nodes limit is a hint only, the search engine may ignore it.

Reimplemented in PathFind::AStar< MARKER, CLOSED >.

Definition at line 71 of file search.h.

References m_nodesLimit.


Member Data Documentation

long long int PathFind::Search::m_nodesLimit
 

Definition at line 78 of file search.h.

Referenced by getNodesLimit(), Search(), PathFind::IDAStar::searchPathIdaStar(), setNodesLimit(), and PathFind::AStar< MARKER, CLOSED >::setNodesLimit().


The documentation for this class was generated from the following files:


Generated on Thu Aug 7 13:05:25 2003 by Doxygen1.3.1