Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

PertinentGraph.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
35 
36 namespace ogdf {
37 
38 class OGDF_EXPORT SPQRTree;
39 
41 
60 {
61  friend class OGDF_EXPORT SPQRTree;
62 
63 public:
64 
65  // constructor
66  // Remark: Pertinent graphs are created by the pertinentGraph()
67  // function of SPQRTree.
68 
70 
74  PertinentGraph() : m_vT(nullptr) { }
75 
77  void init(node vT) {
78  m_P = Graph();
79  m_vT = vT;
80  m_vEdge = m_skRefEdge = nullptr;
81  m_origV.init(m_P,nullptr);
82  m_origE.init(m_P,nullptr);
83  }
84 
85 
87  node treeNode() const {
88  return m_vT;
89  }
90 
92  const Graph &getGraph() const {
93  return m_P;
94  }
95 
98  return m_P;
99  }
100 
102 
105  edge referenceEdge() const {
106  return m_vEdge;
107  }
108 
110 
115  return m_skRefEdge;
116  }
117 
119 
122  node original(node v) const {
123  return m_origV[v];
124  }
125 
127 
131  edge original(edge e) const {
132  return m_origE[e];
133  }
134 
135 protected:
140 
143 };
144 
145 }
Graph & getGraph()
Returns a reference to G(vT).
edge skeletonReferenceEdge() const
Returns the reference edge in skeleton of vT.
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:492
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
Dynamic arrays indexed with edges.
Definition: EdgeArray.h:112
node treeNode() const
Returns the tree node vT in T whose pertinent graph is this one.
void init(node vT)
Initialization of a pertinent graph of tree node vT.
Pertinent graphs of nodes in an SPQR-tree.
edge m_vEdge
reference edge (in m_P)
Dynamic arrays indexed with nodes.
Definition: Graph_d.h:438
edge referenceEdge() const
Returns the edge in G(vT) corresponding to the reference edge in skeleton of vT.
edge m_skRefEdge
reference edge (in skeleton(m_vT))
node m_vT
corresponding tree node
Class for the representation of edges.
Definition: Graph_d.h:292
Class for the representation of nodes.
Definition: Graph_d.h:169
edge original(edge e) const
Returns the edge in G that corresponds to e.
PertinentGraph()
Creates an empty instance of type PertinentGraph.
Includes declaration of graph class.
const Graph & getGraph() const
Returns a reference to G(vT).
NodeArray< node > m_origV
corresp.
Linear-time implementation of static SPQR-trees.
Definition: SPQRTree.h:71
node original(node v) const
Returns the vertex in G that corresponds to v.
The namespace for all OGDF objects.
EdgeArray< edge > m_origE
corresp.
Graph m_P
actual graph