HOG2
Public Member Functions | Private Types | Private Attributes | List of all members
GraphRefinementEnvironment Class Reference

#include <GraphRefinementEnvironment.h>

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

Public Member Functions

 GraphRefinementEnvironment (GraphAbstraction *ga, int planLevel, GraphHeuristic *gh, Map *m=0)
 
 ~GraphRefinementEnvironment ()
 
virtual void GetSuccessors (const graphState &stateID, std::vector< graphState > &neighbors) const
 
virtual void GetActions (const graphState &stateID, std::vector< graphMove > &actions) const
 
virtual bool GoalTest (const graphState &state, const graphState &goal) const
 
virtual bool GoalTest (const graphState &) const
 Goal Test if the goal is stored. More...
 
virtual void SetUseAbstractGoal (bool use, int level)
 
void SetPlanningCorridor (std::vector< graphState > &corridor, int level, int start=0)
 
double HCost (const graphState &state1, const graphState &state2) const
 Heuristic value between two arbitrary nodes. More...
 
double HCost (const graphState &) const
 Heuristic value between node and the stored goal. More...
 
- Public Member Functions inherited from GraphEnvironment
 GraphEnvironment (Graph *g, GraphHeuristic *gh=0)
 
 GraphEnvironment (Map *m, Graph *g, GraphHeuristic *gh=0)
 
virtual ~GraphEnvironment ()
 
virtual int GetNumSuccessors (const graphState &stateID) const
 
virtual graphMove GetAction (const graphState &s1, const graphState &s2) const
 
virtual void ApplyAction (graphState &s, graphMove a) const
 
virtual bool InvertAction (graphMove &a) const
 
void SetDirected (bool b)
 
OccupancyInterface< graphState, graphMove > * GetOccupancyInfo ()
 
virtual double GCost (const graphState &state1, const graphState &state2) const
 
virtual double GCost (const graphState &state1, const graphMove &state2) const
 
virtual uint64_t GetMaxHash () const
 
virtual uint64_t GetStateHash (const graphState &state) const
 
virtual void GetStateFromHash (uint64_t parent, graphState &s) const
 
virtual uint64_t GetActionHash (graphMove act) const
 
virtual void OpenGLDraw () const
 
virtual void OpenGLDraw (const graphState &s) const
 
virtual void OpenGLDraw (const graphState &s, const graphMove &gm) const
 
virtual void OpenGLDraw (const graphState &s, const graphState &, float) const
 Draw the transition at some percentage 0...1 between two states. More...
 
virtual void GLDrawLine (const graphState &x, const graphState &y) const
 
virtual void GLLabelState (const graphState &, const char *) const
 
std::string SVGHeader () const
 
std::string SVGDraw () const
 
std::string SVGDraw (const graphState &s) const
 
std::string SVGLabelState (const graphState &s, const char *) const
 
virtual void Draw (Graphics::Display &disp) const
 
void DrawLERP (Graphics::Display &disp, Graph *a, Graph *b, float mix) const
 
void DrawLERP (Graphics::Display &disp, Graph *a, Graph *b, float mix, std::function< float(float, float, float)> l1, std::function< float(float, float, float)> l2) const
 
void DrawLERP (Graphics::Display &disp, Graph *a, Graph *b, graphState sa, graphState sb, float mix, std::function< float(float, float, float)> l1, std::function< float(float, float, float)> l2) const
 
virtual void Draw (Graphics::Display &disp, const graphState &l) const
 
virtual void DrawStateLabel (Graphics::Display &disp, const graphState &l1, const char *txt) const
 
virtual void DrawLine (Graphics::Display &disp, const graphState &x, const graphState &y, double width=1.0) const
 
virtual void DrawLine (Graphics::Display &disp, float x1, float y1, float x2, float y2, double width=1.0) const
 
Graphics::point GetLocation (const graphState &s) const
 
GraphGetGraph ()
 
virtual void StoreGoal (graphState &)
 Stores the goal for use by single-state HCost. More...
 
virtual void ClearGoal ()
 Clears the goal from memory. More...
 
virtual bool IsGoalStored () const
 
void SetIntegerEdgeCosts (bool val)
 
void SetDrawEdgeCosts (bool val)
 
void SetDrawNodeLabels (bool val)
 
void SetNodeScale (double v)
 
double GetNodeScale ()
 
- Public Member Functions inherited from SearchEnvironment< graphState, graphMove >
virtual ~SearchEnvironment ()
 
virtual void UndoAction (graphState &s, graphMove a) const
 
virtual void GetNextState (const graphState &s1, graphMove a, graphState &s2) const
 
virtual bool IsGoalStored () const
 Returns true if the goal is stored and false otherwise. More...
 
virtual double HCost (const graphState &node1, const graphState &node2, double parentHCost) const
 
virtual uint64_t GetMaxHash () const
 
virtual double GetPathLength (std::vector< graphState > &neighbors)
 
virtual double GetPathLength (const graphState &start, std::vector< graphMove > &neighbors)
 
virtual void SetOccupancyInfo (OccupancyInterface< graphState, graphMove > *)
 
virtual void OpenGLDraw () const
 
