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

#include <Map2DSectorAbstractionEnvironment.h>

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

Public Member Functions

 Map2DSectorAbstraction (Map *m, int sectorSize)
 
 ~Map2DSectorAbstraction ()
 
void GetSuccessors (const abstractGridState &nodeID, std::vector< abstractGridState > &neighbors) const
 
void GetActions (const abstractGridState &nodeID, std::vector< abstractMove > &actions) const
 
virtual void ApplyAction (abstractGridState &s, abstractMove a) const
 
xyLoc GetState (const abstractGridState &loc) const
 
abstractGridState GetAbstractState (const xyLoc &loc) const
 
bool InvertAction (abstractMove &a) const
 
virtual double HCost (const abstractGridState &node1, const abstractGridState &node2) const
 Heuristic value between two arbitrary nodes. More...
 
virtual double GCost (const abstractGridState &node1, const abstractGridState &node2) const
 
virtual double GCost (const abstractGridState &node, const abstractMove &act) const
 
virtual bool GoalTest (const abstractGridState &node, const abstractGridState &goal) const
 
virtual uint64_t GetStateHash (const abstractGridState &node) const
 
virtual uint64_t GetActionHash (abstractMove act) const
 
virtual void OpenGLDraw () const
 
virtual void OpenGLDraw (const abstractGridState &) const
 
virtual void OpenGLDraw (const abstractGridState &, const abstractGridState &, float) const
 Draw the transition at some percentage 0...1 between two abstractGridStates. More...
 
virtual void OpenGLDraw (const abstractGridState &, const abstractMove &) const
 
virtual void GLLabelabstractGridState (const abstractGridState &, const char *) const
 
virtual void GLDrawLine (const abstractGridState &x, const abstractGridState &y) const
 
virtual void Draw (Graphics::Display &display) const
 
virtual void Draw (Graphics::Display &display, const abstractGridState &) const
 
virtual void DrawLine (Graphics::Display &display, const abstractGridState &x, const abstractGridState &y, float width=1.0) const
 
- Public Member Functions inherited from SearchEnvironment< abstractGridState, abstractMove >
virtual ~SearchEnvironment ()
 
virtual int GetNumSuccessors (const abstractGridState &stateID) const
 
virtual abstractMove GetAction (const abstractGridState &s1, const abstractGridState &s2) const
 
virtual void UndoAction (abstractGridState &s, abstractMove a) const
 
virtual void GetNextState (const abstractGridState &s1, abstractMove a, abstractGridState &s2) const
 
virtual void StoreGoal (abstractGridState &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 abstractGridState &node1, const abstractGridState &node2, double parentHCost) const
 
virtual double HCost (const abstractGridState &node) const
 Heuristic value between node and the stored goal. More...
 
virtual bool GoalTest (const abstractGridState &node) const
 Goal Test if the goal is stored. More...
 
virtual uint64_t GetMaxHash () const
 
virtual void GetStateFromHash (uint64_t parent, abstractGridState &s) const
 
virtual double GetPathLength (std::vector< abstractGridState > &neighbors)
 
virtual double GetPathLength (const abstractGridState &start, std::vector< abstractMove > &neighbors)
 
virtual OccupancyInterface< abstractGridState, abstractMove > * GetOccupancyInfo ()
 
virtual void SetOccupancyInfo (OccupancyInterface< abstractGridState, abstractMove > *)
 
virtual void OpenGLDraw () const
 
virtual void GLLabelState (const abstractGridState &, const char *) const
 
