Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
PertinentGraph.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Graph.h>
35#include <ogdf/basic/basic.h>
36
37namespace ogdf {
38
40
59 friend class SPQRTree;
60
61public:
62 // constructor
63 // Remark: Pertinent graphs are created by the pertinentGraph()
64 // function of SPQRTree.
65
67
71 PertinentGraph() : m_vT(nullptr) { }
72
74 void init(node vT) {
75 m_P.clear();
76 m_vT = vT;
77 m_vEdge = m_skRefEdge = nullptr;
78 m_origV.init(m_P, nullptr);
79 m_origE.init(m_P, nullptr);
80 }
81
83 node treeNode() const { return m_vT; }
84
86 const Graph& getGraph() const { return m_P; }
87
89 Graph& getGraph() { return m_P; }
90
92
95 edge referenceEdge() const { return m_vEdge; }
96
98
102 edge skeletonReferenceEdge() const { return m_skRefEdge; }
103
105
108 node original(node v) const { return m_origV[v]; }
109
111
115 edge original(edge e) const { return m_origE[e]; }
116
117protected:
122
125};
126
127}
Includes declaration of graph class.
Basic declarations, included by all source files.
Class for the representation of edges.
Definition Graph_d.h:364
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Class for the representation of nodes.
Definition Graph_d.h:241
Pertinent graphs of nodes in an SPQR-tree.
const Graph & getGraph() const
Returns a reference to G(vT).
node m_vT
corresponding tree node
edge m_vEdge
reference edge (in m_P)
edge m_skRefEdge
reference edge (in skeleton(m_vT))
edge referenceEdge() const
Returns the edge in G(vT) corresponding to the reference edge in skeleton of vT.
Graph m_P
actual graph
EdgeArray< edge > m_origE
corresp.
NodeArray< node > m_origV
corresp.
node treeNode() const
Returns the tree node vT in T whose pertinent graph is this one.
PertinentGraph()
Creates an empty instance of type PertinentGraph.
void init(node vT)
Initialization of a pertinent graph of tree node vT.
Graph & getGraph()
Returns a reference to G(vT).
edge original(edge e) const
Returns the edge in G that corresponds to e.
node original(node v) const
Returns the vertex in G that corresponds to v.
edge skeletonReferenceEdge() const
Returns the reference edge in skeleton of vT.
Linear-time implementation of static SPQR-trees.
Definition SPQRTree.h:73
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.