HOG2
SpreadExecSearchAlgorithm.h
Go to the documentation of this file.
1 /*
2  * $Id: spreadExecSearchAlgorithm.h
3  * hog2
4  *
5  * Created by Nathan Sturtevant on 6/27/05.
6  * Modified by Nathan Sturtevant on 02/29/20.
7  *
8  * This file is part of HOG2. See https://github.com/nathansttt/hog2 for licensing information.
9  *
10  */
11 
12 #include "SearchAlgorithm.h"
13 
14 #ifndef SPREADEXECSEARCHALGORITHM_H
15 #define SPREADEXECSEARCHALGORITHM_H
16 
18 public:
20  virtual const char *GetName() { return "unnamed"; }
21  virtual path *GetPath(GraphAbstraction *aMap, node *from, node *to, reservationProvider *rp = 0);
22 
23  virtual void setTargets(GraphAbstraction *_aMap, node *s, node *e, reservationProvider *_rp = 0)
24  { rp = _rp; start = s; end = e; aMap = _aMap; }
26  virtual int getNumThinkSteps() = 0;
28  virtual path *think() = 0;
29 protected:
33 };
34 
35 #endif
spreadExecSearchAlgorithm
Definition: SpreadExecSearchAlgorithm.h:17
GraphAbstraction
A generic class for basic operations on Graph abstractions.
Definition: GraphAbstraction.h:63
SearchAlgorithm.h
spreadExecSearchAlgorithm::aMap
GraphAbstraction * aMap
Definition: SpreadExecSearchAlgorithm.h:32
spreadExecSearchAlgorithm::end
node * end
Definition: SpreadExecSearchAlgorithm.h:30
spreadExecSearchAlgorithm::GetPath
virtual path * GetPath(GraphAbstraction *aMap, node *from, node *to, reservationProvider *rp=0)
Definition: SpreadExecSearchAlgorithm.cpp:14
spreadExecSearchAlgorithm::think
virtual path * think()=0
do next processing for path, returns avaliability of path moves
spreadExecSearchAlgorithm::spreadExecSearchAlgorithm
spreadExecSearchAlgorithm()
Definition: SpreadExecSearchAlgorithm.h:19
spreadExecSearchAlgorithm::rp
reservationProvider * rp
Definition: SpreadExecSearchAlgorithm.h:31
spreadExecSearchAlgorithm::getNumThinkSteps
virtual int getNumThinkSteps()=0
how many times do we have to "think" to find the solution, return -1 if unknown
spreadExecSearchAlgorithm::start
node * start
Definition: SpreadExecSearchAlgorithm.h:30
spreadExecSearchAlgorithm::setTargets
virtual void setTargets(GraphAbstraction *_aMap, node *s, node *e, reservationProvider *_rp=0)
Definition: SpreadExecSearchAlgorithm.h:23
spreadExecSearchAlgorithm::GetName
virtual const char * GetName()
Definition: SpreadExecSearchAlgorithm.h:20
reservationProvider
Definition: ReservationProvider.h:33
SearchAlgorithm
A generic algorithm which can be used for pathfinding.
Definition: SearchAlgorithm.h:25
path
A linked list of nodes which form a continuous path.
Definition: Path.h:20
node
Nodes to be stored within a Graph.
Definition: Graph.h:170