HOG2
Public Member Functions | Protected Attributes | List of all members
RoadMap Class Reference

#include <RoadMap.h>

Inheritance diagram for RoadMap:
Inheritance graph
[legend]
Collaboration diagram for RoadMap:
Collaboration graph
[legend]

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
 
GraphGetGraph ()
 
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

GraphEnvironmentge
 
Graphg
 
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< HeuristicTreeNodelookups
 
std::vector< Heuristic * > heuristics
 
uint64_t histogram [256]
 

Detailed Description

Definition at line 19 of file RoadMap.h.

Constructor & Destructor Documentation

◆ RoadMap()

RoadMap::RoadMap ( const char *  graph,
const char *  coordinates,
bool  time 
)

◆ ~RoadMap()

RoadMap::~RoadMap ( )
virtual

Definition at line 191 of file RoadMap.cpp.

References ge.

Member Function Documentation

◆ ApplyAction()

void RoadMap::ApplyAction ( intersection s,
neighbor  a 
) const
virtual

Implements SearchEnvironment< intersection, neighbor >.

Definition at line 213 of file RoadMap.cpp.

References GraphEnvironment::ApplyAction(), and ge.

◆ GCost() [1/2]

double RoadMap::GCost ( const intersection node,
const neighbor act 
) const
virtual

Implements SearchEnvironment< intersection, neighbor >.

Definition at line 244 of file RoadMap.cpp.

References GraphEnvironment::GCost(), and ge.

◆ GCost() [2/2]

double RoadMap::GCost ( const intersection node1,
const intersection node2 
) const
virtual

Implements SearchEnvironment< intersection, neighbor >.

Definition at line 239 of file RoadMap.cpp.

References GraphEnvironment::GCost(), and ge.

◆ GetAction()

neighbor RoadMap::GetAction ( const intersection s1,
const intersection s2 
) const
virtual

Reimplemented from SearchEnvironment< intersection, neighbor >.

Definition at line 208 of file RoadMap.cpp.

References ge, and GraphEnvironment::GetAction().

◆ GetActionHash()

uint64_t RoadMap::GetActionHash ( neighbor  act) const
virtual

Implements SearchEnvironment< intersection, neighbor >.

Definition at line 270 of file RoadMap.cpp.

References ge, and GraphEnvironment::GetActionHash().

◆ GetActions()

void RoadMap::GetActions ( const intersection nodeID,
std::vector< neighbor > &  actions 
) const
virtual

Implements SearchEnvironment< intersection, neighbor >.

Definition at line 202 of file RoadMap.cpp.

References ge, and GraphEnvironment::GetActions().

◆ GetColor()

void RoadMap::GetColor ( GLfloat &  rr,
GLfloat &  g,
GLfloat &  b,
GLfloat &  t 
) const
virtual

Reimplemented from SearchEnvironment< intersection, neighbor >.

Definition at line 301 of file RoadMap.cpp.

References g, ge, and SearchEnvironment< state, action >::GetColor().

◆ GetGraph()

Graph* RoadMap::GetGraph ( )
inline

Definition at line 25 of file RoadMap.h.

References g.

◆ GetMaxHash()

uint64_t RoadMap::GetMaxHash ( ) const
virtual

Definition at line 255 of file RoadMap.cpp.

References g, and Graph::GetNumNodes().

◆ GetName()

std::string RoadMap::GetName ( )
inline

Definition at line 42 of file RoadMap.h.

◆ GetStateFromHash()

void RoadMap::GetStateFromHash ( uint64_t  parent,
intersection s 
) const
virtual

Reimplemented from SearchEnvironment< intersection, neighbor >.

Definition at line 265 of file RoadMap.cpp.

◆ GetStateHash()

uint64_t RoadMap::GetStateHash ( const intersection node) const
virtual

Implements SearchEnvironment< intersection, neighbor >.

Definition at line 260 of file RoadMap.cpp.

◆ GetSuccessors()

void RoadMap::GetSuccessors ( const intersection nodeID,
std::vector< intersection > &  neighbors 
) const
virtual

Implements SearchEnvironment< intersection, neighbor >.

Definition at line 197 of file RoadMap.cpp.

References ge, and GraphEnvironment::GetSuccessors().

◆ GLDrawPath()

void RoadMap::GLDrawPath ( const std::vector< intersection > &  x) const
virtual

◆ GoalTest()

bool RoadMap::GoalTest ( const intersection node,
const intersection goal 
) const
virtual

Implements SearchEnvironment< intersection, neighbor >.

Definition at line 249 of file RoadMap.cpp.

◆ HCost()

double RoadMap::HCost ( const intersection node1,
const intersection node2 
) const
virtual

◆ InvertAction()

bool RoadMap::InvertAction ( neighbor a) const
virtual

Implements SearchEnvironment< intersection, neighbor >.

Definition at line 219 of file RoadMap.cpp.

References ge, and GraphEnvironment::InvertAction().

◆ OpenGLDraw() [1/3]

void RoadMap::OpenGLDraw ( ) const
virtual

Definition at line 276 of file RoadMap.cpp.

References ge, and GraphEnvironment::OpenGLDraw().

◆ OpenGLDraw() [2/3]

void RoadMap::OpenGLDraw ( const intersection i) const
virtual

Reimplemented from SearchEnvironment< intersection, neighbor >.

Definition at line 281 of file RoadMap.cpp.

References ge, and GraphEnvironment::OpenGLDraw().

◆ OpenGLDraw() [3/3]

void RoadMap::OpenGLDraw ( const intersection i,
const neighbor n 
) const
virtual

Reimplemented from SearchEnvironment< intersection, neighbor >.

Definition at line 286 of file RoadMap.cpp.

References ge, and GraphEnvironment::OpenGLDraw().

◆ SetColor()

void RoadMap::SetColor ( GLfloat  rr,
GLfloat  g,
GLfloat  b,
GLfloat  t = 1.0 
) const
virtual

Reimplemented from SearchEnvironment< intersection, neighbor >.

Definition at line 296 of file RoadMap.cpp.

References g, ge, and SearchEnvironment< state, action >::SetColor().

Member Data Documentation

◆ g

Graph* RoadMap::g
protected

Definition at line 51 of file RoadMap.h.

Referenced by GetColor(), GetGraph(), GetMaxHash(), HCost(), RoadMap(), and SetColor().

◆ ge

GraphEnvironment* RoadMap::ge
protected

◆ maxSpeed

double RoadMap::maxSpeed
protected

Definition at line 52 of file RoadMap.h.

Referenced by HCost(), and RoadMap().

◆ scale

double RoadMap::scale
protected

Definition at line 53 of file RoadMap.h.

Referenced by HCost(), and RoadMap().


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