Web Analytics Made Easy - Statcounter
Skip to content

Class SBCGraphArc#

ClassList > SBCGraphArc

This class is used to describe horizontal references between graph nodes. More...

  • #include <SBCGraphArc.hpp>

Inherits the following classes: SBCReferenceToTarget

Public Functions#

Type Name
SBCGraphArc (SBCGraphNode * fromNode, SBCGraphNode * toNode)
Constructs a graph arc linking a source node to a target node.
SBCGraphNode * getFrom () const
Retrieves the source node of the arc.
SBCReferenceListLink * getReverseGraphArcLink () const
Retrieves the reverse link associated with this arc.
SBCGraphNode * getTo () const
Retrieves the target node of the arc.
virtual void print (std::ostream & os) const
Prints some debugging information.
void print () const
Prints some debugging information.
void setReverseGraphArcLink (SBCReferenceListLink * referenceListLink)
Sets the reverse graph arc link for this arc.
virtual ~SBCGraphArc ()
Destroys the graph arc.

Protected Attributes#

Type Name
SBCGraphNode * from
Pointer to the 'from' node.
SBCReferenceListLink * reverseGraphArcLink
Pointer to the reverse arc link, in the predecessors or successors arc collection.

Detailed Description#

For example, if node B is a successor of node A (so that node A is a predecessor of node B), then two arcs are created: one to reference B in the successors of A, and one to reference A in the predecessors of B. When node B is both a predecessor and a successor of node A, four arcs are thus created. The graph can thus be seen as a directed half-edge data structure.

Short name: SBGraphArc

Public Functions Documentation#

function SBCGraphArc#

Constructs a graph arc linking a source node to a target node.

SBCGraphArc::SBCGraphArc (
    SBCGraphNode * fromNode,
    SBCGraphNode * toNode
) 

The created arc represents a directed connection from fromNode to toNode.

Parameters:

  • fromNode The source node from which the arc originates.
  • toNode The target node to which the arc points.

function getFrom#

Retrieves the source node of the arc.

SBCGraphNode * SBCGraphArc::getFrom () const

Returns:

Pointer to the node from which this arc originates.


Retrieves the reverse link associated with this arc.

SBCReferenceListLink * SBCGraphArc::getReverseGraphArcLink () const

Returns:

Pointer to the reverse graph arc link, or nullptr if none is set.


function getTo#

Retrieves the target node of the arc.

SBCGraphNode * SBCGraphArc::getTo () const

Returns:

Pointer to the node that this arc points to.


function print [1/2]#

Prints some debugging information.

virtual void SBCGraphArc::print (
    std::ostream & os
) const

Prints debugging information about the arc to the given output stream.

Parameters:

  • os The output stream to which the debugging information will be written.

function print [2/2]#

Prints some debugging information.

void SBCGraphArc::print () const

Prints debugging information about the arc to the standard output.


Sets the reverse graph arc link for this arc.

void SBCGraphArc::setReverseGraphArcLink (
    SBCReferenceListLink * referenceListLink
) 

Parameters:

  • a Pointer to the reverse graph arc link to associate with this arc.

function ~SBCGraphArc#

Destroys the graph arc.

virtual SBCGraphArc::~SBCGraphArc () 


Protected Attributes Documentation#

variable from#

Pointer to the 'from' node.

SBCGraphNode* SBCGraphArc::from;


Pointer to the reverse arc link, in the predecessors or successors arc collection.

SBCReferenceListLink* SBCGraphArc::reverseGraphArcLink;