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

#include <LoadedBBAbstraction.h>

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

Classes

class  BoundingBox
 

Public Member Functions

 LoadedBBAbstraction (char *, char *)
 Construct a new Graph hierarchy. More...
 
virtual ~LoadedBBAbstraction ()
 
virtual void VerifyHierarchy ()
 verify that the hierarchy is consistent More...
 
double h (node *a, node *b)
 heuristic cost between any two nodes More...
 
bool Pathable (node *from, node *to)
 is there a legal path between these 2 nodes? More...
 
bool Pathable (unsigned int from, unsigned int to)
 
void GetNumAbstractGraphs (node *from, node *to, std::vector< node * > &fromChain, std::vector< node * > &toChain)
 
void clearDisplayLists ()
 
void OpenGLDraw () const
 
void ToggleDrawAbstraction (int which)
 
void DrawLevelConnections (node *n) const
 
void DrawGraph (Graph *g) const
 
recVec GetNodeLoc (node *n) const
 
virtual void AddNode (node *n)
 add node to abstraction More...
 
virtual void AddEdge (edge *e, unsigned int absLevel)
 add edge to abstraction More...
 
nodefindNodeParent (node *n)
 
edgefindEdgeParent (edge *e, unsigned int absLevel)
 
- Public Member Functions inherited from GraphAbstraction
 GraphAbstraction ()
 
virtual ~GraphAbstraction ()
 
void GetNumAbstractGraphs (node *from, node *to, std::vector< node * > &fromChain, std::vector< node * > &toChain)
 given 2 nodes, find as much of their hierarchy that exists in the Graph More...
 
GraphGetAbstractGraph (int level)
 return the abstract Graph at the given level More...
 
unsigned int getNumAbstractGraphs ()
 return the total number of graphs in the hierarchy More...
 
double distance (path *p)
 length in distance of a path More...
 
nodeGetNthParent (node *which, int n)
 return nth level parent of which or null if it doesn't exist More...
 
bool IsParentOf (node *parent, node *child)
 return true if the first node is a parent of or is equal two the second node More...
 
nodeGetParent (node *which)
 
long GetNumChildren (node *which)
 
nodeGetNthChild (node *which, int n)
 
nodeGetRandomGroundNodeFromNode (node *n)
 
long GetAbstractionLevel (node *which)
 
GraphGetAbstractGraph (node *which)
 
void ClearMarkedNodes ()
 rebuild hierarchy from original domain *‍/ More...
 
virtual int MeasureRepairHits ()
 
void MeasureAbstractionValues (int level, double &n, double &n_dev, double &c, double &c_dev)
 
double MeasureAverageNodeWidth (int level)
 

Private Member Functions

GraphabstractGraph (Graph *g)
 
void cleanMemory ()
 
void buildAbstractions (Graph *g)
 
void loadBoxes (char *boxFile)
 
GraphloadGraph (char *fname)
 
nodecreateNewParent (Graph *, node *n)
 
void addNodeToParent (node *n, node *parent)
 
void addNeighborsInBox (Graph *g, node *n, int which, node *parent)
 
int findBoundingBox (node *n)
 
virtual void RemoveNode (node *)
 remove node from abstraction More...
 
virtual void RemoveEdge (edge *, unsigned int)
 remove edge from abstraction More...
 
virtual void RepairAbstraction ()
 This must be called after any of the above add/remove operations. More...
 

Private Attributes

std::vector< BoundingBoxboxes
 
unsigned long levelDraw
 

Additional Inherited Members

- Protected Attributes inherited from GraphAbstraction
std::vector< Graph * > abstractions
 

Detailed Description

Definition at line 19 of file LoadedBBAbstraction.h.

Constructor & Destructor Documentation

◆ LoadedBBAbstraction()

LoadedBBAbstraction::LoadedBBAbstraction ( char *  fname,
char *  boxFile 
)

Construct a new Graph hierarchy.

Constructions a new Graph abstraction hierarchy from the Graph using the designated abstraction method.

Definition at line 71 of file LoadedBBAbstraction.cpp.

References buildAbstractions(), levelDraw, loadBoxes(), and loadGraph().

◆ ~LoadedBBAbstraction()

LoadedBBAbstraction::~LoadedBBAbstraction ( )
virtual

Definition at line 80 of file LoadedBBAbstraction.cpp.

References cleanMemory().

Member Function Documentation

◆ abstractGraph()

Graph * LoadedBBAbstraction::abstractGraph ( Graph g)
private

◆ AddEdge()

void LoadedBBAbstraction::AddEdge ( edge e,
unsigned int  absLevel 
)
virtual

add edge to abstraction

Implements GraphAbstraction.

Definition at line 580 of file LoadedBBAbstraction.cpp.

◆ addNeighborsInBox()

void LoadedBBAbstraction::addNeighborsInBox ( Graph g,
node n,
int  which,
node parent 
)
private

