HOG2
Public Member Functions | Private Attributes | List of all members
MeroB Class Reference

#include <MeroB.h>

Inheritance diagram for MeroB:
Inheritance graph
[legend]
Collaboration diagram for MeroB:
Collaboration graph
[legend]

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< graphStateneighbors
 
graphState goal
 
graphState start
 
GraphEnvironmentenv
 
MeroBUtil::PQueue openQueue
 
MeroBUtil::NodeLookupTable closedList
 
MeroBUtil::GQueue FCache
 
Graphg
 

Detailed Description

Definition at line 245 of file MeroB.h.

Constructor & Destructor Documentation

◆ MeroB() [1/2]

MeroB::MeroB ( )
inline

Definition at line 247 of file MeroB.h.

References heuristic, MB_A, and verID.

◆ MeroB() [2/2]

MeroB::MeroB ( unsigned int  v)
inline

Definition at line 248 of file MeroB.h.

References verID.

◆ ~MeroB()

virtual MeroB::~MeroB ( )
inlinevirtual

Definition at line 250 of file MeroB.h.

Member Function Documentation

◆ DoSingleSearchStep()

bool MeroB::DoSingleSearchStep ( std::vector< graphState > &  thePath)
virtual

Implements GraphAlgorithm.

Definition at line 57 of file MeroB.cpp.

References DoSingleStepA(), DoSingleStepB(), DoSingleStepBP(), MB_B, MB_BP, and verID.

Referenced by GetPath().

◆ DoSingleStepA()

bool MeroB::DoSingleStepA ( std::vector< graphState > &  thePath)

◆ DoSingleStepB()

bool MeroB::DoSingleStepB ( std::vector< graphState > &  thePath)

◆ DoSingleStepBP()

bool MeroB::DoSingleStepBP ( std::vector< graphState > &  thePath)

◆ DrawEdge()

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().

◆ DrawText()

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().

◆ ExtractPathToStart()

void MeroB::ExtractPathToStart ( graphState  goalNode,
std::vector< graphState > &  thePath 
)

◆ GetName()

virtual const char* MeroB::GetName ( )
inlinevirtual

Implements GraphAlgorithm.

Definition at line 254 of file MeroB.h.

◆ GetNodesExpanded()

uint64_t MeroB::GetNodesExpanded ( )
inlinevirtual

Implements GraphAlgorithm.

Definition at line 258 of file MeroB.h.

References nodesExpanded.

Referenced by GetPath().

◆ GetNodesReopened()

uint64_t MeroB::GetNodesReopened ( )
inlinevirtual

Implements GraphAlgorithm.

Definition at line 260 of file MeroB.h.

◆ GetNodesTouched()

uint64_t MeroB::GetNodesTouched ( )
inlinevirtual

Implements GraphAlgorithm.

Definition at line 259 of file MeroB.h.

References nodesTouched.

Referenced by GetPath().

◆ GetPath()

void MeroB::GetPath ( GraphEnvironment env,
Graph _g,
graphState  from,
graphState  to,
std::vector< graphState > &  thePath 
)
virtual

◆ GetSolutionCost()

virtual double MeroB::GetSolutionCost ( )
inlinevirtual

Implements GraphAlgorithm.

Definition at line 253 of file MeroB.h.

◆ GetSolutionEdges()

virtual int MeroB::GetSolutionEdges ( )
inlinevirtual

Implements GraphAlgorithm.

Definition at line 255 of file MeroB.h.

◆ InitializeSearch()

bool MeroB::InitializeSearch ( GraphEnvironment env,
Graph g,
graphState  from,
graphState  to,
std::vector< graphState > &  thePath 
)
virtual

◆ OpenGLDraw()

void MeroB::OpenGLDraw ( ) const
virtual

Implements GraphAlgorithm.

Definition at line 574 of file MeroB.cpp.

◆ SetHeuristic()

void MeroB::SetHeuristic ( Heuristic< graphState > *  heur)
inline

Definition at line 252 of file MeroB.h.

References heuristic.

◆ SetVersion()

void MeroB::SetVersion ( unsigned int  v)
inline

Definition at line 249 of file MeroB.h.

References verID.

Member Data Documentation

◆ closedList

MeroBUtil::NodeLookupTable MeroB::closedList
private

◆ env

GraphEnvironment* MeroB::env
private

Definition at line 280 of file MeroB.h.

Referenced by DoSingleStepA(), DoSingleStepB(), DoSingleStepBP(), and InitializeSearch().

◆ F

double MeroB::F
private

Definition at line 276 of file MeroB.h.

Referenced by DoSingleStepB(), DoSingleStepBP(), and InitializeSearch().

◆ FCache

MeroBUtil::GQueue MeroB::FCache
private

Definition at line 283 of file MeroB.h.

Referenced by DoSingleStepB(), DoSingleStepBP(), and InitializeSearch().

◆ g

Graph* MeroB::g
private

Definition at line 285 of file MeroB.h.

Referenced by DrawEdge(), and InitializeSearch().

◆ goal

graphState MeroB::goal
private

Definition at line 279 of file MeroB.h.

Referenced by DoSingleStepA(), DoSingleStepB(), DoSingleStepBP(), and InitializeSearch().

◆ heuristic

Heuristic<graphState>* MeroB::heuristic
private

◆ neighbors

std::vector<graphState> MeroB::neighbors
private

Definition at line 278 of file MeroB.h.

Referenced by DoSingleStepA(), DoSingleStepB(), and DoSingleStepBP().

◆ nodesExpanded

uint64_t MeroB::nodesExpanded
private

◆ nodesTouched

uint64_t MeroB::nodesTouched
private

◆ openQueue

MeroBUtil::PQueue MeroB::openQueue
private

◆ start

graphState MeroB::start
private

Definition at line 279 of file MeroB.h.

Referenced by InitializeSearch().

◆ verID

unsigned int MeroB::verID
private

Definition at line 275 of file MeroB.h.

Referenced by DoSingleSearchStep(), MeroB(), and SetVersion().


The documentation for this class was generated from the following files: