HOG2
|
#include <NodeLimitAbstraction.h>
Public Member Functions | |
NodeLimitAbstraction (Map *, int nodeLimit) | |
~NodeLimitAbstraction () | |
MapAbstraction * | Clone (Map *_m) |
virtual bool | Pathable (node *from, node *to) |
virtual void | VerifyHierarchy () |
verify that the hierarchy is consistent More... | |
virtual void | RemoveNode (node *n) |
remove node from abstraction More... | |
virtual void | RemoveEdge (edge *e, unsigned int absLevel) |
remove edge from abstraction More... | |
virtual void | AddNode (node *n) |
add node to abstraction More... | |
virtual void | AddEdge (edge *e, unsigned int absLevel) |
add edge to abstraction More... | |
virtual void | RepairAbstraction () |
This must be called after any of the above add/remove operations. More... | |
Private Member Functions | |
void | buildAbstraction () |
void | buildNodeIntoParent (node *n, node *parent) |
void | abstractionBFS (node *which, node *parent, int depth) |
void | addEdges (Graph *g) |
void | addNodes (Graph *g) |
Private Attributes | |
int | nodeLimit |
Definition at line 31 of file NodeLimitAbstraction.h.
NodeLimitAbstraction::NodeLimitAbstraction | ( | Map * | _m, |
int | nodeLimit | ||
) |
Definition at line 32 of file NodeLimitAbstraction.cpp.
References buildAbstraction().
Referenced by Clone().
NodeLimitAbstraction::~NodeLimitAbstraction | ( | ) |
Definition at line 40 of file NodeLimitAbstraction.cpp.
Definition at line 158 of file NodeLimitAbstraction.cpp.
References buildNodeIntoParent(), Graph::GetNode(), graph_object::key, and GraphAbstractionConstants::kParent.
Referenced by addNodes().
|
virtual |
add edge to abstraction
Definition at line 87 of file NodeLimitAbstraction.cpp.
|
private |
Definition at line 137 of file NodeLimitAbstraction.cpp.
References Graph::AddEdge(), Graph::edgeIterNext(), Graph::FindEdge(), Graph::getEdgeIter(), edge::GetLabelL(), node::GetLabelL(), Graph::GetNode(), GraphAbstractionConstants::kEdgeCapacity, GraphAbstractionConstants::kParent, and edge::SetLabelL().
Referenced by buildAbstraction().
|
virtual |
add node to abstraction
Definition at line 80 of file NodeLimitAbstraction.cpp.
|
private |
Definition at line 112 of file NodeLimitAbstraction.cpp.
References abstractionBFS(), Graph::AddNode(), node::GetLabelL(), GraphAbstractionConstants::kAbstractionLevel, GraphAbstractionConstants::kNodeBlocked, GraphAbstractionConstants::kNumAbstractedNodes, GraphAbstractionConstants::kParent, GraphAbstractionConstants::kUnknownPosition, GraphAbstractionConstants::kXCoordinate, nodeLimit, node::SetLabelF(), and node::SetLabelL().
Referenced by buildAbstraction().
|
private |
Definition at line 99 of file NodeLimitAbstraction.cpp.
References addEdges(), addNodes(), and GetMapGraph().
Referenced by NodeLimitAbstraction().
Definition at line 209 of file NodeLimitAbstraction.cpp.
References node::GetLabelL(), node::GetNum(), GraphAbstractionConstants::kFirstData, GraphAbstractionConstants::kNumAbstractedNodes, GraphAbstractionConstants::kParent, GraphAbstractionConstants::kUnknownPosition, GraphAbstractionConstants::kXCoordinate, node::SetLabelF(), and node::SetLabelL().
Referenced by abstractionBFS().
|
inline |
Definition at line 35 of file NodeLimitAbstraction.h.
References nodeLimit, and NodeLimitAbstraction().
Definition at line 44 of file NodeLimitAbstraction.cpp.
References node::GetLabelL(), GraphAbstractionConstants::kAbstractionLevel, and GraphAbstractionConstants::kParent.
|
virtual |
remove edge from abstraction
Definition at line 75 of file NodeLimitAbstraction.cpp.
|
virtual |
remove node from abstraction
Definition at line 70 of file NodeLimitAbstraction.cpp.
|
virtual |
This must be called after any of the above add/remove operations.
But the operations can be stacked followed by a single RepairAbstraction call.
Definition at line 95 of file NodeLimitAbstraction.cpp.
|
virtual |
verify that the hierarchy is consistent
Definition at line 64 of file NodeLimitAbstraction.cpp.
|
private |
Definition at line 63 of file NodeLimitAbstraction.h.
Referenced by addNodes(), and Clone().