HOG2
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GraphDistanceHeuristic Class Reference

#include <GraphEnvironment.h>

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

Public Member Functions

 GraphDistanceHeuristic (Graph *graph)
 
 ~GraphDistanceHeuristic ()
 
virtual double HCost (const graphState &state1, const graphState &state2) const
 
void AddHeuristic (node *n=0)
 
int GetNumHeuristics ()
 
void SetPlacement (placementScheme s)
 
GraphGetGraph ()
 
void ChooseStartGoal (graphState &start, graphState &goal)
 
virtual void OpenGLDraw () const
 
- Public Member Functions inherited from GraphHeuristic
virtual ~GraphHeuristic ()
 

Protected Member Functions

void GetOptimalDistances (node *n, std::vector< double > &values)
 
void AddHeuristic (std::vector< double > &values, graphState location)
 
nodeFindFarNode (node *n)
 
nodeFindAvoidNode (node *n)
 
nodeFindBestChild (int best, std::vector< double > &dist, std::vector< double > &weight)
 
void ComputeSizes (node *n, std::vector< double > &dist, std::vector< double > &weight, std::vector< double > &sizes)
 

Protected Attributes

placementScheme placement
 
Graphg
 
std::vector< std::vector< double > > heuristics
 
std::vector< graphStatelocations
 
std::vector< double > dist
 
std::vector< double > weight
 
std::vector< double > sizes
 

Detailed Description

Definition at line 222 of file GraphEnvironment.h.

Constructor & Destructor Documentation

◆ GraphDistanceHeuristic()

GraphDistanceHeuristic::GraphDistanceHeuristic ( Graph graph)
inline

Definition at line 224 of file GraphEnvironment.h.

References kRandomPlacement, and placement.

◆ ~GraphDistanceHeuristic()

GraphDistanceHeuristic::~GraphDistanceHeuristic ( )
inline

Definition at line 225 of file GraphEnvironment.h.

Member Function Documentation

◆ AddHeuristic() [1/2]

void GraphDistanceHeuristic::AddHeuristic ( node n = 0)

◆ AddHeuristic() [2/2]

void GraphDistanceHeuristic::AddHeuristic ( std::vector< double > &  values,
graphState  location 
)
protected

Definition at line 1579 of file GraphEnvironment.cpp.

References heuristics, and locations.

◆ ChooseStartGoal()

void GraphDistanceHeuristic::ChooseStartGoal ( graphState start,
graphState goal 
)
virtual

Reimplemented from GraphHeuristic.

Definition at line 1540 of file GraphEnvironment.cpp.

References heuristics.

◆ ComputeSizes()

void GraphDistanceHeuristic::ComputeSizes ( node n,
std::vector< double > &  dist,
std::vector< double > &  weight,
std::vector< double > &  sizes 
)
protected

◆ FindAvoidNode()

node * GraphDistanceHeuristic::FindAvoidNode ( node n)
protected

◆ FindBestChild()

node * GraphDistanceHeuristic::FindBestChild ( int  best,
std::vector< double > &  dist,
std::vector< double > &  weight 
)
protected

◆ FindFarNode()

node * GraphDistanceHeuristic::FindFarNode ( node n)
protected

◆ GetGraph()

Graph* GraphDistanceHeuristic::GetGraph ( )
inlinevirtual

Implements GraphHeuristic.

Definition at line 230 of file GraphEnvironment.h.

References g.

Referenced by MyRandomUnitKeyHandler().

◆ GetNumHeuristics()

int GraphDistanceHeuristic::GetNumHeuristics ( )
inline

Definition at line 228 of file GraphEnvironment.h.

References heuristics.

Referenced by GraphMapInconsistentHeuristic::SetNumUsedHeuristics().

◆ GetOptimalDistances()

void GraphDistanceHeuristic::GetOptimalDistances ( node n,
std::vector< double > &  values 
)
protected

◆ HCost()

double GraphDistanceHeuristic::HCost ( const graphState state1,
const graphState state2 
) const
virtual

◆ OpenGLDraw()

void GraphDistanceHeuristic::OpenGLDraw ( ) const
virtual

◆ SetPlacement()

void GraphDistanceHeuristic::SetPlacement ( placementScheme  s)
inline

Definition at line 229 of file GraphEnvironment.h.

References placement.

Referenced by MyPathfindingKeyHandler(), and MyRandomUnitKeyHandler().

Member Data Documentation

◆ dist

std::vector<double> GraphDistanceHeuristic::dist
protected

Definition at line 249 of file GraphEnvironment.h.

Referenced by ComputeSizes(), FindAvoidNode(), FindBestChild(), and OpenGLDraw().

◆ g

Graph* GraphDistanceHeuristic::g
protected

◆ heuristics

std::vector<std::vector<double> > GraphDistanceHeuristic::heuristics
protected

◆ locations

std::vector<graphState> GraphDistanceHeuristic::locations
protected

◆ placement

placementScheme GraphDistanceHeuristic::placement
protected

Definition at line 243 of file GraphEnvironment.h.

Referenced by AddHeuristic(), GraphDistanceHeuristic(), and SetPlacement().

◆ sizes

std::vector<double> GraphDistanceHeuristic::sizes
protected

Definition at line 251 of file GraphEnvironment.h.

Referenced by ComputeSizes(), FindAvoidNode(), FindBestChild(), and OpenGLDraw().

◆ weight

std::vector<double> GraphDistanceHeuristic::weight
protected

Definition at line 250 of file GraphEnvironment.h.

Referenced by ComputeSizes(), FindAvoidNode(), and OpenGLDraw().


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