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
35
36namespace ogdf {
37
38
51
53
55struct 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 };
67
70
73
75
79};
80
81inline int operator&(int lhs, WInfo::MinorType rhs) { return lhs & static_cast<int>(rhs); }
82
83inline int operator|=(int& lhs, WInfo::MinorType rhs) {
84 lhs |= static_cast<int>(rhs);
85 return lhs;
86}
87
176
178
181public:
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
201
202protected:
205
208
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
293
296 const ArrayBuffer<adjEntry>& highestFacePath, int marker, int highMarker);
297
299 void splitInMinorTypes(const SListPure<adjEntry>& externalFacePath, int marker);
300
305 void extractExternalSubgraphBundles(const node stop, int root,
306 SListPure<edge>& externalSubgraph, int nodeMarker);
307
309#if 1
311#else
313#endif
314
317 SListPure<edge>& pertinentSubgraph, int nodeMarker);
318};
319
320}
Declaration of the class BoyerMyrvoldPlanar.
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
Definition ArrayBuffer.h:56
The parameterized class Array implements dynamic arrays of type E.
Definition Array.h:214
This class implements the extended BoyerMyrvold planarity embedding algorithm.
Dynamic arrays indexed with edges.
Definition EdgeArray.h:125
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:521
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.
KuratowskiStructure()
Constructor.
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.
Dynamic arrays indexed with nodes.
Definition NodeArray.h:125
Class for the representation of nodes.
Definition Graph_d.h:177
Encapsulates a pointer to an ogdf::SList element.
Definition SList.h:92
Singly linked lists.
Definition SList.h:179
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.
unsigned int operator|=(unsigned int &i, CPUFeatureMask fm)
int operator&(int lhs, UMLOpt rhs)
Definition OrthoRep.h:59
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.