HOG2
|
#include <MeroB.h>
Public Member Functions | |
MeroB () | |
MeroB (unsigned int v) | |
void | SetVersion (unsigned int v) |
virtual | ~MeroB () |
void | GetPath (GraphEnvironment *env, Graph *_g, graphState from, graphState to, std::vector< graphState > &thePath) |
void | SetHeuristic (Heuristic< graphState > *heur) |
virtual double | GetSolutionCost () |
virtual const char * | GetName () |
virtual int | GetSolutionEdges () |
uint64_t | GetNodesExpanded () |
uint64_t | GetNodesTouched () |
uint64_t | GetNodesReopened () |
bool | InitializeSearch (GraphEnvironment *env, Graph *g, graphState from, graphState to, std::vector< graphState > &thePath) |
bool | DoSingleSearchStep (std::vector< graphState > &thePath) |
bool | DoSingleStepA (std::vector< graphState > &thePath) |
bool | DoSingleStepB (std::vector< graphState > &thePath) |
bool | DoSingleStepBP (std::vector< graphState > &thePath) |
void | ExtractPathToStart (graphState goalNode, std::vector< graphState > &thePath) |
void | OpenGLDraw () const |
void | DrawText (double x, double y, double z, float r, float g, float b, char *str) |
void | DrawEdge (unsigned int from, unsigned int to, double weight) |
Public Member Functions inherited from GraphAlgorithm | |
virtual | ~GraphAlgorithm () |
Private Attributes | |
Heuristic< graphState > * | heuristic |
unsigned int | verID |
double | F |
uint64_t | nodesExpanded |
uint64_t | nodesTouched |
std::vector< graphState > | neighbors |
graphState | goal |
graphState | start |
GraphEnvironment * | env |
MeroBUtil::PQueue | openQueue |
MeroBUtil::NodeLookupTable | closedList |
MeroBUtil::GQueue | FCache |
Graph * | g |
|
inline |
|
virtual |
Implements GraphAlgorithm.
Definition at line 57 of file MeroB.cpp.
References DoSingleStepA(), DoSingleStepB(), DoSingleStepBP(), MB_B, MB_BP, and verID.
Referenced by GetPath().
bool MeroB::DoSingleStepA | ( | std::vector< graphState > & | thePath | ) |
Definition at line 70 of file MeroB.cpp.
References OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::Add(), closedList, MeroBUtil::SearchNode::copy(), MeroBUtil::SearchNode::currNode, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::DecreaseKey(), env, ExtractPathToStart(), MeroBUtil::SearchNode::fCost, fgreater(), OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::find(), MeroBUtil::SearchNode::gCost, GraphEnvironment::GCost(), GraphEnvironment::GetSuccessors(), goal, GraphEnvironment::GoalTest(), Heuristic< state >::HCost(), heuristic, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::IsIn(), neighbors, nodesExpanded, nodesTouched, openQueue, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::Remove(), OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::reset(), OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::size(), and verbose.
Referenced by DoSingleSearchStep().
bool MeroB::DoSingleStepB | ( | std::vector< graphState > & | thePath | ) |
Definition at line 180 of file MeroB.cpp.
References OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::Add(), closedList, MeroBUtil::SearchNode::copy(), MeroBUtil::SearchNode::currNode, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::DecreaseKey(), env, ExtractPathToStart(), F, FCache, MeroBUtil::SearchNode::fCost, fgreater(), OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::find(), fless(), MeroBUtil::SearchNode::gCost, GraphEnvironment::GCost(), GraphEnvironment::GetSuccessors(), goal, GraphEnvironment::GoalTest(), Heuristic< state >::HCost(), heuristic, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::IsIn(), neighbors, nodesExpanded, nodesTouched, openQueue, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::Remove(), OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::reset(), OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::size(), OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::top(), and verbose.
Referenced by DoSingleSearchStep().
bool MeroB::DoSingleStepBP | ( | std::vector< graphState > & | thePath | ) |
Definition at line 329 of file MeroB.cpp.
References OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::Add(), closedList, MeroBUtil::SearchNode::copy(), MeroBUtil::SearchNode::currNode, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::DecreaseKey(), env, ExtractPathToStart(), F, FCache, MeroBUtil::SearchNode::fCost, fgreater(), OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::find(), fless(), MeroBUtil::SearchNode::gCost, GraphEnvironment::GCost(), GraphEnvironment::GetSuccessors(), goal, GraphEnvironment::GoalTest(), Heuristic< state >::HCost(), heuristic, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::IncreaseKey(), OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::IsIn(), max, min(), neighbors, nodesExpanded, nodesTouched, openQueue, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::Remove(), OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::reset(), OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::size(), OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::top(), and verbose.
Referenced by DoSingleSearchStep().
void MeroB::DrawEdge | ( | unsigned int | from, |
unsigned int | to, | ||
double | weight | ||
) |
Definition at line 694 of file MeroB.cpp.
References DrawText(), g, MeroBUtil::graphGenerator::GetLoc(), and Graph::GetNode().
void MeroB::DrawText | ( | double | x, |
double | y, | ||
double | z, | ||
float | r, | ||
float | g, | ||
float | b, | ||
char * | str | ||
) |
Definition at line 673 of file MeroB.cpp.
Referenced by DrawEdge().
void MeroB::ExtractPathToStart | ( | graphState | goalNode, |
std::vector< graphState > & | thePath | ||
) |
Definition at line 550 of file MeroB.cpp.
References closedList, MeroBUtil::SearchNode::currNode, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::find(), openQueue, and MeroBUtil::SearchNode::prevNode.
Referenced by DoSingleStepA(), DoSingleStepB(), and DoSingleStepBP().
|
inlinevirtual |
Implements GraphAlgorithm.
|
inlinevirtual |
Implements GraphAlgorithm.
Definition at line 258 of file MeroB.h.
References nodesExpanded.
Referenced by GetPath().
|
inlinevirtual |
Implements GraphAlgorithm.
|
inlinevirtual |
Implements GraphAlgorithm.
Definition at line 259 of file MeroB.h.
References nodesTouched.
Referenced by GetPath().
|
virtual |
Implements GraphAlgorithm.
Definition at line 15 of file MeroB.cpp.
References DoSingleSearchStep(), GetNodesExpanded(), GetNodesTouched(), InitializeSearch(), and verbose.
|
inlinevirtual |
Implements GraphAlgorithm.
|
inlinevirtual |
Implements GraphAlgorithm.
|
virtual |
Implements GraphAlgorithm.
Definition at line 27 of file MeroB.cpp.
References OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::Add(), closedList, env, F, FCache, g, goal, Heuristic< state >::HCost(), heuristic, nodesExpanded, nodesTouched, openQueue, OpenClosedList< OBJ, HashKey, EqKey, CmpKey >::reset(), start, and UINT32_MAX.
Referenced by GetPath().
|
virtual |
Implements GraphAlgorithm.
|
inline |
|
inline |
|
private |
Definition at line 282 of file MeroB.h.
Referenced by DoSingleStepA(), DoSingleStepB(), DoSingleStepBP(), ExtractPathToStart(), and InitializeSearch().
|
private |
Definition at line 280 of file MeroB.h.
Referenced by DoSingleStepA(), DoSingleStepB(), DoSingleStepBP(), and InitializeSearch().
|
private |
Definition at line 276 of file MeroB.h.
Referenced by DoSingleStepB(), DoSingleStepBP(), and InitializeSearch().
|
private |
Definition at line 283 of file MeroB.h.
Referenced by DoSingleStepB(), DoSingleStepBP(), and InitializeSearch().
|
private |
Definition at line 285 of file MeroB.h.
Referenced by DrawEdge(), and InitializeSearch().
|
private |
Definition at line 279 of file MeroB.h.
Referenced by DoSingleStepA(), DoSingleStepB(), DoSingleStepBP(), and InitializeSearch().
|
private |
Definition at line 274 of file MeroB.h.
Referenced by DoSingleStepA(), DoSingleStepB(), DoSingleStepBP(), InitializeSearch(), MeroB(), and SetHeuristic().
|
private |
Definition at line 278 of file MeroB.h.
Referenced by DoSingleStepA(), DoSingleStepB(), and DoSingleStepBP().
|
private |
Definition at line 277 of file MeroB.h.
Referenced by DoSingleStepA(), DoSingleStepB(), DoSingleStepBP(), GetNodesExpanded(), and InitializeSearch().
|
private |
Definition at line 277 of file MeroB.h.
Referenced by DoSingleStepA(), DoSingleStepB(), DoSingleStepBP(), GetNodesTouched(), and InitializeSearch().
|
private |
Definition at line 281 of file MeroB.h.
Referenced by DoSingleStepA(), DoSingleStepB(), DoSingleStepBP(), ExtractPathToStart(), and InitializeSearch().
|
private |
Definition at line 279 of file MeroB.h.
Referenced by InitializeSearch().
|
private |
Definition at line 275 of file MeroB.h.
Referenced by DoSingleSearchStep(), MeroB(), and SetVersion().