virtual void GLDrawPath (const std::vector< abstractGridState > &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
 
- Public Member Functions inherited from Heuristic< abstractGridState >
 Heuristic ()
 
virtual ~Heuristic ()
 

Private Attributes

Mapmap
 
MapEnvironmentme
 
MinimalSectorAbstractionmsa
 
std::vector< tempEdgeDataactions
 
std::vector< abstractGridStatenbr
 

Additional Inherited Members

- Public Attributes inherited from Heuristic< abstractGridState >
std::vector< HeuristicTreeNodelookups
 
std::vector< Heuristic * > heuristics
 
uint64_t histogram [256]
 
- Protected Attributes inherited from SearchEnvironment< abstractGridState, abstractMove >
bool bValidSearchGoal
 
abstractGridState searchGoal
 
rgbColor color
 
GLfloat transparency
 

Detailed Description

Definition at line 29 of file Map2DSectorAbstractionEnvironment.h.

Constructor & Destructor Documentation

◆ Map2DSectorAbstraction()

Map2DSectorAbstraction::Map2DSectorAbstraction ( Map m,
int  sectorSize 
)

Definition at line 16 of file Map2DSectorAbstractionEnvironment.cpp.

References map, me, and msa.

◆ ~Map2DSectorAbstraction()

Map2DSectorAbstraction::~Map2DSectorAbstraction ( )

Definition at line 23 of file Map2DSectorAbstractionEnvironment.cpp.

References me, and msa.

Member Function Documentation

◆ ApplyAction()

void Map2DSectorAbstraction::ApplyAction ( abstractGridState s,
abstractMove  a 
) const
virtual

◆ Draw() [1/2]

void Map2DSectorAbstraction::Draw ( Graphics::Display display) const
virtual

◆ Draw() [2/2]

void Map2DSectorAbstraction::Draw ( Graphics::Display display,
const abstractGridState g 
) const
virtual

◆ DrawLine()

void Map2DSectorAbstraction::DrawLine ( Graphics::Display display,
const abstractGridState x,
const abstractGridState y,
float  width = 1.0 
) const
virtual

◆ GCost() [1/2]

double Map2DSectorAbstraction::GCost ( const abstractGridState node,
const abstractMove act 
) const
virtual

◆ GCost() [2/2]

double Map2DSectorAbstraction::GCost ( const abstractGridState node1,
const abstractGridState node2 
) const
virtual

◆ GetAbstractState()

abstractGridState Map2DSectorAbstraction::GetAbstractState ( const xyLoc loc) const

◆ GetActionHash()

uint64_t Map2DSectorAbstraction::GetActionHash ( abstractMove  act) const
virtual

◆ GetActions()

void Map2DSectorAbstraction::GetActions ( const abstractGridState nodeID,
std::vector< abstractMove > &  actions 
) const
virtual

◆ GetState()

xyLoc Map2DSectorAbstraction::GetState ( const abstractGridState loc) const

Definition at line 59 of file Map2DSectorAbstractionEnvironment.cpp.

References MinimalSectorAbstraction::GetXYLocation(), and msa.

Referenced by Draw(), DrawLine(), and HCost().

◆ GetStateHash()

uint64_t Map2DSectorAbstraction::GetStateHash ( const abstractGridState node) const
virtual

◆ GetSuccessors()

void Map2DSectorAbstraction::GetSuccessors ( const abstractGridState nodeID,
std::vector< abstractGridState > &  neighbors 
) const
virtual

◆ GLDrawLine()

virtual void Map2DSectorAbstraction::GLDrawLine ( const abstractGridState x,
const abstractGridState y 
) const
inlinevirtual

◆ GLLabelabstractGridState()

virtual void Map2DSectorAbstraction::GLLabelabstractGridState ( const abstractGridState ,
const char *   
) const
inlinevirtual

Definition at line 60 of file Map2DSectorAbstractionEnvironment.h.

◆ GoalTest()

bool Map2DSectorAbstraction::GoalTest ( const abstractGridState node,
const abstractGridState goal 
) const
virtual

◆ HCost()

double Map2DSectorAbstraction::HCost ( const abstractGridState node1,
const abstractGridState node2 
) const
virtual

Heuristic value between two arbitrary nodes.

Implements SearchEnvironment< abstractGridState, abstractMove >.

Definition at line 75 of file Map2DSectorAbstractionEnvironment.cpp.

References GetState(), max, min(), ROOT_TWO, xyLoc::x, and xyLoc::y.

Referenced by GCost().

◆ InvertAction()

bool Map2DSectorAbstraction::InvertAction ( abstractMove a) const
inlinevirtual

◆ OpenGLDraw() [1/4]

virtual void Map2DSectorAbstraction::OpenGLDraw ( ) const
inlinevirtual

Definition at line 55 of file Map2DSectorAbstractionEnvironment.h.

◆ OpenGLDraw() [2/4]

virtual void Map2DSectorAbstraction::OpenGLDraw ( const abstractGridState ) const
inlinevirtual

◆ OpenGLDraw() [3/4]

virtual void Map2DSectorAbstraction::OpenGLDraw ( const abstractGridState ,
const abstractGridState ,
float   
) const
inlinevirtual

Draw the transition at some percentage 0...1 between two abstractGridStates.

Reimplemented from SearchEnvironment< abstractGridState, abstractMove >.

Definition at line 58 of file Map2DSectorAbstractionEnvironment.h.

◆ OpenGLDraw() [4/4]

virtual void Map2DSectorAbstraction::OpenGLDraw ( const abstractGridState ,
const abstractMove  
) const
inlinevirtual

Member Data Documentation

◆ actions

std::vector<tempEdgeData> Map2DSectorAbstraction::actions
mutableprivate

Definition at line 71 of file Map2DSectorAbstractionEnvironment.h.

Referenced by GetActions(), and GetSuccessors().

◆ map

Map* Map2DSectorAbstraction::map
private

Definition at line 68 of file Map2DSectorAbstractionEnvironment.h.

Referenced by Draw(), and Map2DSectorAbstraction().

◆ me

MapEnvironment* Map2DSectorAbstraction::me
private

◆ msa

MinimalSectorAbstraction* Map2DSectorAbstraction::msa
private

◆ nbr

std::vector<abstractGridState> Map2DSectorAbstraction::nbr
mutableprivate

Definition at line 72 of file Map2DSectorAbstractionEnvironment.h.

Referenced by Draw().


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