Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
FindKuratowskis.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Array.h>
36#include <ogdf/basic/Graph.h>
37#include <ogdf/basic/SList.h>
38#include <ogdf/basic/basic.h>
39
40namespace ogdf {
41class BoyerMyrvoldPlanar;
42enum class BoyerMyrvoldEdgeType;
43template<class E>
44class ListPure;
45
58
60
62struct WInfo {
64
66 enum class MinorType {
67 A = 0x0001, // minor A
68 B = 0x0002, // minor B
69 C = 0x0004, // minor C
70 D = 0x0008, // minor D
71 E = 0x0010 // minor E
72 };
74
77
80
82
86};
87
88inline int operator&(int lhs, WInfo::MinorType rhs) { return lhs & static_cast<int>(rhs); }
89
90inline int operator|=(int& lhs, WInfo::MinorType rhs) {
91 lhs |= static_cast<int>(rhs);
92 return lhs;
93}
94
183
185
188public:
191
194
196 void addKuratowskiStructure(const node currentNode, const node root, const node stopx,
197 const node stopy);
198
201
204 return allKuratowskis;
205 }
206
208
209protected:
212
215
218
220 const bool m_bundles;
221
224
227
230
232
237
239
242
245
248
250
252 const NodeArray<adjEntry> (&m_link)[2];
253
256
258
261
264
267
270
272
275
278
285
287
291
294
296 node findRoot(node stopX) const;
297
299 void extractHighestFacePath(ArrayBuffer<adjEntry>& highestFacePath, int marker);
300
303 const ArrayBuffer<adjEntry>& highestFacePath, int marker, int highMarker);
304
306 void splitInMinorTypes(const SListPure<adjEntry>& externalFacePath, int marker);
307
309 void extractExternalSubgraph(const node stop, int root, SListPure<int>& externalStartnodes,
310 SListPure<node>& externalEndnodes);
312 void extractExternalSubgraphBundles(const node stop, int root,
313 SListPure<edge>& externalSubgraph, int nodeMarker);
314
316#if 1
318#else
319 void extractPertinentSubgraph(SListPure<WInfo>& W_All, const node V);
320#endif
321
324 SListPure<edge>& pertinentSubgraph, int nodeMarker);
325};
326
327}
Declaration and implementation of Array class and Array algorithms.
Declaration and implementation of ArrayBuffer class.
Includes declaration of graph class.
Declaration of singly linked lists and iterators.
Basic declarations, included by all source files.
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
Definition ArrayBuffer.h:64
The parameterized class Array implements dynamic arrays of type E.
Definition Array.h:219
This class implements the extended BoyerMyrvold planarity embedding algorithm.
Extracts multiple Kuratowski Subdivisions.
This class collects information about Kuratowski Subdivisions which is used for extraction later.
void extractHighestFacePath(ArrayBuffer< adjEntry > &highestFacePath, int marker)
Extracts the highestFace Path of the bicomp containing both stopping nodes.
FindKuratowskis(BoyerMyrvoldPlanar *bm)
Constructor.
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)
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)
SListPure< KuratowskiStructure > & getAllKuratowskis()
Get-method for the list of all KuratowskiStructures.
~FindKuratowskis()
Destructor.
NodeArray< WInfo * > m_getWInfo
Links appropriate WInfo to node.
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.
const Array< node > & m_nodeFromDFI
Returns appropriate node from given DFI.
NodeArray< SListPure< node > > & m_pertinentRoots
List of virtual bicomp roots, that are pertinent to the current embedded node.
NodeArray< SListPure< adjEntry > > & m_backedgeFlags
Holds information, if node is the source of a backedge.
const NodeArray< adjEntry > & m_adjParent
The adjEntry which goes from DFS-parent to current vertex.
const SListPure< KuratowskiStructure > & getAllKuratowskis() const
Constant get-method for the list of all KuratowskiStructures.
int m_nodeMarker
Value used as marker for visited nodes etc.
const NodeArray< int > & m_leastAncestor
The DFI of the least ancestor node over all backedges.
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)
BoyerMyrvoldPlanar * pBM
Link to class BoyerMyrvoldPlanar.
const EdgeArray< node > & m_pointsToRoot
Identifies the rootnode of the child bicomp the given backedge points to.
NodeArray< int > & m_lowPoint
The lowpoint of each node.
KuratowskiStructure k
Current Kuratowski Structure.
NodeArray< int > & m_numUnembeddedBackedgesInBicomp
Stores for each (virtual) bicomp root how many backedges to its bicomp still have to be embedded.
const bool m_bundles
If true, bundles are extracted, otherwise single paths?
const NodeArray< int > & m_dfi
The one and only DFI-NodeArray.
const NodeArray< ListPure< node > > & m_separatedDFSChildList
A list to all separated DFS-children of node.
const NodeArray< node > & m_realVertex
Link to non-virtual vertex of a virtual Vertex.
void extractExternalFacePath(SListPure< adjEntry > &externalFacePath, const ArrayBuffer< adjEntry > &highestFacePath, int marker, int highMarker)
Extracts externalFacePath in direction CCW and splits highestFacePath in highestXYPaths.
void extractPertinentSubgraph(SListPure< WInfo > &W_All)
Extracts pertinent subgraph from all wNodes to V (without bundles)
NodeArray< int > m_wasHere
Array maintaining visited bits on each node.
Graph & m_g
Input graph.
const int & m_embeddingGrade
The embedding grade.
void splitInMinorTypes(const SListPure< adjEntry > &externalFacePath, int marker)
Assign pertinent nodes to the different minortypes and extracts inner externalPaths.
EdgeArray< BoyerMyrvoldEdgeType > & m_edgeType
Contains the type of each edge.
const NodeArray< int > & m_highestSubtreeDFI
The highest DFI in a subtree with node as root.
SListPure< KuratowskiStructure > allKuratowskis
List of all Kuratowski Structures.
FindKuratowskis & operator=(const FindKuratowskis &)=delete
node findRoot(node stopX) const
Finds root node of the bicomp containing the stopping node stopX.
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
A Kuratowski Structure is a special graph structure containing severals subdivisions.
void copyPointer(const KuratowskiStructure &orig, SListPure< WInfo > &list)
Used in copy constructor.
void clear()
Reset all data members.
node stopX
First stopping node.
SListPure< ArrayBuffer< adjEntry > > zPaths
A path from the zNode in minortype D to node V for each highest XY-Path.
SListPure< edge > pertinentSubgraph
A list of all edges in pertinent paths (bundles only)
SListPure< int > stopXStartnodes
List of all virtual startnodes of paths starting at stopX (only without bundles)
SListPure< adjEntry > externalFacePath
External face path of bicomp containing V in direction CCW.
SListPure< edge > externalSubgraph
A list of all edges in all externally active paths (bundles only)
KuratowskiStructure(const KuratowskiStructure &orig)
Copy constructor.
node stopY
Second stopping node.
int V_DFI
DFI of the current node to embed.
SListPure< node > stopYEndnodes
List of all endnodes of paths starting at stopY (only without bundles)
SListPure< node > stopXEndnodes
List of all endnodes of paths starting at stopX (only without bundles)
node R
The root of the bicomp containing stopX and stopY.
SListPure< ExternE > externE
List of externally active nodes strictly between x and y for minortypes B and E.
ArrayBuffer< adjEntry > highestFacePath
The whole highestFacePath of the bicomp containing V.
node RReal
Real node of virtual node R.
SListPure< WInfo > wNodes
Holds information about all pertinent nodes w of the bicomp containing V.
SListPure< ArrayBuffer< adjEntry > > highestXYPaths
The appropriate paths of the highestFacePath for each wNode.
void copy(const KuratowskiStructure &orig)
Copies class.
KuratowskiStructure & operator=(const KuratowskiStructure &orig)
Assignment.
SListPure< int > stopYStartnodes
List of all virtual startnodes of paths starting at stopY (only without bundles)
node V
The current node to embed.
Class for the representation of nodes.
Definition Graph_d.h:241
Encapsulates a pointer to an ogdf::SList element.
Definition SList.h:104
Singly linked lists.
Definition SList.h:191
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.
BoyerMyrvoldEdgeType
Type of edge.
unsigned int operator|=(unsigned int &i, CPUFeatureMask fm)
int operator&(int lhs, UMLOpt rhs)
Definition OrthoRep.h:65
List of externally active nodes strictly between x and y for minortypes B and E
SListPure< node > endnodes
SListPure< SListPure< edge > > externalPaths
SListPure< int > startnodes
Saves information about a pertinent node w between two stopping vertices.
ArrayBuffer< adjEntry > * highestXYPath
node firstExternEAfterW
SListIterator< ExternE > externEEnd
SListPure< SListPure< edge > > pertinentPaths
SListIterator< ExternE > externEStart
ArrayBuffer< adjEntry > * zPath
MinorType
All possible base minortypes on w.