Loading...
Searching...
No Matches
SBCGraph Class Reference

This class describes a graph.

Topology

SBIndexer< SBCGraphNode * > * nodeIndexer
 The graph node indexer.
 
std::vector< bool > * visitedVector
 
std::vector< int > * levelVector
 
std::vector< unsigned int > * lowVector
 
std::vector< unsigned int > * numVector
 
std::vector< unsigned int > * numberOfChildrenLeft
 
std::vector< unsigned int > * numberOfChildren
 
std::vector< std::vector< SBCGraphNode * > * > * children
 Children during DFS traversal.
 
std::vector< SBCGraphNode * > * articulationPoints
 
unsigned int numCounter
 
unsigned int addNode (SBCGraphNode *g)
 Adds a node to the graph node, and returns its index.
 
unsigned int removeNode (SBCGraphNode *g)
 Removes a node from the graph.
 
unsigned int removeNode (unsigned int index)
 Removes a node from the graph.
 
unsigned int getNumberOfNodes ()
 Returns the number of nodes.
 
const SBIndexer< SBCGraphNode * > * getNodeIndexer () const
 Returns a pointer to the node index.
 
void getArticulationPoints (SBIndexer< SBCGraphNode * > &articulationPointIndexer, SBIndexer< SBCGraphArc * > &bridgeIndexer)
 Finds all articulation points in the graph and adds them to articulationPointIndexer, and adds bridges to bridgeIndexer.
 
void print ()
 

Constructors and destructors

 SBCGraph ()
 Builds an empty graph.
 
virtual ~SBCGraph ()
 Deletes the graph node. Note that this does -not- delete the underlying graph nodes and edges, but only the indexing structure.
 

Additional Inherited Members

- Public Member Functions inherited from SBCReferenceTarget
unsigned int getMemoryFootprint () const
 
void printReferencesToOwners () const
 
 SBCReferenceTarget ()
 
virtual ~SBCReferenceTarget ()
 
- Protected Member Functions inherited from SBCReferenceTarget
void removeAllReferenceOwners ()
 
 SBCReferenceTarget (SBCReferenceTargetData *dataPointer)
 
- Protected Attributes inherited from SBCReferenceTarget
SBCReferenceTargetData * dataPointer
 

Member Function Documentation

◆ addNode()

unsigned int SBCGraph::addNode ( SBCGraphNode g)
Parameters
gThe node to add to the graph.

◆ getNumberOfNodes()

unsigned int SBCGraph::getNumberOfNodes ( )

Return the number of vertices in the graph.

◆ removeNode() [1/2]

unsigned int SBCGraph::removeNode ( SBCGraphNode g)
Parameters
gThe node to remove from the graph.

◆ removeNode() [2/2]

unsigned int SBCGraph::removeNode ( unsigned int  index)
Parameters
indexThe index of the node to remove from the graph.