Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ClusterPQContainer.h
Go to the documentation of this file.
1 
36 #pragma once
37 
38 #include <ogdf/basic/Array.h>
39 #include <ogdf/basic/Graph.h>
40 #include <ogdf/basic/GraphList.h>
41 #include <ogdf/basic/SList.h>
45 
46 namespace ogdf {
47 
48 class CconnectClusterPlanarEmbed;
49 
50 namespace cluster_planarity {
51 
55 
56  // Definition
57  // incoming edge of v: an edge e = (v,w) with number(v) < number(w)
58 
59  // Stores for every node v the keys corresponding to the incoming edges of v
61 
62  // Stores for every node v the keys corresponding to the outgoing edges of v
64 
65  // Stores for every node v the sequence of incoming edges of v according
66  // to the embedding
68 
69  // Stores for every node v the nodes corresponding to the
70  // opposed sink indicators found in the frontier of v.
72 
73  // Stores for every node v the nodes corresponding to the
74  // non opposed sink indicators found in the frontier of v.
76 
77  // Table to acces for every edge its corresponding key in the PQTree
79 
80  // Stores for every node its st-number
82 
83  // Stores for every st-number the node
85 
87 
88  // the subgraph that contains the biconnected component
89  // NOT THE COPY OF THE BICONNECTED COMPONENT THAT WAS CONSTRUCTED
90  // DURING PLANARITY TESTING. THIS HAS BEEN DELETED.
92  // corresponding PQTree
94  // The leaf correpsonding to the edge (s,t).
96 
97 public:
99  : m_inLeaves(nullptr)
100  , m_outLeaves(nullptr)
101  , m_frontier(nullptr)
102  , m_opposed(nullptr)
103  , m_nonOpposed(nullptr)
104  , m_edge2Key(nullptr)
105  , m_numbering(nullptr)
106  , m_tableNumber2Node(nullptr)
107  , m_superSink(nullptr)
108  , m_subGraph(nullptr)
109  , m_T(nullptr)
110  , m_stEdgeLeaf(nullptr) { }
111 
113 
114  void init(Graph* subGraph) {
115  m_subGraph = subGraph;
117 
119 
120  m_frontier = new NodeArray<SListPure<edge>>(*subGraph);
121 
122  m_opposed = new NodeArray<SListPure<node>>(*subGraph);
123 
124  m_nonOpposed = new NodeArray<SListPure<node>>(*subGraph);
125 
126  m_edge2Key = new EdgeArray<InfoLeafPtr>(*subGraph);
127 
128  m_numbering = new NodeArray<int>(*subGraph);
129 
130  m_tableNumber2Node = new Array<node>(subGraph->numberOfNodes() + 1);
131  }
132 
133  void Cleanup() {
134  delete m_inLeaves;
135  if (m_outLeaves) {
136  for (node v : m_subGraph->nodes) {
137  while (!(*m_outLeaves)[v].empty()) {
138  InfoLeafPtr L = (*m_outLeaves)[v].popFrontRet();
139  delete L;
140  }
141  }
142  delete m_outLeaves;
143  }
144  delete m_frontier;
145  delete m_opposed;
146  delete m_nonOpposed;
147  delete m_edge2Key;
148  if (m_T) {
150  delete m_T;
151  }
152  delete m_numbering;
153  delete m_tableNumber2Node;
154  }
155 };
156 
157 }
158 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
IndInfo.h
Declaration of the class EmbedKey.
Graph.h
Includes declaration of graph class.
ogdf::cluster_planarity::ClusterPQContainer::m_nonOpposed
NodeArray< SListPure< node > > * m_nonOpposed
Definition: ClusterPQContainer.h:75
ogdf::cluster_planarity::ClusterPQContainer::m_stEdgeLeaf
InfoLeafPtr m_stEdgeLeaf
Definition: ClusterPQContainer.h:95
ogdf::cluster_planarity::ClusterPQContainer
Definition: ClusterPQContainer.h:52
ogdf::CconnectClusterPlanarEmbed
C-planarity test and embedding by Cohen, Feng and Eades.
Definition: CconnectClusterPlanarEmbed.h:52
ogdf::cluster_planarity::ClusterPQContainer::m_subGraph
Graph * m_subGraph
Definition: ClusterPQContainer.h:91
ogdf::cluster_planarity::ClusterPQContainer::m_superSink
node m_superSink
Definition: ClusterPQContainer.h:86
ogdf::cluster_planarity::ClusterPQContainer::m_frontier
NodeArray< SListPure< edge > > * m_frontier
Definition: ClusterPQContainer.h:67
ogdf::cluster_planarity::ClusterPQContainer::~ClusterPQContainer
~ClusterPQContainer()
Definition: ClusterPQContainer.h:112
ogdf::cluster_planarity::ClusterPQContainer::m_T
booth_lueker::EmbedPQTree * m_T
Definition: ClusterPQContainer.h:93
ogdf::cluster_planarity::ClusterPQContainer::m_opposed
NodeArray< SListPure< node > > * m_opposed
Definition: ClusterPQContainer.h:71
ogdf::cluster_planarity::ClusterPQContainer::ClusterPQContainer
ClusterPQContainer()
Definition: ClusterPQContainer.h:98
ogdf::cluster_planarity::ClusterPQContainer::Cleanup
void Cleanup()
Definition: ClusterPQContainer.h:133
ogdf::Graph::nodes
internal::GraphObjectContainer< NodeElement > nodes
The container containing all node objects.
Definition: Graph_d.h:932
SList.h
Declaration of singly linked lists and iterators.
ogdf::Array< node >
GraphList.h
Decralation of GraphElement and GraphList classes.
ogdf::cluster_planarity::ClusterPQContainer::m_edge2Key
EdgeArray< InfoLeafPtr > * m_edge2Key
Definition: ClusterPQContainer.h:78
ogdf::booth_lueker::EmbedPQTree
Definition: EmbedPQTree.h:55
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
ogdf::cluster_planarity::ClusterPQContainer::m_tableNumber2Node
Array< node > * m_tableNumber2Node
Definition: ClusterPQContainer.h:84
ogdf::cluster_planarity::ClusterPQContainer::m_outLeaves
NodeArray< SListPure< InfoLeafPtr > > * m_outLeaves
Definition: ClusterPQContainer.h:63
ogdf::cluster_planarity::ClusterPQContainer::m_numbering
NodeArray< int > * m_numbering
Definition: ClusterPQContainer.h:81
ogdf::booth_lueker::EmbedPQTree::emptyAllPertinentNodes
virtual void emptyAllPertinentNodes() override
Cleans up all flags that have been set in the pertinent nodes during the reduction process.
Array.h
Declaration and implementation of Array class and Array algorithms.
ogdf::cluster_planarity::ClusterPQContainer::m_inLeaves
NodeArray< SListPure< InfoLeafPtr > > * m_inLeaves
Definition: ClusterPQContainer.h:60
EmbedPQTree.h
Declaration of the class EmbedPQTree.
ogdf::booth_lueker::PlanarLeafKey
Definition: EmbedPQTree.h:40
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
PlanarLeafKey.h
Declaration of class PlanarLeafKey.
ogdf::cluster_planarity::ClusterPQContainer::init
void init(Graph *subGraph)
Definition: ClusterPQContainer.h:114
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:716