Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

FindKuratowskis.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 namespace ogdf {
37 
38 
45 struct ExternE {
50 };
51 
53 
55 struct WInfo {
57 
59  enum class MinorType {
60  A = 0x0001, // minor A
61  B = 0x0002, // minor B
62  C = 0x0004, // minor C
63  D = 0x0008, // minor D
64  E = 0x0010 // minor E
65  };
66  int minorType;
67 
70 
73 
75 
79 };
80 
81 inline int operator&(int lhs, WInfo::MinorType rhs) { return lhs & static_cast<int>(rhs); }
82 
83 inline int operator|=(int& lhs, WInfo::MinorType rhs) {
84  lhs |= static_cast<int>(rhs);
85  return lhs;
86 }
87 
90  friend class FindKuratowskis;
91  friend class ExtractKuratowskis;
92 
93 public:
96 
99 
102 
105  copy(orig);
106  return *this;
107  }
108 
110  void clear();
111 
115  int V_DFI;
116 
120 
127 
128 protected:
130 
134 
136 
141 
144 
147 
150 
153 
155 
158 
161 
170 
172  void copy(const KuratowskiStructure& orig);
174  void copyPointer(const KuratowskiStructure& orig, SListPure<WInfo>& list);
175 };
176 
178 
181 public:
183  explicit FindKuratowskis(BoyerMyrvoldPlanar* bm);
184 
187 
189  void addKuratowskiStructure(const node currentNode, const node root, const node stopx,
190  const node stopy);
191 
194 
197  return allKuratowskis;
198  }
199 
200  FindKuratowskis& operator=(const FindKuratowskis&) = delete;
201 
202 protected:
205 
208 
210  const int& m_embeddingGrade;
211 
213  const bool m_bundles;
214 
217 
220 
223 
225 
230 
232 
235 
238 
241 
243 
245  const NodeArray<adjEntry> (&m_link)[2];
246 
249 
251 
254 
257 
260 
263 
265 
268 
271 
278 
280 
284 
287 
289  node findRoot(node stopX) const;
290 
292  void extractHighestFacePath(ArrayBuffer<adjEntry>& highestFacePath, int marker);
293 
295  void extractExternalFacePath(SListPure<adjEntry>& externalFacePath,
296  const ArrayBuffer<adjEntry>& highestFacePath, int marker, int highMarker);
297 
299  void splitInMinorTypes(const SListPure<adjEntry>& externalFacePath, int marker);
300 
302  void extractExternalSubgraph(const node stop, int root, SListPure<int>& externalStartnodes,
303  SListPure<node>& externalEndnodes);
305  void extractExternalSubgraphBundles(const node stop, int root,
306  SListPure<edge>& externalSubgraph, int nodeMarker);
307 
309 #if 1
311 #else
312  void extractPertinentSubgraph(SListPure<WInfo>& W_All, const node V);
313 #endif
314 
316  void extractPertinentSubgraphBundles(const SListPure<WInfo>& W_All, const node V,
317  SListPure<edge>& pertinentSubgraph, int nodeMarker);
318 };
319 
320 }
ogdf::ArrayBuffer
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
Definition: Array.h:46
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::KuratowskiStructure
A Kuratowski Structure is a special graph structure containing severals subdivisions.
Definition: FindKuratowskis.h:89
ogdf::WInfo::minorType
int minorType
Definition: FindKuratowskis.h:66
ogdf::FindKuratowskis::findRoot
node findRoot(node stopX) const
Finds root node of the bicomp containing the stopping node stopX.
ogdf::WInfo::externEEnd
SListIterator< ExternE > externEEnd
Definition: FindKuratowskis.h:77
ogdf::FindKuratowskis::extractPertinentSubgraphBundles
void extractPertinentSubgraphBundles(const SListPure< WInfo > &W_All, const node V, SListPure< edge > &pertinentSubgraph, int nodeMarker)
Extracts pertinent subgraph from all wNodes to V (with bundles)
ogdf::FindKuratowskis::extractHighestFacePath
void extractHighestFacePath(ArrayBuffer< adjEntry > &highestFacePath, int marker)
Extracts the highestFace Path of the bicomp containing both stopping nodes.
ogdf::FindKuratowskis::~FindKuratowskis
~FindKuratowskis()
Destructor.
Definition: FindKuratowskis.h:186
ogdf::FindKuratowskis::m_getWInfo
NodeArray< WInfo * > m_getWInfo
Links appropriate WInfo to node.
Definition: FindKuratowskis.h:216
BoyerMyrvoldPlanar.h
Declaration of the class BoyerMyrvoldPlanar.
ogdf::KuratowskiStructure::externE
SListPure< ExternE > externE
List of externally active nodes strictly between x and y for minortypes B and E.
Definition: FindKuratowskis.h:160
ogdf::KuratowskiStructure::stopY
node stopY
Second stopping node.
Definition: FindKuratowskis.h:126
ogdf::FindKuratowskis::m_leastAncestor
const NodeArray< int > & m_leastAncestor
The DFI of the least ancestor node over all backedges.
Definition: FindKuratowskis.h:253
ogdf::KuratowskiStructure::stopX
node stopX
First stopping node.
Definition: FindKuratowskis.h:124
ogdf::WInfo::pertinentPaths
SListPure< SListPure< edge > > pertinentPaths
Definition: FindKuratowskis.h:74
ogdf::FindKuratowskis::operator=
FindKuratowskis & operator=(const FindKuratowskis &)=delete
ogdf::FindKuratowskis::m_adjParent
const NodeArray< adjEntry > & m_adjParent
The adjEntry which goes from DFS-parent to current vertex.
Definition: FindKuratowskis.h:248
ogdf::KuratowskiStructure::zPaths
SListPure< ArrayBuffer< adjEntry > > zPaths
A path from the zNode in minortype D to node V for each highest XY-Path.
Definition: FindKuratowskis.h:157
ogdf::KuratowskiStructure::operator=
KuratowskiStructure & operator=(const KuratowskiStructure &orig)
Assignment.
Definition: FindKuratowskis.h:104
ogdf::FindKuratowskis::splitInMinorTypes
void splitInMinorTypes(const SListPure< adjEntry > &externalFacePath, int marker)
Assign pertinent nodes to the different minortypes and extracts inner externalPaths.
ogdf::KuratowskiStructure::stopXEndnodes
SListPure< node > stopXEndnodes
List of all endnodes of paths starting at stopX (only without bundles)
Definition: FindKuratowskis.h:167
ogdf::WInfo::MinorType::B
@ B
ogdf::SListIteratorBase
Encapsulates a pointer to an ogdf::SList element.
Definition: SList.h:41
ogdf::WInfo::MinorType::A
@ A
ogdf::ExternE::endnodes
SListPure< node > endnodes
Definition: FindKuratowskis.h:48
ogdf::WInfo::pxAboveStopX
bool pxAboveStopX
Definition: FindKuratowskis.h:71
ogdf::FindKuratowskis::extractExternalSubgraph
void extractExternalSubgraph(const node stop, int root, SListPure< int > &externalStartnodes, SListPure< node > &externalEndnodes)
Extracts external subgraph from node stop to ancestors of node with DFI root (without bundles)
ogdf::operator&
int operator&(int lhs, UMLOpt rhs)
Definition: OrthoRep.h:59
ogdf::KuratowskiStructure::wNodes
SListPure< WInfo > wNodes
Holds information about all pertinent nodes w of the bicomp containing V.
Definition: FindKuratowskis.h:133
ogdf::WInfo::pyAboveStopY
bool pyAboveStopY
Definition: FindKuratowskis.h:72
ogdf::WInfo::MinorType
MinorType
All possible base minortypes on w.
Definition: FindKuratowskis.h:59
ogdf::FindKuratowskis::m_bundles
const bool m_bundles
If true, bundles are extracted, otherwise single paths?
Definition: FindKuratowskis.h:213
ogdf::FindKuratowskis::getAllKuratowskis
SListPure< KuratowskiStructure > & getAllKuratowskis()
Get-method for the list of all KuratowskiStructures.
Definition: FindKuratowskis.h:193
ogdf::WInfo::highestXYPath
ArrayBuffer< adjEntry > * highestXYPath
Definition: FindKuratowskis.h:68
ogdf::ExternE::theNode
node theNode
Definition: FindKuratowskis.h:46
ogdf::WInfo::firstExternEAfterW
node firstExternEAfterW
Definition: FindKuratowskis.h:78
ogdf::WInfo::w
node w
Definition: FindKuratowskis.h:56
ogdf::FindKuratowskis::pBM
BoyerMyrvoldPlanar * pBM
Link to class BoyerMyrvoldPlanar.
Definition: FindKuratowskis.h:204
ogdf::KuratowskiStructure::V_DFI
int V_DFI
DFI of the current node to embed.
Definition: FindKuratowskis.h:115
ogdf::WInfo::MinorType::C
@ C
ogdf::FindKuratowskis::m_nodeMarker
int m_nodeMarker
Value used as marker for visited nodes etc.
Definition: FindKuratowskis.h:227
ogdf::KuratowskiStructure::externalSubgraph
SListPure< edge > externalSubgraph
A list of all edges in all externally active paths (bundles only)
Definition: FindKuratowskis.h:149
ogdf::KuratowskiStructure::highestFacePath
ArrayBuffer< adjEntry > highestFacePath
The whole highestFacePath of the bicomp containing V.
Definition: FindKuratowskis.h:140
Minisat::Internal::copy
static void copy(const T &from, T &to)
Definition: Alg.h:61
ogdf::KuratowskiStructure::stopYStartnodes
SListPure< int > stopYStartnodes
List of all virtual startnodes of paths starting at stopY (only without bundles)
Definition: FindKuratowskis.h:165
ogdf::operator|=
unsigned int operator|=(unsigned int &i, CPUFeatureMask fm)
ogdf::FindKuratowskis::m_nodeFromDFI
const Array< node > & m_nodeFromDFI
Returns appropriate node from given DFI.
Definition: FindKuratowskis.h:240
ogdf::FindKuratowskis::extractExternalFacePath
void extractExternalFacePath(SListPure< adjEntry > &externalFacePath, const ArrayBuffer< adjEntry > &highestFacePath, int marker, int highMarker)
Extracts externalFacePath in direction CCW and splits highestFacePath in highestXYPaths.
ogdf::Array< node >
ogdf::ExternE
List of externally active nodes strictly between x and y for minortypes B and E
Definition: FindKuratowskis.h:45
ogdf::FindKuratowskis::m_highestSubtreeDFI
const NodeArray< int > & m_highestSubtreeDFI
The highest DFI in a subtree with node as root.
Definition: FindKuratowskis.h:262
ogdf::KuratowskiStructure::~KuratowskiStructure
~KuratowskiStructure()
Destructor.
Definition: FindKuratowskis.h:98
ogdf::FindKuratowskis::k
KuratowskiStructure k
Current Kuratowski Structure.
Definition: FindKuratowskis.h:222
ogdf::FindKuratowskis::m_pertinentRoots
NodeArray< SListPure< node > > & m_pertinentRoots
List of virtual bicomp roots, that are pertinent to the current embedded node.
Definition: FindKuratowskis.h:286
ogdf::FindKuratowskis::m_dfi
const NodeArray< int > & m_dfi
The one and only DFI-NodeArray.
Definition: FindKuratowskis.h:237
ogdf::FindKuratowskis::addKuratowskiStructure
void addKuratowskiStructure(const node currentNode, const node root, const node stopx, const node stopy)
Adds Kuratowski Structure on current node with root root and stopping nodes stopx and stopy.
ogdf::SListPure< int >
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::FindKuratowskis::allKuratowskis
SListPure< KuratowskiStructure > allKuratowskis
List of all Kuratowski Structures.
Definition: FindKuratowskis.h:219
ogdf::FindKuratowskis::m_lowPoint
NodeArray< int > & m_lowPoint
The lowpoint of each node.
Definition: FindKuratowskis.h:259
ogdf::FindKuratowskis::extractPertinentSubgraph
void extractPertinentSubgraph(SListPure< WInfo > &W_All)
Extracts pertinent subgraph from all wNodes to V (without bundles)
ogdf::KuratowskiStructure::highestXYPaths
SListPure< ArrayBuffer< adjEntry > > highestXYPaths
The appropriate paths of the highestFacePath for each wNode.
Definition: FindKuratowskis.h:143
ogdf::FindKuratowskis::m_embeddingGrade
const int & m_embeddingGrade
The embedding grade.
Definition: FindKuratowskis.h:210
ogdf::KuratowskiStructure::R
node R
The root of the bicomp containing stopX and stopY.
Definition: FindKuratowskis.h:118
ogdf::FindKuratowskis::getAllKuratowskis
const SListPure< KuratowskiStructure > & getAllKuratowskis() const
Constant get-method for the list of all KuratowskiStructures.
Definition: FindKuratowskis.h:196
ogdf::KuratowskiStructure::KuratowskiStructure
KuratowskiStructure(const KuratowskiStructure &orig)
Copy constructor.
Definition: FindKuratowskis.h:101
ogdf::FindKuratowskis::m_backedgeFlags
NodeArray< SListPure< adjEntry > > & m_backedgeFlags
Holds information, if node is the source of a backedge.
Definition: FindKuratowskis.h:283
ogdf::KuratowskiStructure::stopXStartnodes
SListPure< int > stopXStartnodes
List of all virtual startnodes of paths starting at stopX (only without bundles)
Definition: FindKuratowskis.h:163
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::FindKuratowskis::m_g
Graph & m_g
Input graph.
Definition: FindKuratowskis.h:207
ogdf::FindKuratowskis::FindKuratowskis
FindKuratowskis(BoyerMyrvoldPlanar *bm)
Constructor.
ogdf::FindKuratowskis::m_wasHere
NodeArray< int > m_wasHere
Array maintaining visited bits on each node.
Definition: FindKuratowskis.h:229
ogdf::WInfo::MinorType::D
@ D
ogdf::FindKuratowskis
This class collects information about Kuratowski Subdivisions which is used for extraction later.
Definition: FindKuratowskis.h:180
ogdf::BoyerMyrvoldPlanar
This class implements the extended BoyerMyrvold planarity embedding algorithm.
Definition: BoyerMyrvoldPlanar.h:62
ogdf::FindKuratowskis::m_separatedDFSChildList
const NodeArray< ListPure< node > > & m_separatedDFSChildList
A list to all separated DFS-children of node.
Definition: FindKuratowskis.h:267
ogdf::KuratowskiStructure::RReal
node RReal
Real node of virtual node R.
Definition: FindKuratowskis.h:122
ogdf::KuratowskiStructure::pertinentSubgraph
SListPure< edge > pertinentSubgraph
A list of all edges in pertinent paths (bundles only)
Definition: FindKuratowskis.h:152
ogdf::FindKuratowskis::m_pointsToRoot
const EdgeArray< node > & m_pointsToRoot
Identifies the rootnode of the child bicomp the given backedge points to.
Definition: FindKuratowskis.h:270
ogdf::KuratowskiStructure::stopYEndnodes
SListPure< node > stopYEndnodes
List of all endnodes of paths starting at stopY (only without bundles)
Definition: FindKuratowskis.h:169
ogdf::KuratowskiStructure::V
node V
The current node to embed.
Definition: FindKuratowskis.h:113
ogdf::FindKuratowskis::m_numUnembeddedBackedgesInBicomp
NodeArray< int > & m_numUnembeddedBackedgesInBicomp
Stores for each (virtual) bicomp root how many backedges to its bicomp still have to be embedded.
Definition: FindKuratowskis.h:277
ogdf::FindKuratowskis::m_realVertex
const NodeArray< node > & m_realVertex
Link to non-virtual vertex of a virtual Vertex.
Definition: FindKuratowskis.h:234
ogdf::KuratowskiStructure::externalFacePath
SListPure< adjEntry > externalFacePath
External face path of bicomp containing V in direction CCW.
Definition: FindKuratowskis.h:146
ogdf::WInfo::zPath
ArrayBuffer< adjEntry > * zPath
Definition: FindKuratowskis.h:69
ogdf::WInfo::MinorType::E
@ E
ogdf::WInfo::externEStart
SListIterator< ExternE > externEStart
Definition: FindKuratowskis.h:76
ogdf::ExtractKuratowskis
Extracts multiple Kuratowski Subdivisions.
Definition: ExtractKuratowskis.h:89
ogdf::FindKuratowskis::extractExternalSubgraphBundles
void extractExternalSubgraphBundles(const node stop, int root, SListPure< edge > &externalSubgraph, int nodeMarker)
Extracts external subgraph from node stop to ancestors of node with DFI root (with bundles)
ogdf::ExternE::startnodes
SListPure< int > startnodes
Definition: FindKuratowskis.h:47
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:233
ogdf::WInfo
Saves information about a pertinent node w between two stopping vertices.
Definition: FindKuratowskis.h:55
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:709
ogdf::ExternE::externalPaths
SListPure< SListPure< edge > > externalPaths
Definition: FindKuratowskis.h:49
ogdf::KuratowskiStructure::KuratowskiStructure
KuratowskiStructure()
Constructor.
Definition: FindKuratowskis.h:95
ogdf::FindKuratowskis::m_edgeType
EdgeArray< BoyerMyrvoldEdgeType > & m_edgeType
Contains the type of each edge.
Definition: FindKuratowskis.h:256