HOG2
|
#include <Map2DSectorAbstractionEnvironment.h>
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 | |
Map * | map |
MapEnvironment * | me |
MinimalSectorAbstraction * | msa |
std::vector< tempEdgeData > | actions |
std::vector< abstractGridState > | nbr |
Additional Inherited Members | |
Public Attributes inherited from Heuristic< abstractGridState > | |
std::vector< HeuristicTreeNode > | lookups |
std::vector< Heuristic * > | heuristics |
uint64_t | histogram [256] |
Protected Attributes inherited from SearchEnvironment< abstractGridState, abstractMove > | |
bool | bValidSearchGoal |
abstractGridState | searchGoal |
rgbColor | color |
GLfloat | transparency |
Definition at line 29 of file Map2DSectorAbstractionEnvironment.h.
Map2DSectorAbstraction::Map2DSectorAbstraction | ( | Map * | m, |
int | sectorSize | ||
) |
Definition at line 16 of file Map2DSectorAbstractionEnvironment.cpp.
Map2DSectorAbstraction::~Map2DSectorAbstraction | ( | ) |
Definition at line 23 of file Map2DSectorAbstractionEnvironment.cpp.
|
virtual |
Implements SearchEnvironment< abstractGridState, abstractMove >.
Definition at line 53 of file Map2DSectorAbstractionEnvironment.cpp.
References abstractMove::direction, MinimalSectorAbstraction::GetAdjacentSector(), msa, abstractGridState::region, abstractMove::region, and abstractGridState::sector.
|
virtual |
Reimplemented from SearchEnvironment< abstractGridState, abstractMove >.
Definition at line 116 of file Map2DSectorAbstractionEnvironment.cpp.
References MinimalSectorAbstraction::Draw(), and msa.
|
virtual |
Reimplemented from SearchEnvironment< abstractGridState, abstractMove >.
Definition at line 121 of file Map2DSectorAbstractionEnvironment.cpp.
References MapEnvironment::DrawLine(), Graphics::Display::FillCircle(), SearchEnvironment< abstractGridState, abstractMove >::GetColor(), Map::GetOpenGLCoord(), GetState(), GetSuccessors(), map, me, nbr, Colors::red, SearchEnvironment< state, action >::SetColor(), xyLoc::x, and xyLoc::y.
|
virtual |
Reimplemented from SearchEnvironment< abstractGridState, abstractMove >.
Definition at line 158 of file Map2DSectorAbstractionEnvironment.cpp.
References MapEnvironment::DrawLine(), SearchEnvironment< abstractGridState, abstractMove >::GetColor(), GetState(), me, SearchEnvironment< state, action >::SetColor(), and width.
|
virtual |
Implements SearchEnvironment< abstractGridState, abstractMove >.
Definition at line 93 of file Map2DSectorAbstractionEnvironment.cpp.
|
virtual |
Implements SearchEnvironment< abstractGridState, abstractMove >.
Definition at line 88 of file Map2DSectorAbstractionEnvironment.cpp.
References HCost().
abstractGridState Map2DSectorAbstraction::GetAbstractState | ( | const xyLoc & | loc | ) | const |
Definition at line 66 of file Map2DSectorAbstractionEnvironment.cpp.
References MinimalSectorAbstraction::GetRegion(), MinimalSectorAbstraction::GetSector(), msa, abstractGridState::region, abstractGridState::sector, loc::x, and loc::y.
|
virtual |
Implements SearchEnvironment< abstractGridState, abstractMove >.
Definition at line 110 of file Map2DSectorAbstractionEnvironment.cpp.
References abstractMove::direction, and abstractMove::region.
|
virtual |
Implements SearchEnvironment< abstractGridState, abstractMove >.
Definition at line 42 of file Map2DSectorAbstractionEnvironment.cpp.
References actions, MinimalSectorAbstraction::GetNeighbors(), msa, abstractGridState::region, and abstractGridState::sector.
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().
|
virtual |
Implements SearchEnvironment< abstractGridState, abstractMove >.
Definition at line 104 of file Map2DSectorAbstractionEnvironment.cpp.
|
virtual |
Implements SearchEnvironment< abstractGridState, abstractMove >.
Definition at line 29 of file Map2DSectorAbstractionEnvironment.cpp.
References actions, MinimalSectorAbstraction::GetAdjacentSector(), MinimalSectorAbstraction::GetNeighbors(), msa, abstractGridState::region, and abstractGridState::sector.
Referenced by Draw().
|
inlinevirtual |
Reimplemented from SearchEnvironment< abstractGridState, abstractMove >.
Definition at line 61 of file Map2DSectorAbstractionEnvironment.h.
|
inlinevirtual |
Definition at line 60 of file Map2DSectorAbstractionEnvironment.h.
|
virtual |
Implements SearchEnvironment< abstractGridState, abstractMove >.
Definition at line 98 of file Map2DSectorAbstractionEnvironment.cpp.
References abstractGridState::region, and abstractGridState::sector.
|
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().
|
inlinevirtual |
Implements SearchEnvironment< abstractGridState, abstractMove >.
Definition at line 41 of file Map2DSectorAbstractionEnvironment.h.
|
inlinevirtual |
Definition at line 55 of file Map2DSectorAbstractionEnvironment.h.
|
inlinevirtual |
Reimplemented from SearchEnvironment< abstractGridState, abstractMove >.
Definition at line 56 of file Map2DSectorAbstractionEnvironment.h.
|
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.
|
inlinevirtual |
Reimplemented from SearchEnvironment< abstractGridState, abstractMove >.
Definition at line 59 of file Map2DSectorAbstractionEnvironment.h.
|
mutableprivate |
Definition at line 71 of file Map2DSectorAbstractionEnvironment.h.
Referenced by GetActions(), and GetSuccessors().
|
private |
Definition at line 68 of file Map2DSectorAbstractionEnvironment.h.
Referenced by Draw(), and Map2DSectorAbstraction().
|
private |
Definition at line 69 of file Map2DSectorAbstractionEnvironment.h.
Referenced by Draw(), DrawLine(), Map2DSectorAbstraction(), and ~Map2DSectorAbstraction().
|
private |
Definition at line 70 of file Map2DSectorAbstractionEnvironment.h.
Referenced by ApplyAction(), Draw(), GetAbstractState(), GetActions(), GetState(), GetSuccessors(), Map2DSectorAbstraction(), and ~Map2DSectorAbstraction().
|
mutableprivate |
Definition at line 72 of file Map2DSectorAbstractionEnvironment.h.
Referenced by Draw().