◆ AddNode()

void LoadedBBAbstraction::AddNode ( node n)
virtual

add node to abstraction

Implements GraphAbstraction.

Definition at line 576 of file LoadedBBAbstraction.cpp.

◆ addNodeToParent()

void LoadedBBAbstraction::addNodeToParent ( node n,
node parent 
)
private

◆ buildAbstractions()

void LoadedBBAbstraction::buildAbstractions ( Graph g)
private

◆ cleanMemory()

void LoadedBBAbstraction::cleanMemory ( )
private

Definition at line 396 of file LoadedBBAbstraction.cpp.

References GraphAbstraction::abstractions.

Referenced by buildAbstractions(), and ~LoadedBBAbstraction().

◆ clearDisplayLists()

void LoadedBBAbstraction::clearDisplayLists ( )

◆ createNewParent()

node * LoadedBBAbstraction::createNewParent ( Graph g,
node n 
)
private

◆ DrawGraph()

void LoadedBBAbstraction::DrawGraph ( Graph g) const

◆ DrawLevelConnections()

void LoadedBBAbstraction::DrawLevelConnections ( node n) const

◆ findBoundingBox()

int LoadedBBAbstraction::findBoundingBox ( node n)
private

◆ findEdgeParent()

edge* LoadedBBAbstraction::findEdgeParent ( edge e,
unsigned int  absLevel 
)

◆ findNodeParent()

node * LoadedBBAbstraction::findNodeParent ( node n)

◆ GetNodeLoc()

recVec LoadedBBAbstraction::GetNodeLoc ( node n) const
virtual

◆ GetNumAbstractGraphs()

void LoadedBBAbstraction::GetNumAbstractGraphs ( node from,
node to,
std::vector< node * > &  fromChain,
std::vector< node * > &  toChain 
)

◆ h()

double LoadedBBAbstraction::h ( node a,
node b 
)
virtual

◆ loadBoxes()

void LoadedBBAbstraction::loadBoxes ( char *  boxFile)
private

◆ loadGraph()

Graph * LoadedBBAbstraction::loadGraph ( char *  fname)
private

◆ OpenGLDraw()

void LoadedBBAbstraction::OpenGLDraw ( ) const
virtual

Reimplemented from GraphAbstraction.

Definition at line 124 of file LoadedBBAbstraction.cpp.

References GraphAbstraction::abstractions, boxes, DrawGraph(), and levelDraw.

◆ Pathable() [1/2]

bool LoadedBBAbstraction::Pathable ( node from,
node to 
)
virtual

is there a legal path between these 2 nodes?

Implements GraphAbstraction.

Definition at line 557 of file LoadedBBAbstraction.cpp.

References GraphAbstraction::abstractions, node::GetLabelL(), GraphAbstractionConstants::kAbstractionLevel, and GraphAbstractionConstants::kParent.

Referenced by Pathable().

◆ Pathable() [2/2]

bool LoadedBBAbstraction::Pathable ( unsigned int  from,
unsigned int  to 
)

Definition at line 552 of file LoadedBBAbstraction.cpp.

References GraphAbstraction::abstractions, and Pathable().

◆ RemoveEdge()

virtual void LoadedBBAbstraction::RemoveEdge ( edge ,
unsigned int   
)
inlineprivatevirtual

remove edge from abstraction

Implements GraphAbstraction.

Definition at line 74 of file LoadedBBAbstraction.h.

◆ RemoveNode()

virtual void LoadedBBAbstraction::RemoveNode ( node n)
inlineprivatevirtual

remove node from abstraction

Implements GraphAbstraction.

Definition at line 72 of file LoadedBBAbstraction.h.

◆ RepairAbstraction()

virtual void LoadedBBAbstraction::RepairAbstraction ( )
inlineprivatevirtual

This must be called after any of the above add/remove operations.

But the operations can be stacked followed by a single RepairAbstraction call.

Implements GraphAbstraction.

Definition at line 75 of file LoadedBBAbstraction.h.

◆ ToggleDrawAbstraction()

void LoadedBBAbstraction::ToggleDrawAbstraction ( int  which)

Definition at line 115 of file LoadedBBAbstraction.cpp.

References levelDraw.

◆ VerifyHierarchy()

void LoadedBBAbstraction::VerifyHierarchy ( )
virtual

Member Data Documentation

◆ boxes

std::vector<BoundingBox> LoadedBBAbstraction::boxes
private

Definition at line 60 of file LoadedBBAbstraction.h.

Referenced by addNeighborsInBox(), findBoundingBox(), loadBoxes(), and OpenGLDraw().

◆ levelDraw

unsigned long LoadedBBAbstraction::levelDraw
private

Definition at line 70 of file LoadedBBAbstraction.h.

Referenced by LoadedBBAbstraction(), OpenGLDraw(), and ToggleDrawAbstraction().


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