HOG2
|
#include <IRAStar.h>
Public Member Functions | |
IRAStar (IRAStarConstants::Caching caching=IRAStarConstants::P_G_CACHING) | |
virtual | ~IRAStar () |
virtual const char * | GetName () |
virtual path * | GetPath (GraphAbstraction *aMap, node *from, node *to, reservationProvider *rp=0) |
path * | DoOneSearchStep () |
bool | InitializeSearch (GraphAbstraction *aMap, node *from, node *to) |
void | OpenGLDraw () const |
int | GetNodesRefined () |
Public Member Functions inherited from SearchAlgorithm | |
SearchAlgorithm () | |
virtual | ~SearchAlgorithm () |
uint64_t | GetNodesExpanded () |
uint64_t | GetNodesTouched () |
virtual void | LogFinalStats (StatCollection *) |
Private Member Functions | |
node * | FindTopLevelNode (node *one, node *two, GraphAbstraction *aMap) |
void | SetInitialValues (node *gNewNode, node *aRealNode, node *gParent) |
void | RefineNode (node *gNode) |
node * | GetRealNode (node *gNode) const |
bool | ShouldAddEdge (node *aLowerNode, node *aHigherNode) |
void | GetAllSolutionNodes (node *goal, std::vector< node * > &nodes) |
bool | Inconsistent (node *gNode) |
void | ExpandNeighbors (node *gNode) |
path * | ExtractAndRefinePath () |
path * | GetSolution (node *gNode) |
void | SetHValues (int f) |
double | GetHCost (node *) const |
void | SetHCost (node *, double) |
double | GetGCost (node *) const |
void | SetGCost (node *, double) |
double | GetFCost (node *) const |
Private Attributes | |
IRAStarConstants::PQueue | q |
IRAStarConstants::NodeLookupTable | closedList |
node * | aStart |
node * | aGoal |
node * | gStart |
node * | gGoal |
GraphAbstraction * | absGraph |
Graph * | g |
int | nodesRefined |
int | currentIteration |
IRAStarConstants::Caching | caching |
std::vector< double > | iterationLimits |
bool | done |
Additional Inherited Members | |
Public Attributes inherited from SearchAlgorithm | |
uint32_t | nodesExpanded |
uint32_t | nodesTouched |
IRAStar::IRAStar | ( | IRAStarConstants::Caching | caching = IRAStarConstants::P_G_CACHING | ) |
Definition at line 19 of file IRAStar.cpp.
References g.
|
virtual |
Definition at line 25 of file IRAStar.cpp.
path * IRAStar::DoOneSearchStep | ( | ) |
Definition at line 47 of file IRAStar.cpp.
References OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::Add(), caching, closedList, done, ExpandNeighbors(), ExtractAndRefinePath(), fequal(), GetFCost(), node::GetNum(), gGoal, Inconsistent(), IRAStarConstants::GNode::n, SearchAlgorithm::nodesExpanded, IRAStarConstants::OPTIMAL_PATH_CACHING, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::pop(), q, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::reset(), OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::size(), and OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::top().
Referenced by GetPath().
|
private |
Definition at line 230 of file IRAStar.cpp.
References OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::Add(), caching, closedList, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::DecreaseKey(), Graph::FindEdge(), fless(), g, GetGCost(), node::getNeighborIter(), Graph::GetNode(), node::GetNum(), edge::GetWeight(), OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::IsIn(), node::nodeNeighborNext(), SearchAlgorithm::nodesTouched, IRAStarConstants::OPTIMAL_PATH_CACHING, q, and SetGCost().
Referenced by DoOneSearchStep().
|
private |
Definition at line 281 of file IRAStar.cpp.
References OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::Add(), caching, closedList, currentIteration, done, GetAllSolutionNodes(), GetGCost(), GetSolution(), gGoal, gStart, iterationLimits, GraphAbstractionConstants::kAbstractionLevel, path::length(), path::next, IRAStarConstants::OPTIMAL_PATH_CACHING, IRAStarConstants::P_G_CACHING, q, RefineNode(), OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::reset(), SetGCost(), SetHCost(), and SetHValues().
Referenced by DoOneSearchStep().
|
private |
Definition at line 132 of file IRAStar.cpp.
References GraphAbstraction::GetAbstractionLevel(), GraphAbstraction::getNumAbstractGraphs(), and GraphAbstraction::GetParent().
Referenced by InitializeSearch().
Definition at line 335 of file IRAStar.cpp.
References closedList, fgreater(), g, GetGCost(), node::getNeighborIter(), Graph::GetNode(), node::GetNum(), and node::nodeNeighborNext().
Referenced by ExtractAndRefinePath().
|
private |
Definition at line 667 of file IRAStar.cpp.
References node::GetLabelF(), CFOptimalRefinementConstants::kGCost, and CFOptimalRefinementConstants::kHCost.
Referenced by DoOneSearchStep().
|
private |
Definition at line 657 of file IRAStar.cpp.
References node::GetLabelF(), and CFOptimalRefinementConstants::kGCost.
Referenced by ExpandNeighbors(), ExtractAndRefinePath(), GetAllSolutionNodes(), GetSolution(), and SetHValues().
|
private |
Definition at line 619 of file IRAStar.cpp.
References node::GetLabelF(), and CFOptimalRefinementConstants::kHCost.
Referenced by Inconsistent(), OpenGLDraw(), and SetInitialValues().
|
virtual |
Implements SearchAlgorithm.
Definition at line 29 of file IRAStar.cpp.
|
inline |
Definition at line 88 of file IRAStar.h.
References nodesRefined.
|
virtual |
Implements SearchAlgorithm.
Definition at line 34 of file IRAStar.cpp.
References DoOneSearchStep(), and InitializeSearch().
Definition at line 470 of file IRAStar.cpp.
References absGraph, GraphAbstraction::GetAbstractGraph(), node::GetLabelL(), Graph::GetNode(), GraphAbstractionConstants::kAbstractionLevel, and CFOptimalRefinementConstants::kCorrespondingNode.
Referenced by OpenGLDraw(), and RefineNode().
Definition at line 363 of file IRAStar.cpp.
References closedList, fequal(), Graph::FindEdge(), g, GetGCost(), node::getNeighborIter(), Graph::GetNode(), node::GetNum(), edge::GetWeight(), node::nodeNeighborNext(), and path.
Referenced by ExtractAndRefinePath().
|
private |
Definition at line 192 of file IRAStar.cpp.
References OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::DecreaseKey(), Graph::FindEdge(), fless(), g, GetHCost(), node::getNeighborIter(), Graph::GetNode(), node::GetNum(), edge::GetWeight(), OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::IsIn(), node::nodeNeighborNext(), q, and SetHCost().
Referenced by DoOneSearchStep().
bool IRAStar::InitializeSearch | ( | GraphAbstraction * | aMap, |
node * | from, | ||
node * | to | ||
) |
Definition at line 106 of file IRAStar.cpp.
References absGraph, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::Add(), Graph::AddNode(), aGoal, aStart, closedList, currentIteration, FindTopLevelNode(), g, gGoal, gStart, SearchAlgorithm::nodesExpanded, nodesRefined, SearchAlgorithm::nodesTouched, q, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::reset(), and SetInitialValues().
Referenced by GetPath().
void IRAStar::OpenGLDraw | ( | ) | const |
Definition at line 487 of file IRAStar.cpp.
References absGraph, closedList, Graph::edgeIterNext(), g, Graph::getEdgeIter(), GetHCost(), Graph::GetNode(), GraphAbstraction::GetNodeLoc(), node::GetNum(), Graph::GetNumNodes(), GetRealNode(), gGoal, gStart, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::IsIn(), MAX_HEURISTIC_VALUE, IRAStarConstants::GNode::n, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::peek(), q, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::top(), recVec::x, recVec::y, and recVec::z.
|
private |
Definition at line 383 of file IRAStar.cpp.
References absGraph, Graph::AddEdge(), Graph::AddNode(), aGoal, aStart, Graph::findDirectedEdge(), Graph::FindEdge(), g, GraphAbstraction::GetAbstractGraph(), GraphAbstraction::GetAbstractionLevel(), node::GetLabelL(), node::getNeighborIter(), Graph::GetNode(), GraphAbstraction::GetNthChild(), node::GetNum(), GraphAbstraction::GetNumChildren(), GetRealNode(), gStart, GraphAbstractionConstants::kAbstractionLevel, node::nodeNeighborNext(), nodesRefined, Graph::RemoveNode(), SetInitialValues(), and ShouldAddEdge().
Referenced by ExtractAndRefinePath().
|
private |
Definition at line 662 of file IRAStar.cpp.
References CFOptimalRefinementConstants::kGCost, and node::SetLabelF().
Referenced by ExpandNeighbors(), ExtractAndRefinePath(), and SetInitialValues().
|
private |
Definition at line 629 of file IRAStar.cpp.
References CFOptimalRefinementConstants::kHCost, and node::SetLabelF().
Referenced by ExtractAndRefinePath(), Inconsistent(), SetHValues(), and SetInitialValues().
|
private |
Definition at line 599 of file IRAStar.cpp.
References closedList, GetGCost(), and SetHCost().
Referenced by ExtractAndRefinePath().
Definition at line 155 of file IRAStar.cpp.
References absGraph, aGoal, aStart, GraphAbstraction::GetAbstractionLevel(), GetHCost(), node::GetNum(), gGoal, gStart, GraphAbstraction::IsParentOf(), GraphAbstractionConstants::kAbstractionLevel, CFOptimalRefinementConstants::kCorrespondingNode, SetGCost(), SetHCost(), and node::SetLabelL().
Referenced by InitializeSearch(), and RefineNode().
Definition at line 475 of file IRAStar.cpp.
References absGraph, GraphAbstraction::GetAbstractGraph(), GraphAbstraction::GetAbstractionLevel(), node::getNeighborIter(), Graph::GetNode(), GraphAbstraction::IsParentOf(), and node::nodeNeighborNext().
Referenced by RefineNode().
|
private |
Definition at line 119 of file IRAStar.h.
Referenced by GetRealNode(), InitializeSearch(), OpenGLDraw(), RefineNode(), SetInitialValues(), and ShouldAddEdge().
|
private |
Definition at line 117 of file IRAStar.h.
Referenced by InitializeSearch(), RefineNode(), and SetInitialValues().
|
private |
Definition at line 117 of file IRAStar.h.
Referenced by InitializeSearch(), RefineNode(), and SetInitialValues().
|
private |
Definition at line 123 of file IRAStar.h.
Referenced by DoOneSearchStep(), ExpandNeighbors(), and ExtractAndRefinePath().
|
private |
Definition at line 116 of file IRAStar.h.
Referenced by DoOneSearchStep(), ExpandNeighbors(), ExtractAndRefinePath(), GetAllSolutionNodes(), GetSolution(), InitializeSearch(), OpenGLDraw(), and SetHValues().
|
private |
Definition at line 122 of file IRAStar.h.
Referenced by ExtractAndRefinePath(), and InitializeSearch().
|
private |
Definition at line 125 of file IRAStar.h.
Referenced by DoOneSearchStep(), and ExtractAndRefinePath().
|
private |
Definition at line 120 of file IRAStar.h.
Referenced by ExpandNeighbors(), GetAllSolutionNodes(), GetSolution(), Inconsistent(), InitializeSearch(), IRAStar(), OpenGLDraw(), and RefineNode().
|
private |
Definition at line 118 of file IRAStar.h.
Referenced by DoOneSearchStep(), ExtractAndRefinePath(), InitializeSearch(), OpenGLDraw(), and SetInitialValues().
|
private |
Definition at line 118 of file IRAStar.h.
Referenced by ExtractAndRefinePath(), InitializeSearch(), OpenGLDraw(), RefineNode(), and SetInitialValues().
|
private |
Definition at line 124 of file IRAStar.h.
Referenced by ExtractAndRefinePath().
|
private |
Definition at line 121 of file IRAStar.h.
Referenced by GetNodesRefined(), InitializeSearch(), and RefineNode().
|
private |
Definition at line 115 of file IRAStar.h.
Referenced by DoOneSearchStep(), ExpandNeighbors(), ExtractAndRefinePath(), Inconsistent(), InitializeSearch(), and OpenGLDraw().