Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

ClusterPQContainer.h
Go to the documentation of this file.
1 
36 #pragma once
37 
39 #include <ogdf/basic/NodeArray.h>
40 #include <ogdf/basic/EdgeArray.h>
41 
42 namespace ogdf {
43 
44 class CconnectClusterPlanarEmbed;
45 
46 namespace cluster_planarity {
47 
51 
52  // Definition
53  // incoming edge of v: an edge e = (v,w) with number(v) < number(w)
54 
55  // Stores for every node v the keys corresponding to the incoming edges of v
57 
58  // Stores for every node v the keys corresponding to the outgoing edges of v
60 
61  // Stores for every node v the sequence of incoming edges of v according
62  // to the embedding
64 
65  // Stores for every node v the nodes corresponding to the
66  // opposed sink indicators found in the frontier of v.
68 
69  // Stores for every node v the nodes corresponding to the
70  // non opposed sink indicators found in the frontier of v.
72 
73  // Table to acces for every edge its corresponding key in the PQTree
75 
76  // Stores for every node its st-number
78 
79  // Stores for every st-number the node
81 
83 
84  // the subgraph that contains the biconnected component
85  // NOT THE COPY OF THE BICONNECTED COMPONENT THAT WAS CONSTRUCTED
86  // DURING PLANARITY TESTING. THIS HAS BEEN DELETED.
88  // corresponding PQTree
90  // The leaf correpsonding to the edge (s,t).
92 
93 public:
94 
96  m_inLeaves(nullptr),m_outLeaves(nullptr),m_frontier(nullptr),
97  m_opposed(nullptr),m_nonOpposed(nullptr),m_edge2Key(nullptr),
98  m_numbering(nullptr),m_tableNumber2Node(nullptr),
99  m_superSink(nullptr),m_subGraph(nullptr),m_T(nullptr), m_stEdgeLeaf(nullptr) { }
100 
102 
103  void init(Graph *subGraph){
104  m_subGraph = subGraph;
105  m_inLeaves
106  = new NodeArray<SListPure<InfoLeafPtr>>(*subGraph);
107 
108  m_outLeaves
109  = new NodeArray<SListPure<InfoLeafPtr>>(*subGraph);
110 
111  m_frontier
112  = new NodeArray<SListPure<edge>>(*subGraph);
113 
114  m_opposed
115  = new NodeArray<SListPure<node>>(*subGraph);
116 
117  m_nonOpposed
118  = new NodeArray<SListPure<node>>(*subGraph);
119 
120  m_edge2Key
121  = new EdgeArray<InfoLeafPtr>(*subGraph);
122 
123  m_numbering
124  = new NodeArray<int >(*subGraph);
125 
126  m_tableNumber2Node
127  = new Array<node>(subGraph->numberOfNodes()+1);
128  }
129 
130  void Cleanup() {
131  delete m_inLeaves;
132  if (m_outLeaves)
133  {
134  for(node v : m_subGraph->nodes)
135  {
136  while (!(*m_outLeaves)[v].empty())
137  {
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)
149  {
150  m_T->emptyAllPertinentNodes();
151  delete m_T;
152  }
153  delete m_numbering;
154  delete m_tableNumber2Node;
155 
156  }
157 };
158 
159 }
160 }
NodeArray< SListPure< InfoLeafPtr > > * m_inLeaves
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:492
virtual void emptyAllPertinentNodes() override
Cleans up all flags that have been set in the pertinent nodes during the reduction process...
Dynamic arrays indexed with edges.
Definition: EdgeArray.h:112
NodeArray< SListPure< node > > * m_nonOpposed
Dynamic arrays indexed with nodes.
Definition: Graph_d.h:438
Declaration and implementation of EdgeArray class.
NodeArray< SListPure< InfoLeafPtr > > * m_outLeaves
NodeArray< SListPure< edge > > * m_frontier
Class for the representation of nodes.
Definition: Graph_d.h:169
Declaration and implementation of NodeArray class.
C-planarity test and embedding by Cohen, Feng and Eades.
The namespace for all OGDF objects.
NodeArray< SListPure< node > > * m_opposed
internal::GraphObjectContainer< NodeElement > nodes
The container containing all node objects.
Definition: Graph_d.h:565
Declaration of the class EmbedPQTree.