Web Analytics Made Easy - Statcounter
Skip to content

Class SBCGraph#

ClassList > SBCGraph

This class describes a graph. More...

  • #include <SBCGraph.hpp>

Inherits the following classes: SBCReferenceTarget

Public Functions#

Type Name
SBCGraph ()
Builds an empty graph.
unsigned int addNode (SBCGraphNode * g)
Adds a node to the graph node, and returns its index.
void getArticulationPoints (SBIndexer< SBCGraphNode * > & articulationPointIndexer, SBIndexer< SBCGraphArc * > & bridgeIndexer)
Finds all articulation points in the graph and adds them to articulationPointIndexer , and adds bridges tobridgeIndexer .
const SBIndexer< SBCGraphNode * > * getNodeIndexer () const
Returns a pointer to the node index.
unsigned int getNumberOfNodes ()
Returns the number of nodes.
void print ()
unsigned int removeNode (SBCGraphNode * g)
Removes a node from the graph.
unsigned int removeNode (unsigned int index)
Removes a node from the graph.
virtual ~SBCGraph ()
Deletes the graph node. Note that this does -not- delete the underlying graph nodes and edges, but only the indexing structure.

Public Functions inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTarget ()
unsigned int getMemoryFootprint () const
void printReferencesToOwners () const
virtual ~SBCReferenceTarget ()

Protected Attributes#

Type Name
std::vector< SBCGraphNode * > * articulationPoints
std::vector< std::vector< SBCGraphNode * > * > * children
Children during DFS traversal.
std::vector< int > * levelVector
std::vector< unsigned int > * lowVector
SBIndexer< SBCGraphNode * > * nodeIndexer
The graph node indexer.
unsigned int numCounter
std::vector< unsigned int > * numVector
std::vector< unsigned int > * numberOfChildren
std::vector< unsigned int > * numberOfChildrenLeft
std::vector< bool > * visitedVector

Protected Attributes inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTargetData * dataPointer

Protected Functions inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTarget (SBCReferenceTargetData * dataPointer)
void removeAllReferenceOwners ()

Detailed Description#

This class describes a graph.

Short name: SBGraph

Public Functions Documentation#

function SBCGraph#

Builds an empty graph.

SBCGraph::SBCGraph () 


function addNode#

Adds a node to the graph node, and returns its index.

unsigned int SBCGraph::addNode (
    SBCGraphNode * g
) 

Parameters:

  • g The node to add to the graph.

function getArticulationPoints#

Finds all articulation points in the graph and adds them to articulationPointIndexer , and adds bridges tobridgeIndexer .

void SBCGraph::getArticulationPoints (
    SBIndexer< SBCGraphNode * > & articulationPointIndexer,
    SBIndexer< SBCGraphArc * > & bridgeIndexer
) 


function getNodeIndexer#

Returns a pointer to the node index.

const SBIndexer< SBCGraphNode * > * SBCGraph::getNodeIndexer () const


function getNumberOfNodes#

Returns the number of nodes.

unsigned int SBCGraph::getNumberOfNodes () 

Return the number of vertices in the graph.


function print#

void SBCGraph::print () 

function removeNode [1/2]#

Removes a node from the graph.

unsigned int SBCGraph::removeNode (
    SBCGraphNode * g
) 

Parameters:

  • g The node to remove from the graph.

function removeNode [2/2]#

Removes a node from the graph.

unsigned int SBCGraph::removeNode (
    unsigned int index
) 

Parameters:

  • index The index of the node to remove from the graph.

function ~SBCGraph#

Deletes the graph node. Note that this does -not- delete the underlying graph nodes and edges, but only the indexing structure.

virtual SBCGraph::~SBCGraph () 


Protected Attributes Documentation#

variable articulationPoints#

std::vector<SBCGraphNode*>* articulationPoints;

variable children#

Children during DFS traversal.

std::vector<std::vector<SBCGraphNode*>*>* children;


variable levelVector#

std::vector<int>* levelVector;

variable lowVector#

std::vector<unsigned int>* lowVector;

variable nodeIndexer#

The graph node indexer.

SBIndexer<SBCGraphNode*>* nodeIndexer;


variable numCounter#

unsigned int numCounter;

variable numVector#

std::vector<unsigned int>* numVector;

variable numberOfChildren#

std::vector<unsigned int>* numberOfChildren;

variable numberOfChildrenLeft#

std::vector<unsigned int>* numberOfChildrenLeft;

variable visitedVector#

std::vector<bool>* visitedVector;