HOG2
|
Corridor AStar builds a a* path between two nodes, restricting itself to a particular corridor, if defined. More...
#include <CorridorAStar.h>
Public Member Functions | |
corridorAStar () | |
virtual | ~corridorAStar () |
path * | GetPath (GraphAbstraction *aMap, node *from, node *to, reservationProvider *rp=0) |
path * | getBestPath (GraphAbstraction *aMap, node *from, node *to, node *hGoal, reservationProvider *rp=0) |
get the best path from FROM to TO. More... | |
path * | getBestPath (GraphAbstraction *aMap, node *afrom, node *ato, node *from, node *to, reservationProvider *rp=0) |
get the best path from aFROM to aTO. More... | |
void | setCorridor (const std::vector< node * > *) |
virtual const char * | GetName () |
Public Member Functions inherited from SearchAlgorithm | |
SearchAlgorithm () | |
virtual | ~SearchAlgorithm () |
uint64_t | GetNodesExpanded () |
uint64_t | GetNodesTouched () |
virtual void | LogFinalStats (StatCollection *) |
Private Member Functions | |
void | relaxEdge (Heap *nodeHeap, Graph *g, GraphAbstraction *aMap, edge *e, node *from, node *to, node *dest) |
void | relaxFirstEdge (Heap *nodeHeap, Graph *g, GraphAbstraction *aMap, edge *e, node *from, node *afrom, node *ato, node *dest) |
void | relaxFinalEdge (Heap *nodeHeap, Graph *g, GraphAbstraction *aMap, edge *e, node *from, node *to, node *realDest) |
path * | extractBestPath (Graph *g, unsigned int current) |
Private Attributes | |
const std::vector< node * > * | corridor |
std::vector< node * > | emptyCorridor |
Additional Inherited Members | |
Public Attributes inherited from SearchAlgorithm | |
uint32_t | nodesExpanded |
uint32_t | nodesTouched |
Corridor AStar builds a a* path between two nodes, restricting itself to a particular corridor, if defined.
The corridor must be set before every search if it is to be used properly. After each GetPath call the corridor is reset. If no corridor is defined, it will explore all nodes.
Definition at line 25 of file CorridorAStar.h.
corridorAStar::corridorAStar | ( | ) |
Definition at line 18 of file CorridorAStar.cpp.
|
inlinevirtual |
Definition at line 28 of file CorridorAStar.h.
Definition at line 337 of file CorridorAStar.cpp.
References edge::getFrom(), node::getMarkedEdge(), Graph::GetNode(), edge::getTo(), path, edge::setMarked(), and verbose.
path * corridorAStar::getBestPath | ( | GraphAbstraction * | aMap, |
node * | afrom, | ||
node * | ato, | ||
node * | from, | ||
node * | to, | ||
reservationProvider * | rp = 0 |
||
) |
get the best path from aFROM to aTO.
Use an insertion edge cost from the original from/to.
Definition at line 148 of file CorridorAStar.cpp.
References Heap::Add(), Graph::FindEdge(), GraphAbstraction::GetAbstractGraph(), node::GetLabelF(), node::GetLabelL(), node::getNeighborIter(), Graph::GetNode(), GraphAbstraction::GetNthParent(), node::GetNum(), GraphAbstraction::h(), Heap::IsIn(), GraphAbstractionConstants::kAbstractionLevel, graph_object::key, GraphAbstractionConstants::kFirstData, GraphAbstractionConstants::kTemporaryLabel, node::markEdge(), MAXINT, node::nodeNeighborNext(), reservationProvider::nodeOccupied(), Heap::Remove(), node::SetLabelF(), and verbose.
path * corridorAStar::getBestPath | ( | GraphAbstraction * | aMap, |
node * | from, | ||
node * | to, | ||
node * | hGoal, | ||
reservationProvider * | rp = 0 |
||
) |
get the best path from FROM to TO.
Use hGoal as the heuristic goal. If TO is not on the same level as from path will be returned that ends inside the child of TO.
Definition at line 33 of file CorridorAStar.cpp.
References Heap::Add(), Graph::FindEdge(), GraphAbstraction::GetAbstractGraph(), node::GetLabelF(), node::GetLabelL(), node::getNeighborIter(), Graph::GetNode(), GraphAbstraction::GetNthParent(), node::GetNum(), GraphAbstraction::h(), Heap::IsIn(), GraphAbstractionConstants::kAbstractionLevel, graph_object::key, GraphAbstractionConstants::kFirstData, GraphAbstractionConstants::kTemporaryLabel, node::markEdge(), MAXINT, node::nodeNeighborNext(), reservationProvider::nodeOccupied(), Heap::Remove(), node::SetLabelF(), and verbose.
Referenced by praStar2::buildNextAbstractPath(), and craStar::buildNextAbstractPath().
|
inlinevirtual |
Implements SearchAlgorithm.
Definition at line 36 of file CorridorAStar.h.
|
virtual |
Implements SearchAlgorithm.
Definition at line 28 of file CorridorAStar.cpp.
Referenced by praStar2::buildNextAbstractPath(), and craStar::buildNextAbstractPath().
|
private |
Definition at line 286 of file CorridorAStar.cpp.
References Heap::DecreaseKey(), fless(), node::GetLabelF(), node::GetNum(), edge::GetWeight(), GraphAbstraction::h(), GraphAbstractionConstants::kTemporaryLabel, node::markEdge(), node::SetLabelF(), and verbose.
|
private |
Definition at line 320 of file CorridorAStar.cpp.
References Heap::DecreaseKey(), fless(), node::GetLabelF(), node::GetNum(), GraphAbstraction::h(), GraphAbstractionConstants::kTemporaryLabel, node::markEdge(), node::SetLabelF(), and verbose.
|
private |
Definition at line 303 of file CorridorAStar.cpp.
References Heap::DecreaseKey(), fless(), node::GetLabelF(), node::GetNum(), GraphAbstraction::h(), GraphAbstractionConstants::kTemporaryLabel, node::markEdge(), node::SetLabelF(), and verbose.
void corridorAStar::setCorridor | ( | const std::vector< node * > * | c | ) |
Definition at line 23 of file CorridorAStar.cpp.
Referenced by praStar2::buildNextAbstractPath(), and craStar::buildNextAbstractPath().
|
private |
Definition at line 46 of file CorridorAStar.h.
|
private |
Definition at line 47 of file CorridorAStar.h.