Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

CconnectClusterPlanarEmbed.h
Go to the documentation of this file.
1 
34 #pragma once
35 
39 
40 namespace ogdf {
41 
43 
47 public:
48  enum class ErrorCode {
49  none = 0,
50  nonConnected = 1,
51  nonCConnected = 2,
52  nonPlanar = 3,
53  nonCPlanar = 4
54  };
55 
56  ErrorCode errCode() { return m_errorCode; }
57 
60 
62  virtual ~CconnectClusterPlanarEmbed();
63 
65  virtual bool embed(ClusterGraph& C, Graph& G);
66 
67 private:
69 
70  bool planarityTest(ClusterGraph& C, const cluster act, Graph& G);
71 
72  bool preProcess(ClusterGraph& Ccopy, Graph& Gcopy);
73 
74  bool preparation(Graph& subGraph, const cluster origCluster, node superSink);
75 
76  bool doEmbed(Graph* biconComp, NodeArray<int>& numbering, const cluster origCluster,
77  node superSink, Graph& subGraph, EdgeArray<edge>& tableEdgesBiComp2SubGraph,
78  EdgeArray<edge>& tableEdgesSubGraph2BiComp, NodeArray<node>& tableNodesBiComp2SubGraph);
79 
80  void entireEmbed(Graph& biconComp, NodeArray<SListPure<adjEntry>>& entireEmbedding,
82 
83  void recursiveEmbed(ClusterGraph& Ccopy, Graph& Gcopy);
84 
85  void prepareParallelEdges(Graph& G);
86 
87 
88  void constructWheelGraph(ClusterGraph& C, Graph& G, cluster& parent, cluster& origCl,
89  EmbedPQTree* T, EdgeArray<node>& outgoingTable, node superSink);
90 
91  void hubControl(Graph& G, NodeArray<bool>& hubs);
92 
93  void nonPlanarCleanup(ClusterGraph& Ccopy, Graph& Gcopy);
94 
95  void copyEmbedding(ClusterGraph& Ccopy, Graph& Gcopy, ClusterGraph& C, Graph& G);
96 
99 
100  // Stores for every cluster the PQTree corresponding
101  // to the biconnected component containing the outgoing
102  // edges of the cluster.
104 
105  //save errorcode for postprocessing if not c-planar
107 
114 
118 
119  ClusterGraph* m_instance; //The graph that has to be embedded
120 
121 
122  // Stores for every cluster the (partial) embedding of the
123  // biconnected components not having outgoing
124  // edges of the cluster.
125  // The NodeArrays are associated with the subgraphs.
126  // The ClusterArray is associtated with the original graph.
128 
129  // Stores for every cluster the subgraph constructed to test
130  // the planarity of the cluster
131  // The ClusterArray is associated with the original graph.
133 
134  // Marks for every subgraph of a cluster the nodes that are
135  // hubs as true.
136  // The NodeArrays are associated with the subgraphs.
137  // The ClusterArray is associated with the original graph.
139 
140 
141  // Stores for every node of every subgraph of a cluster
142  // if this node belongs to a wheel graph, corresponding to
143  // a child cluster
144  // The NodeArrays are associated with the subgraphs.
145  // The ClusterArray is associated with the original graph.
147 
148 
149  // Stores for every mode of every subgraph of a cluster its
150  // corresponding node on the original graph G, if there exists one.
152 
153 
156 
157  // When constructing a wheel graph, we store here for
158  // every wheel graph node the corresponding cluster
159  // Array is associated with the cluster graph copy.
161 
162  // Stores for every node in the current graph, if
163  // it is a hub.
164  // Array is associated with the cluster graph copy.
166 
167 
168  // Stores for every cluster of Ccopy the corresponding cluster
169  // in the original graph. A key variable, since we track
170  // all information via the original clusters.
172 
173  // Needed to construct the ClusterArray m_clusterTableCopy2Orig.
175 
176  // Stores for every subgraph the super sink of the subgraph.
178 
179 
180  // Stores for every node in Gcopy its corresponding node
181  // in the original graph unless the node belongs to
182  // a wheel graph.
183  // The NodeArray is associated with Gcopy.
185 
186  // Needed to construct the NodeArray m_nodeTableCopy2Orig.
188 
189 
192 
193  // Stores for every original cluster all information on
194  // the PQ-Tree that is necessary to construct the embedding.
196 
197  // Stores the clusters in calling order of the testing algorithm
198  // The stack stores the clusters of the original graph.
199  // Needed for recursive embed.
201 
202  // Is true for every original cluster, if the cluster does not
203  // have a correspondand in the copy of the cluster graph.
204  // This is the case if:
205  // a. cluster is son of root cluster and does have exactly one
206  // childcluster and no nodes;
207  // b. recursive version of a;
208  // c. cluster does have no child clusters and no nodes;
209  // d. recursive version of c.
211 
213 };
214 
215 }
ogdf::ArrayBuffer
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
Definition: Array.h:46
ogdf::CconnectClusterPlanarEmbed::m_wheelGraphNodes
NodeArray< cluster > m_wheelGraphNodes
Definition: CconnectClusterPlanarEmbed.h:160
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::CconnectClusterPlanarEmbed::m_clusterTableOrig2Copy
ClusterArray< cluster > m_clusterTableOrig2Copy
Definition: CconnectClusterPlanarEmbed.h:174
ogdf::CconnectClusterPlanarEmbed::m_currentHubs
NodeArray< bool > m_currentHubs
Definition: CconnectClusterPlanarEmbed.h:165
ogdf::CconnectClusterPlanarEmbed::m_clusterClusterGraph
ClusterArray< ClusterGraph * > m_clusterClusterGraph
Definition: CconnectClusterPlanarEmbed.h:154
ogdf::CconnectClusterPlanarEmbed::m_callStack
ArrayBuffer< cluster > m_callStack
Definition: CconnectClusterPlanarEmbed.h:200
ogdf::CconnectClusterPlanarEmbed::m_clusterSubgraphHubs
ClusterArray< NodeArray< bool > * > m_clusterSubgraphHubs
Definition: CconnectClusterPlanarEmbed.h:138
ogdf::CconnectClusterPlanarEmbed::m_clusterClusterTableOrig2New
ClusterArray< ClusterArray< cluster > * > m_clusterClusterTableOrig2New
Definition: CconnectClusterPlanarEmbed.h:155
ogdf::CconnectClusterPlanarEmbed
C-planarity test and embedding by Cohen, Feng and Eades.
Definition: CconnectClusterPlanarEmbed.h:46
ogdf::CconnectClusterPlanarEmbed::m_clusterSuperSink
ClusterArray< node > m_clusterSuperSink
Definition: CconnectClusterPlanarEmbed.h:177
ogdf::CconnectClusterPlanarEmbed::m_nodeTableCopy2Orig
NodeArray< node > m_nodeTableCopy2Orig
Definition: CconnectClusterPlanarEmbed.h:184
ogdf::ClusterArrayBase
RegisteredArray for labeling the clusters of a ClusterGraph.
Definition: ClusterGraph.h:304
ogdf::SListIteratorBase
Encapsulates a pointer to an ogdf::SList element.
Definition: SList.h:41
ogdf::CconnectClusterPlanarEmbed::m_instance
ClusterGraph * m_instance
Definition: CconnectClusterPlanarEmbed.h:119
ogdf::CconnectClusterPlanarEmbed::m_isParallel
EdgeArray< bool > m_isParallel
Definition: CconnectClusterPlanarEmbed.h:112
ogdf::CconnectClusterPlanarEmbed::m_clusterSubgraph
ClusterArray< Graph * > m_clusterSubgraph
Definition: CconnectClusterPlanarEmbed.h:132
ogdf::ClusterElement
Representation of clusters in a clustered graph.
Definition: ClusterGraph.h:55
ogdf::CconnectClusterPlanarEmbed::m_clusterPQTree
ClusterArray< EmbedPQTree * > m_clusterPQTree
Definition: CconnectClusterPlanarEmbed.h:103
ogdf::CconnectClusterPlanarEmbed::m_unsatisfiedCluster
ClusterArray< bool > m_unsatisfiedCluster
Definition: CconnectClusterPlanarEmbed.h:210
ClusterPQContainer.h
Declaration of ClusterPQContainer.
ogdf::CconnectClusterPlanarEmbed::m_clusterNodeTableNew2Orig
ClusterArray< NodeArray< node > * > m_clusterNodeTableNew2Orig
Definition: CconnectClusterPlanarEmbed.h:151
ogdf::booth_lueker::EmbedPQTree
Definition: EmbedPQTree.h:43
ogdf::SListPure
Singly linked lists.
Definition: SList.h:39
ogdf::CconnectClusterPlanarEmbed::m_clusterEmbedding
ClusterArray< NodeArray< SListPure< adjEntry > > * > m_clusterEmbedding
Definition: CconnectClusterPlanarEmbed.h:127
ClusterArray.h
Declaration and implementation of ClusterArray class.
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:651
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:862
ogdf::CconnectClusterPlanarEmbed::m_clusterOutgoingEdgesAnker
ClusterArray< EdgeArray< ArrayBuffer< edge > * > * > m_clusterOutgoingEdgesAnker
Definition: CconnectClusterPlanarEmbed.h:191
ogdf::CconnectClusterPlanarEmbed::m_clusterSubgraphWheelGraph
ClusterArray< NodeArray< cluster > * > m_clusterSubgraphWheelGraph
Definition: CconnectClusterPlanarEmbed.h:146
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::CconnectClusterPlanarEmbed::ErrorCode
ErrorCode
Definition: CconnectClusterPlanarEmbed.h:48
ogdf::CconnectClusterPlanarEmbed::m_parallelEdges
EdgeArray< ListPure< edge > > m_parallelEdges
Definition: CconnectClusterPlanarEmbed.h:111
ogdf::CconnectClusterPlanarEmbed::m_clusterPQContainer
ClusterArray< cluster_planarity::ClusterPQContainer > m_clusterPQContainer
Definition: CconnectClusterPlanarEmbed.h:195
EmbedPQTree.h
Declaration of the class EmbedPQTree.
ogdf::CconnectClusterPlanarEmbed::m_nodeTableOrig2Copy
NodeArray< node > m_nodeTableOrig2Copy
Definition: CconnectClusterPlanarEmbed.h:187
ogdf::CconnectClusterPlanarEmbed::m_parallelCount
int m_parallelCount
Definition: CconnectClusterPlanarEmbed.h:113
ogdf::CconnectClusterPlanarEmbed::m_clusterTableCopy2Orig
ClusterArray< cluster > m_clusterTableCopy2Orig
Definition: CconnectClusterPlanarEmbed.h:171
ogdf::CconnectClusterPlanarEmbed::m_outgoingEdgesAnker
EdgeArray< ArrayBuffer< edge > * > m_outgoingEdgesAnker
Definition: CconnectClusterPlanarEmbed.h:190
ogdf::copyEmbedding
void copyEmbedding(const Graph &from, Graph &to, std::function< adjEntry(adjEntry)> adjMapFromTo)
ogdf::ClusterGraph
Representation of clustered graphs.
Definition: ClusterGraph.h:339
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:233
ogdf::CconnectClusterPlanarEmbed::m_errorCode
ErrorCode m_errorCode
Definition: CconnectClusterPlanarEmbed.h:106
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:709
ogdf::CconnectClusterPlanarEmbed::errCode
ErrorCode errCode()
Definition: CconnectClusterPlanarEmbed.h:56