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

A loaded abstraction based on the reduction of cliques. More...

#include <LoadedCliqueAbstraction.h>

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

Public Member Functions

 LoadedCliqueAbstraction (char *)
 Construct a new Graph hierarchy. More...
 
 LoadedCliqueAbstraction (Graph *g)
 
virtual ~LoadedCliqueAbstraction ()
 
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 RemoveNode (node *n)
 remove node from abstraction More...
 
void RemoveEdge (edge *e, unsigned int absLevel)
 remove edge from abstraction More...
 
virtual void AddNode (node *n)
 add node to abstraction More...
 
virtual void AddEdge (edge *e, unsigned int absLevel)
 add edge to abstraction More...
 
void RepairAbstraction ()
 This must be called after any of the above add/remove operations. 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)
 

Protected Member Functions

GraphloadGraph (char *fname)
 
virtual GraphabstractGraph (Graph *g)
 
virtual GraphcliqueAbstractGraph (Graph *g)
 
virtual GraphneighborAbstractGraph (Graph *g, int width=1)
 
void addNodesToParent (Graph *g, node *n, node *parent, int width)
 
void addTunnel (node *n, Graph *g, node *newNode)
 
void renameNodeInAbstraction (node *which, unsigned int oldID)
 
int getChildGroups (node *which)
 
void splitNode (node *which, int numGroups)
 
void addNodeToRepairQ (node *n)
 
void removeNodeFromRepairQ (node *n)
 
void resetLocationCache (node *n)
 
void checkAndCreateParent (node *which)
 
void insertNodeIntoHierarchy (node *newNode)
 
void transferGroup (int group, node *oldParent, node *newParent)
 
void abstractUpEdge (unsigned int absLevel, edge *e)
 
void extractGroupIntoNewNode (node *parent, int group)
 
void mergeGroupIntoNeighbor (node *parent, int group, node *neighbor=0)
 
bool checkNeighborClique (node *child, node *neighbor)
 
nodefindNeighborCliques (node *parent, int group)
 
nodefindNeighborCliques (node *)
 
int getGroupSize (node *parent, int group)
 
nodegetNodeInGroup (node *parent, int group)
 

Private Member Functions

void buildAbstractions (Graph *)
 
void cleanMemory ()
 

Private Attributes

unsigned long levelDraw
 
std::vector< GLuint > displayLists
 
std::vector< node * > modifiedNodeQ
 

Additional Inherited Members

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

Detailed Description

A loaded abstraction based on the reduction of cliques.

Definition at line 22 of file LoadedCliqueAbstraction.h.

Constructor & Destructor Documentation

◆ LoadedCliqueAbstraction() [1/2]

LoadedCliqueAbstraction::LoadedCliqueAbstraction ( char *  fname)

Construct a new Graph hierarchy.

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

Definition at line 40 of file LoadedCliqueAbstraction.cpp.

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

◆ LoadedCliqueAbstraction() [2/2]

LoadedCliqueAbstraction::LoadedCliqueAbstraction ( Graph g)

Definition at line 47 of file LoadedCliqueAbstraction.cpp.

References buildAbstractions(), and levelDraw.

◆ ~LoadedCliqueAbstraction()

LoadedCliqueAbstraction::~LoadedCliqueAbstraction ( )
virtual

Definition at line 55 of file LoadedCliqueAbstraction.cpp.

References cleanMemory().

Member Function Documentation

◆ abstractGraph()

Graph * LoadedCliqueAbstraction::abstractGraph ( Graph g)
protectedvirtual

Definition at line 425 of file LoadedCliqueAbstraction.cpp.

References cliqueAbstractGraph().

Referenced by buildAbstractions().

◆ abstractUpEdge()

void LoadedCliqueAbstraction::abstractUpEdge ( unsigned int  absLevel,
edge e 
)
protected

◆ AddEdge()

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

add edge to abstraction

Implements GraphAbstraction.

Definition at line 1103 of file LoadedCliqueAbstraction.cpp.

◆ AddNode()

void LoadedCliqueAbstraction::AddNode ( node n)
virtual

add node to abstraction

Implements GraphAbstraction.

Definition at line 1098 of file LoadedCliqueAbstraction.cpp.

◆ addNodesToParent()

void LoadedCliqueAbstraction::addNodesToParent ( Graph g,
node n,
node parent,
int  width 
)
protected

◆ addNodeToRepairQ()

void LoadedCliqueAbstraction::addNodeToRepairQ ( node n)
protected

Definition at line 1138 of file LoadedCliqueAbstraction.cpp.

References graph_object::key, kRepairGraph, modifiedNodeQ, and verbose.

Referenced by RemoveEdge(), and RemoveNode().

◆ addTunnel()

void LoadedCliqueAbstraction::addTunnel ( node n,
Graph g,
node newNode 
)
protected

◆ buildAbstractions()

void LoadedCliqueAbstraction::buildAbstractions ( Graph _g)
private

◆ checkAndCreateParent()

void LoadedCliqueAbstraction::checkAndCreateParent ( node which)
protected

◆ checkNeighborClique()

bool LoadedCliqueAbstraction::checkNeighborClique ( node child,
node neighbor 
)
protected

◆ cleanMemory()

void LoadedCliqueAbstraction::cleanMemory ( )
private

