Go to the documentation of this file.
38 neighbors.push_back(g);
48 acts.push_back({a.direction, a.to});
82 int dx = std::abs(l1.
x-l2.
x);
83 int dy = std::abs(l1.
y-l2.
y);
90 return HCost(node1, node2);
95 assert(!
"Not implemented");
106 return (
node.sector<<16)|
node.region;
129 GLdouble px, py, t, rad;
143 display.
FillCircle({
static_cast<float>(px),
static_cast<float>(py)}, rad,
GetColor());
int GetSector(int x, int y)
MinimalSectorAbstraction::GetSector()
std::vector< tempEdgeData > actions
virtual double GCost(const abstractGridState &node1, const abstractGridState &node2) const
double min(double a, double b)
abstractGridState GetAbstractState(const xyLoc &loc) const
virtual void DrawLine(Graphics::Display &display, const abstractGridState &x, const abstractGridState &y, float width=1.0) const
MinimalSectorAbstraction * msa
virtual uint64_t GetActionHash(abstractMove act) const
virtual bool GoalTest(const abstractGridState &node, const abstractGridState &goal) const
MinimalSectorAbstraction.
virtual void Draw(Graphics::Display &display) const
virtual void SetColor(const rgbColor &r) const
Map2DSectorAbstraction(Map *m, int sectorSize)
static const double ROOT_TWO
void GetXYLocation(unsigned int sector, unsigned int region, unsigned int &x, unsigned int &y) const
MinimalSectorAbstraction::GetXYLocation()
~Map2DSectorAbstraction()
virtual rgbColor GetColor() const
int GetRegion(int x, int y)
MinimalSectorAbstraction::GetRegion()
virtual uint64_t GetStateHash(const abstractGridState &node) const
bool operator==(const abstractGridState &s1, const abstractGridState &s2)
virtual void ApplyAction(abstractGridState &s, abstractMove a) const
xyLoc GetState(const abstractGridState &loc) const
void FillCircle(rect r, rgbColor c)
void DrawLine(Graphics::Display &disp, const xyLoc &x, const xyLoc &y, double width=1.0) const
void Draw(Graphics::Display &display) const
int GetAdjacentSector(unsigned int sector, int direction)
MinimalSectorAbstraction::GetAdjacentSector()
bool GetOpenGLCoord(int _x, int _y, GLdouble &x, GLdouble &y, GLdouble &z, GLdouble &radius) const
Get the openGL coordinates of a given tile.
std::vector< abstractGridState > nbr
void GetActions(const abstractGridState &nodeID, std::vector< abstractMove > &actions) const
virtual double HCost(const abstractGridState &node1, const abstractGridState &node2) const
Heuristic value between two arbitrary nodes.
void GetSuccessors(const abstractGridState &nodeID, std::vector< abstractGridState > &neighbors) const
void GetNeighbors(unsigned int sector, unsigned int region, std::vector< tempEdgeData > &edges) const
MinimalSectorAbstraction::GetNeighbors()
Nodes to be stored within a Graph.
A tile-based representation of the world.