HOG2
GenericIDAStar.h
Go to the documentation of this file.
1 /*
2  * GenericIDAStar.h
3  * hog
4  *
5  * Created by Nathan Sturtevant on 1/3/07.
6  * Copyright 2007 __MyCompanyName__. All rights reserved.
7  *
8  */
9 
10 
11 #ifndef GENERICIDASTAR_H
12 #define GENERICIDASTAR_H
13 
14 #include "OldSearchEnvironment.h" // for the SearchEnvironment class
15 
16 #include <unordered_map>
17 
18 typedef std::unordered_map<uint32_t, double> NodeHashTable;
19 
21 public:
23  virtual ~GenericIDAStar() {}
24  void GetPath(OldSearchCode::SearchEnvironment *env, uint32_t from, uint32_t to,
25  std::vector<uint32_t> &thePath);
26 
27  uint64_t GetNodesExpanded() { return nodesExpanded; }
28  uint64_t GetNodesTouched() { return nodesTouched; }
30  void SetUseBDPathMax(bool val) { usePathMax = val; }
31 private:
32  unsigned long nodesExpanded, nodesTouched;
33 
35  uint32_t parent, uint32_t currState, uint32_t goal,
36  std::vector<uint32_t> &thePath, double bound, double g,
37  double maxH);
38  void UpdateNextBound(double currBound, double fCost);
39  double nextBound;
41  bool usePathMax;
42 };
43 
44 #endif
GenericIDAStar::DoIteration
double DoIteration(OldSearchCode::SearchEnvironment *env, uint32_t parent, uint32_t currState, uint32_t goal, std::vector< uint32_t > &thePath, double bound, double g, double maxH)
Definition: GenericIDAStar.cpp:33
GenericIDAStar::nextBound
double nextBound
Definition: GenericIDAStar.h:39
GenericIDAStar::nodesExpanded
unsigned long nodesExpanded
Definition: GenericIDAStar.h:32
GenericIDAStar::GetNodesTouched
uint64_t GetNodesTouched()
Definition: GenericIDAStar.h:28
NodeHashTable
std::unordered_map< uint32_t, double > NodeHashTable
Definition: GenericIDAStar.h:18
OldSearchCode::SearchEnvironment
Definition: OldSearchEnvironment.h:18
OldSearchEnvironment.h
GenericIDAStar::nodeTable
NodeHashTable nodeTable
Definition: GenericIDAStar.h:40
GenericIDAStar::UpdateNextBound
void UpdateNextBound(double currBound, double fCost)
Definition: GenericIDAStar.cpp:92
GenericIDAStar::GenericIDAStar
GenericIDAStar()
Definition: GenericIDAStar.h:22
GenericIDAStar
Definition: GenericIDAStar.h:20
GenericIDAStar::SetUseBDPathMax
void SetUseBDPathMax(bool val)
Definition: GenericIDAStar.h:30
GenericIDAStar::GetPath
void GetPath(OldSearchCode::SearchEnvironment *env, uint32_t from, uint32_t to, std::vector< uint32_t > &thePath)
Definition: GenericIDAStar.cpp:17
GenericIDAStar::ResetNodeCount
void ResetNodeCount()
Definition: GenericIDAStar.h:29
GenericIDAStar::usePathMax
bool usePathMax
Definition: GenericIDAStar.h:41
GenericIDAStar::GetNodesExpanded
uint64_t GetNodesExpanded()
Definition: GenericIDAStar.h:27
GenericIDAStar::nodesTouched
unsigned long nodesTouched
Definition: GenericIDAStar.h:32
GenericIDAStar::~GenericIDAStar
virtual ~GenericIDAStar()
Definition: GenericIDAStar.h:23