HOG2
|
#include <RoadMap.h>
Public Member Functions | |
RoadMap (const char *graph, const char *coordinates, bool time) | |
virtual | ~RoadMap () |
virtual void | GetSuccessors (const intersection &nodeID, std::vector< intersection > &neighbors) const |
virtual void | GetActions (const intersection &nodeID, std::vector< neighbor > &actions) const |
Graph * | GetGraph () |
virtual neighbor | GetAction (const intersection &s1, const intersection &s2) const |
virtual void | ApplyAction (intersection &s, neighbor a) const |
virtual bool | InvertAction (neighbor &a) const |
virtual double | HCost (const intersection &node1, const intersection &node2) const |
Heuristic value between two arbitrary nodes. More... | |
virtual double | GCost (const intersection &node1, const intersection &node2) const |
virtual double | GCost (const intersection &node, const neighbor &act) const |
virtual bool | GoalTest (const intersection &node, const intersection &goal) const |
virtual uint64_t | GetMaxHash () const |
virtual uint64_t | GetStateHash (const intersection &node) const |
virtual void | GetStateFromHash (uint64_t parent, intersection &s) const |
virtual uint64_t | GetActionHash (neighbor act) const |
std::string | GetName () |
virtual void | SetColor (GLfloat rr, GLfloat g, GLfloat b, GLfloat t=1.0) const |
virtual void | GetColor (GLfloat &rr, GLfloat &g, GLfloat &b, GLfloat &t) const |
virtual void | OpenGLDraw () const |
virtual void | OpenGLDraw (const intersection &) const |
virtual void | OpenGLDraw (const intersection &, const neighbor &) const |
virtual void | GLDrawPath (const std::vector< intersection > &x) const |
Public Member Functions inherited from SearchEnvironment< intersection, neighbor > | |
virtual | ~SearchEnvironment () |
virtual int | GetNumSuccessors (const intersection &stateID) const |
virtual void | UndoAction (intersection &s, neighbor a) const |
virtual void | GetNextState (const intersection &s1, neighbor a, intersection &s2) const |
virtual void | StoreGoal (intersection &s) |
Stores the goal for use by single-state HCost. More... | |
virtual void | ClearGoal () |
Clears the goal from memory. More... | |
virtual bool | IsGoalStored () const |
Returns true if the goal is stored and false otherwise. More... | |
virtual double | HCost (const intersection &node1, const intersection &node2, double parentHCost) const |
virtual double | HCost (const intersection &node) const |
Heuristic value between node and the stored goal. More... | |
virtual bool | GoalTest (const intersection &node) const |
Goal Test if the goal is stored. More... | |
virtual uint64_t | GetMaxHash () const |
virtual double | GetPathLength (std::vector< intersection > &neighbors) |
virtual double | GetPathLength (const intersection &start, std::vector< neighbor > &neighbors) |
virtual OccupancyInterface< intersection, neighbor > * | GetOccupancyInfo () |
virtual void | SetOccupancyInfo (OccupancyInterface< intersection, neighbor > *) |
virtual void | OpenGLDraw () const |
virtual void | OpenGLDraw (const intersection &, const intersection &, float) const |
Draw the transition at some percentage 0...1 between two states. More... | |
virtual void | GLLabelState (const intersection &, const char *) const |
virtual void | GLDrawLine (const intersection &x, const intersection &y) const |
virtual void | SetColor (const rgbColor &r) const |
virtual rgbColor | GetColor () const |
virtual void | Draw (Graphics::Display &display) const |
virtual void | Draw (Graphics::Display &display, const intersection &) const |
virtual void | DrawLine (Graphics::Display &display, const intersection &x, const intersection &y, float width=1.0) const |
Public Member Functions inherited from Heuristic< intersection > | |
Heuristic () | |
virtual | ~Heuristic () |
Protected Attributes | |
GraphEnvironment * | ge |
Graph * | g |
double | maxSpeed |
double | scale |
Protected Attributes inherited from SearchEnvironment< intersection, neighbor > | |
bool | bValidSearchGoal |
intersection | searchGoal |
rgbColor | color |
GLfloat | transparency |
Additional Inherited Members | |
Public Attributes inherited from Heuristic< intersection > | |
std::vector< HeuristicTreeNode > | lookups |
std::vector< Heuristic * > | heuristics |
uint64_t | histogram [256] |
RoadMap::RoadMap | ( | const char * | graph, |
const char * | coordinates, | ||
bool | time | ||
) |
Definition at line 14 of file RoadMap.cpp.
References Graph::AddEdge(), Graph::AddNode(), fequal(), Graph::findDirectedEdge(), g, ge, node::GetLabelF(), Graph::GetNode(), edge::GetWeight(), GraphSearchConstants::kXCoordinate, GraphSearchConstants::kYCoordinate, GraphSearchConstants::kZCoordinate, max, maxSpeed, scale, GraphEnvironment::SetDirected(), node::SetLabelF(), and edge::setWeight().
|
virtual |
Definition at line 191 of file RoadMap.cpp.
References ge.
|
virtual |
Implements SearchEnvironment< intersection, neighbor >.
Definition at line 213 of file RoadMap.cpp.
References GraphEnvironment::ApplyAction(), and ge.
|
virtual |
Implements SearchEnvironment< intersection, neighbor >.
Definition at line 244 of file RoadMap.cpp.
References GraphEnvironment::GCost(), and ge.
|
virtual |
Implements SearchEnvironment< intersection, neighbor >.
Definition at line 239 of file RoadMap.cpp.
References GraphEnvironment::GCost(), and ge.
|
virtual |
Reimplemented from SearchEnvironment< intersection, neighbor >.
Definition at line 208 of file RoadMap.cpp.
References ge, and GraphEnvironment::GetAction().
|
virtual |
Implements SearchEnvironment< intersection, neighbor >.
Definition at line 270 of file RoadMap.cpp.
References ge, and GraphEnvironment::GetActionHash().
|
virtual |
Implements SearchEnvironment< intersection, neighbor >.
Definition at line 202 of file RoadMap.cpp.
References ge, and GraphEnvironment::GetActions().
|
virtual |
Reimplemented from SearchEnvironment< intersection, neighbor >.
Definition at line 301 of file RoadMap.cpp.
References g, ge, and SearchEnvironment< state, action >::GetColor().
|
virtual |
Definition at line 255 of file RoadMap.cpp.
References g, and Graph::GetNumNodes().
|
virtual |
Reimplemented from SearchEnvironment< intersection, neighbor >.
Definition at line 265 of file RoadMap.cpp.
|
virtual |
Implements SearchEnvironment< intersection, neighbor >.
Definition at line 260 of file RoadMap.cpp.
|
virtual |
Implements SearchEnvironment< intersection, neighbor >.
Definition at line 197 of file RoadMap.cpp.
References ge, and GraphEnvironment::GetSuccessors().
|
virtual |
Reimplemented from SearchEnvironment< intersection, neighbor >.
Definition at line 291 of file RoadMap.cpp.
References ge, and SearchEnvironment< state, action >::GLDrawPath().
|
virtual |
Implements SearchEnvironment< intersection, neighbor >.
Definition at line 249 of file RoadMap.cpp.
|
virtual |
Heuristic value between two arbitrary nodes.
Implements SearchEnvironment< intersection, neighbor >.
Definition at line 226 of file RoadMap.cpp.
References g, node::GetLabelF(), Graph::GetNode(), GraphSearchConstants::kXCoordinate, GraphSearchConstants::kYCoordinate, maxSpeed, and scale.
|
virtual |
Implements SearchEnvironment< intersection, neighbor >.
Definition at line 219 of file RoadMap.cpp.
References ge, and GraphEnvironment::InvertAction().
|
virtual |
Definition at line 276 of file RoadMap.cpp.
References ge, and GraphEnvironment::OpenGLDraw().
|
virtual |
Reimplemented from SearchEnvironment< intersection, neighbor >.
Definition at line 281 of file RoadMap.cpp.
References ge, and GraphEnvironment::OpenGLDraw().
|
virtual |
Reimplemented from SearchEnvironment< intersection, neighbor >.
Definition at line 286 of file RoadMap.cpp.
References ge, and GraphEnvironment::OpenGLDraw().
|
virtual |
Reimplemented from SearchEnvironment< intersection, neighbor >.
Definition at line 296 of file RoadMap.cpp.
References g, ge, and SearchEnvironment< state, action >::SetColor().
|
protected |
Definition at line 51 of file RoadMap.h.
Referenced by GetColor(), GetGraph(), GetMaxHash(), HCost(), RoadMap(), and SetColor().
|
protected |
Definition at line 50 of file RoadMap.h.
Referenced by ApplyAction(), GCost(), GetAction(), GetActionHash(), GetActions(), GetColor(), GetSuccessors(), GLDrawPath(), InvertAction(), OpenGLDraw(), RoadMap(), SetColor(), and ~RoadMap().
|
protected |
|
protected |