◆ clearDisplayLists()

void LoadedCliqueAbstraction::clearDisplayLists ( )

Definition at line 387 of file LoadedCliqueAbstraction.cpp.

References displayLists.

Referenced by cleanMemory().

◆ cliqueAbstractGraph()

Graph * LoadedCliqueAbstraction::cliqueAbstractGraph ( Graph g)
protectedvirtual

◆ DrawGraph()

void LoadedCliqueAbstraction::DrawGraph ( Graph g) const

◆ DrawLevelConnections()

void LoadedCliqueAbstraction::DrawLevelConnections ( node n) const

◆ extractGroupIntoNewNode()

void LoadedCliqueAbstraction::extractGroupIntoNewNode ( node parent,
int  group 
)
protected

◆ findEdgeParent()

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

◆ findNeighborCliques() [1/2]

node * LoadedCliqueAbstraction::findNeighborCliques ( node child)
protected

◆ findNeighborCliques() [2/2]

node * LoadedCliqueAbstraction::findNeighborCliques ( node parent,
int  group 
)
protected

◆ findNodeParent()

node * LoadedCliqueAbstraction::findNodeParent ( node n)

◆ getChildGroups()

int LoadedCliqueAbstraction::getChildGroups ( node which)
protected

◆ getGroupSize()

int LoadedCliqueAbstraction::getGroupSize ( node parent,
int  group 
)
protected

◆ getNodeInGroup()

node * LoadedCliqueAbstraction::getNodeInGroup ( node parent,
int  group 
)
protected

◆ GetNodeLoc()

recVec LoadedCliqueAbstraction::GetNodeLoc ( node n) const
virtual

◆ GetNumAbstractGraphs()

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

◆ h()

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

◆ insertNodeIntoHierarchy()

void LoadedCliqueAbstraction::insertNodeIntoHierarchy ( node newNode)
protected

◆ loadGraph()

Graph * LoadedCliqueAbstraction::loadGraph ( char *  fname)
protected

◆ mergeGroupIntoNeighbor()

void LoadedCliqueAbstraction::mergeGroupIntoNeighbor ( node parent,
int  group,
node neighbor = 0 
)
protected

◆ neighborAbstractGraph()

Graph * LoadedCliqueAbstraction::neighborAbstractGraph ( Graph g,
int  width = 1 
)
protectedvirtual

◆ OpenGLDraw()

void LoadedCliqueAbstraction::OpenGLDraw ( ) const
virtual

Reimplemented from GraphAbstraction.

Definition at line 89 of file LoadedCliqueAbstraction.cpp.

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

◆ Pathable() [1/2]

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

is there a legal path between these 2 nodes?

Implements GraphAbstraction.

Definition at line 1055 of file LoadedCliqueAbstraction.cpp.

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

Referenced by Pathable().

◆ Pathable() [2/2]

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

Definition at line 1050 of file LoadedCliqueAbstraction.cpp.

References GraphAbstraction::abstractions, and Pathable().

◆ RemoveEdge()

void LoadedCliqueAbstraction::RemoveEdge ( edge e,
unsigned int  absLevel 
)
virtual

◆ RemoveNode()

void LoadedCliqueAbstraction::RemoveNode ( node n)
virtual

◆ removeNodeFromRepairQ()

void LoadedCliqueAbstraction::removeNodeFromRepairQ ( node n)
protected

Definition at line 1156 of file LoadedCliqueAbstraction.cpp.

References graph_object::key, and modifiedNodeQ.

Referenced by RemoveNode().

◆ renameNodeInAbstraction()

void LoadedCliqueAbstraction::renameNodeInAbstraction ( node which,
unsigned int  oldID 
)
protected

◆ RepairAbstraction()

void LoadedCliqueAbstraction::RepairAbstraction ( )
virtual

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 1235 of file LoadedCliqueAbstraction.cpp.

References getChildGroups(), node::GetLabelL(), GraphAbstractionConstants::kAbstractionLevel, graph_object::key, kRepairGraph, modifiedNodeQ, splitNode(), and verbose.

◆ resetLocationCache()

void LoadedCliqueAbstraction::resetLocationCache ( node n)
protected

◆ splitNode()

void LoadedCliqueAbstraction::splitNode ( node which,
int  numGroups 
)
protected

◆ ToggleDrawAbstraction()

void LoadedCliqueAbstraction::ToggleDrawAbstraction ( int  which)

Definition at line 80 of file LoadedCliqueAbstraction.cpp.

References levelDraw.

◆ transferGroup()

void LoadedCliqueAbstraction::transferGroup ( int  group,
node oldParent,
node newParent 
)
protected

◆ VerifyHierarchy()

void LoadedCliqueAbstraction::VerifyHierarchy ( )
virtual

Member Data Documentation

◆ displayLists

std::vector<GLuint> LoadedCliqueAbstraction::displayLists
private

Definition at line 92 of file LoadedCliqueAbstraction.h.

Referenced by buildAbstractions(), cleanMemory(), and clearDisplayLists().

◆ levelDraw

unsigned long LoadedCliqueAbstraction::levelDraw
private

◆ modifiedNodeQ

std::vector<node *> LoadedCliqueAbstraction::modifiedNodeQ
private

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