Go to the documentation of this file.
18 :MapAbstraction(_m), radius(_radius)
33 if ((!from) || (!to) ||
42 if ((from == 0) || (to == 0))
88 while (abstractions.back()->GetNumEdges() > 0)
93 abstractions.push_back(g);
99 int count = abstractions.back()->GetNumNodes();
103 node *next = abstractions.back()->GetRandomNode();
110 assert(parent!=NULL);
124 Graph *g = abstractions.back();
132 if ((from != to) && (!(f = aGraph->
FindEdge(to, from))))
135 f =
new edge(from, to, weight);
153 abstractionBFS(abstractions.back()->GetNode(tmp), parent, depth-1);
159 assert(GetAbstractionLevel(n)+1 == GetAbstractionLevel(parent));
void SetLabelL(unsigned int index, long val) const
void SetLabelF(unsigned int index, double val) const
edge * FindEdge(unsigned int from, unsigned int to)
Finds an edge between nodes with ids from and to, no matter which direction.
unsigned int neighbor_iterator
virtual void RemoveNode(node *n)
remove node from abstraction
std::vector< edge * >::const_iterator edge_iterator
node * GetNode(unsigned long num)
edge * edgeIterNext(edge_iterator &) const
virtual void AddNode(node *n)
add node to abstraction
long GetLabelL(unsigned int index) const
void buildNodeIntoParent(node *n, node *parent)
Graph * GetMapGraph(Map *m)
GetMapGraph(map)
virtual bool Pathable(node *from, node *to)
edge_iterator getEdgeIter() const
void SetLabelL(unsigned int index, long val)
int nodeNeighborNext(neighbor_iterator &) const
unsigned int GetNum() const
virtual void VerifyHierarchy()
verify that the hierarchy is consistent
void abstractionBFS(node *which, node *parent, int depth)
long GetLabelL(unsigned int index) const
neighbor_iterator getNeighborIter() const
const double kUnknownPosition
virtual void RemoveEdge(edge *e, unsigned int absLevel)
remove edge from abstraction
RadiusAbstraction(Map *, int)
virtual void RepairAbstraction()
This must be called after any of the above add/remove operations.
virtual void AddEdge(edge *e, unsigned int absLevel)
add edge to abstraction
Nodes to be stored within a Graph.
A tile-based representation of the world.
Edge class for connections between node in a Graph.