virtual void GLDrawPath (const std::vector< graphState > &x) const
 
virtual void SetColor (const rgbColor &r) const
 
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 rgbColor GetColor () const
 
virtual void DrawLine (Graphics::Display &display, const graphState &x, const graphState &y, float width=1.0) const
 
- Public Member Functions inherited from Heuristic< graphState >
 Heuristic ()
 
virtual ~Heuristic ()
 

Private Types

typedef std::unordered_map< graphState, bool > CorridorCheck
 

Private Attributes

GraphAbstractionga
 
int planLevel
 
int corridorLevel
 
int abstractGoalLevel
 
bool useAbstractGoal
 
CorridorCheck corridorTable
 

Additional Inherited Members

- Public Attributes inherited from Heuristic< graphState >
std::vector< HeuristicTreeNodelookups
 
std::vector< Heuristic * > heuristics
 
uint64_t histogram [256]
 
- Protected Attributes inherited from GraphEnvironment
bool directed
 
Mapm
 
Graphg
 
GraphHeuristich
 
bool drawEdgeCosts
 
bool integerEdgeCosts
 
bool drawNodeLabels
 
double nodeScale
 
- Protected Attributes inherited from SearchEnvironment< graphState, graphMove >
bool bValidSearchGoal
 
graphState searchGoal
 
rgbColor color
 
GLfloat transparency
 

Detailed Description

Definition at line 19 of file GraphRefinementEnvironment.h.

Member Typedef Documentation

◆ CorridorCheck

typedef std::unordered_map<graphState, bool> GraphRefinementEnvironment::CorridorCheck
private

Definition at line 39 of file GraphRefinementEnvironment.h.

Constructor & Destructor Documentation

◆ GraphRefinementEnvironment()

GraphRefinementEnvironment::GraphRefinementEnvironment ( GraphAbstraction ga,
int  planLevel,
GraphHeuristic gh,
Map m = 0 
)

Definition at line 16 of file GraphRefinementEnvironment.cpp.

References corridorLevel, ga, planLevel, and useAbstractGoal.

◆ ~GraphRefinementEnvironment()

GraphRefinementEnvironment::~GraphRefinementEnvironment ( )

Definition at line 25 of file GraphRefinementEnvironment.cpp.

Member Function Documentation

◆ GetActions()

void GraphRefinementEnvironment::GetActions ( const graphState stateID,
std::vector< graphMove > &  actions 
) const
virtual

Reimplemented from GraphEnvironment.

Definition at line 60 of file GraphRefinementEnvironment.cpp.

References GraphEnvironment::GetActions().

◆ GetSuccessors()

void GraphRefinementEnvironment::GetSuccessors ( const graphState stateID,
std::vector< graphState > &  neighbors 
) const
virtual

◆ GoalTest() [1/2]

virtual bool GraphRefinementEnvironment::GoalTest ( const graphState node) const
inlinevirtual

Goal Test if the goal is stored.

Reimplemented from GraphEnvironment.

Definition at line 31 of file GraphRefinementEnvironment.h.

◆ GoalTest() [2/2]

bool GraphRefinementEnvironment::GoalTest ( const graphState state,
const graphState goal 
) const
virtual

◆ HCost() [1/2]

double GraphRefinementEnvironment::HCost ( const graphState node) const
inlinevirtual

Heuristic value between node and the stored goal.

Asserts that the goal is stored

Reimplemented from GraphEnvironment.

Definition at line 36 of file GraphRefinementEnvironment.h.

◆ HCost() [2/2]

double GraphRefinementEnvironment::HCost ( const graphState node1,
const graphState node2 
) const
virtual

◆ SetPlanningCorridor()

void GraphRefinementEnvironment::SetPlanningCorridor ( std::vector< graphState > &  corridor,
int  level,
int  start = 0 
)

Definition at line 75 of file GraphRefinementEnvironment.cpp.

References corridorLevel, and corridorTable.

◆ SetUseAbstractGoal()

virtual void GraphRefinementEnvironment::SetUseAbstractGoal ( bool  use,
int  level 
)
inlinevirtual

Definition at line 32 of file GraphRefinementEnvironment.h.

References abstractGoalLevel, and useAbstractGoal.

Member Data Documentation

◆ abstractGoalLevel

int GraphRefinementEnvironment::abstractGoalLevel
private

Definition at line 40 of file GraphRefinementEnvironment.h.

Referenced by GoalTest(), HCost(), and SetUseAbstractGoal().

◆ corridorLevel

int GraphRefinementEnvironment::corridorLevel
private

◆ corridorTable

CorridorCheck GraphRefinementEnvironment::corridorTable
private

Definition at line 42 of file GraphRefinementEnvironment.h.

Referenced by GetSuccessors(), and SetPlanningCorridor().

◆ ga

GraphAbstraction* GraphRefinementEnvironment::ga
private

◆ planLevel

int GraphRefinementEnvironment::planLevel
private

Definition at line 40 of file GraphRefinementEnvironment.h.

Referenced by GraphRefinementEnvironment(), and HCost().

◆ useAbstractGoal

bool GraphRefinementEnvironment::useAbstractGoal
private

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