Class 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.
The created arc represents a directed connection from fromNode to toNode.
Parameters:
fromNodeThe source node from which the arc originates.toNodeThe target node to which the arc points.
function getFrom#
Retrieves the source node of the arc.
Returns:
Pointer to the node from which this arc originates.
function getReverseGraphArcLink#
Retrieves the reverse link associated with this arc.
Returns:
Pointer to the reverse graph arc link, or nullptr if none is set.
function getTo#
Retrieves the target node of the arc.
Returns:
Pointer to the node that this arc points to.
function print [1/2]#
Prints some debugging information.
Prints debugging information about the arc to the given output stream.
Parameters:
osThe output stream to which the debugging information will be written.
function print [2/2]#
Prints some debugging information.
Prints debugging information about the arc to the standard output.
function setReverseGraphArcLink#
Sets the reverse graph arc link for this arc.
Parameters:
aPointer to the reverse graph arc link to associate with this arc.
function ~SBCGraphArc#
Destroys the graph arc.
Protected Attributes Documentation#
variable from#
Pointer to the 'from' node.
variable reverseGraphArcLink#
Pointer to the reverse arc link, in the predecessors or successors arc collection.