Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

FindKuratowskis.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 
37 namespace ogdf {
38 
39 
46 struct ExternE {
51 };
52 
54 
56 struct WInfo {
58 
60  enum class MinorType {
61  A=0x0001, // minor A
62  B=0x0002, // minor B
63  C=0x0004, // minor C
64  D=0x0008, // minor D
65  E=0x0010 // minor E
66  };
67  int minorType;
68 
71 
74 
76 
80 };
81 
82 inline int operator & (int lhs, WInfo::MinorType rhs) {
83  return lhs & static_cast<int>(rhs);
84 }
85 
86 inline int operator |= (int& lhs, WInfo::MinorType rhs) {
87  lhs |= static_cast<int>(rhs);
88  return lhs;
89 }
90 
93  friend class FindKuratowskis;
94  friend class ExtractKuratowskis;
95 public:
100 
103  copy(orig);
104  }
105 
108  copy(orig);
109  return *this;
110  }
111 
113  void clear();
114 
118  int V_DFI;
119 
123 
130 
131 protected:
133 
137 
139 
144 
147 
150 
153 
156 
158 
161 
164 
173 
175  void copy(const KuratowskiStructure& orig);
177  void copyPointer(const KuratowskiStructure& orig, SListPure<WInfo>& list);
178 };
179 
181 
184 public:
186  explicit FindKuratowskis(BoyerMyrvoldPlanar* bm);
189 
191  void addKuratowskiStructure(
192  const node currentNode,
193  const node root,
194  const node stopx,
195  const node stopy);
196 
199  return allKuratowskis;
200  }
201 
204  return allKuratowskis;
205  }
206 
207  FindKuratowskis &operator=(const FindKuratowskis &) = delete;
208 
209 protected:
212 
215 
217  const int& m_embeddingGrade;
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 
302  void extractExternalFacePath(
303  SListPure<adjEntry>& externalFacePath,
304  const ArrayBuffer<adjEntry>& highestFacePath,
305  int marker,
306  int highMarker);
307 
309  void splitInMinorTypes(
310  const SListPure<adjEntry>& externalFacePath,
311  int marker);
312 
314  void extractExternalSubgraph(
315  const node stop,
316  int root,
317  SListPure<int>& externalStartnodes,
318  SListPure<node>& externalEndnodes);
320  void extractExternalSubgraphBundles(
321  const node stop,
322  int root,
323  SListPure<edge>& externalSubgraph,
324  int nodeMarker);
325 
327 #if 1
328  void extractPertinentSubgraph(SListPure<WInfo>& W_All);
329 #else
330  void extractPertinentSubgraph(SListPure<WInfo>& W_All, const node V);
331 #endif
332 
334  void extractPertinentSubgraphBundles(
335  const SListPure<WInfo>& W_All,
336  const node V,
337  SListPure<edge>& pertinentSubgraph,
338  int nodeMarker);
339 };
340 
341 }
const NodeArray< ListPure< node > > & m_separatedDFSChildList
A list to all separated DFS-children of node.
KuratowskiStructure & operator=(const KuratowskiStructure &orig)
Assignment.
unsigned int operator|=(unsigned int &i, CPUFeatureMask fm)
int operator&(int lhs, UMLOpt rhs)
Definition: OrthoRep.h:64
Extracts multiple Kuratowski Subdivisions.
NodeArray< int > & m_lowPoint
The lowpoint of each node.
SListPure< int > startnodes
const int & m_embeddingGrade
The embedding grade.
KuratowskiStructure(const KuratowskiStructure &orig)
Copy constructor.
int V_DFI
DFI of the current node to embed.
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:492
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
SListPure< edge > pertinentSubgraph
A list of all edges in pertinent paths (bundles only)
SListPure< SListPure< edge > > externalPaths
const NodeArray< adjEntry > & m_adjParent
The adjEntry which goes from DFS-parent to current vertex.
node R
The root of the bicomp containing stopX and stopY.
ArrayBuffer< adjEntry > highestFacePath
The whole highestFacePath of the bicomp containing V.
SListPure< SListPure< edge > > pertinentPaths
SListPure< WInfo > wNodes
Holds information about all pertinent nodes w of the bicomp containing V.
node V
The current node to embed.
const SListPure< KuratowskiStructure > & getAllKuratowskis() const
Constant get-method for the list of all KuratowskiStructures.
Graph & m_g
Input graph.
A Kuratowski Structure is a special graph structure containing severals subdivisions.
An array that keeps track of the number of inserted elements; also usable as an efficient stack...
Definition: Array.h:45
SListPure< node > endnodes
Encapsulates a pointer to an ogdf::SList element.
Definition: SList.h:39
SListPure< ArrayBuffer< adjEntry > > highestXYPaths
The appropriate paths of the highestFacePath for each wNode.
SListPure< adjEntry > externalFacePath
External face path of bicomp containing V in direction CCW.
const bool m_bundles
If true, bundles are extracted, otherwise single paths?
~FindKuratowskis()
Destructor.
ArrayBuffer< adjEntry > * highestXYPath
node stopX
First stopping node.
List of externally active nodes strictly between x and y for minortypes B and E
Dynamic arrays indexed with nodes.
Definition: Graph_d.h:438
ArrayBuffer< adjEntry > * zPath
node firstExternEAfterW
SListPure< ExternE > externE
List of externally active nodes strictly between x and y for minortypes B and E.
Saves information about a pertinent node w between two stopping vertices.
node stopY
Second stopping node.
static void copy(const T &from, T &to)
Definition: Alg.h:61
NodeArray< int > m_wasHere
Array maintaining visited bits on each node.
EdgeArray< BoyerMyrvoldEdgeType > & m_edgeType
Contains the type of each edge.
node RReal
Real node of virtual node R.
MinorType
All possible base minortypes on w.
const NodeArray< int > & m_dfi
The one and only DFI-NodeArray.
SListIterator< ExternE > externEStart
SListPure< int > stopXStartnodes
List of all virtual startnodes of paths starting at stopX (only without bundles)
Class for the representation of nodes.
Definition: Graph_d.h:169
SListPure< node > stopXEndnodes
List of all endnodes of paths starting at stopX (only without bundles)
NodeArray< int > & m_numUnembeddedBackedgesInBicomp
Stores for each (virtual) bicomp root how many backedges to its bicomp still have to be embedded...
This class collects information about Kuratowski Subdivisions which is used for extraction later...
SListPure< edge > externalSubgraph
A list of all edges in all externally active paths (bundles only)
SListPure< node > stopYEndnodes
List of all endnodes of paths starting at stopY (only without bundles)
int m_nodeMarker
Value used as marker for visited nodes etc.
This class implements the extended BoyerMyrvold planarity embedding algorithm.
NodeArray< SListPure< node > > & m_pertinentRoots
List of virtual bicomp roots, that are pertinent to the current embedded node.
const NodeArray< node > & m_realVertex
Link to non-virtual vertex of a virtual Vertex.
SListPure< ArrayBuffer< adjEntry > > zPaths
A path from the zNode in minortype D to node V for each highest XY-Path.
SListPure< int > stopYStartnodes
List of all virtual startnodes of paths starting at stopY (only without bundles)
SListPure< KuratowskiStructure > & getAllKuratowskis()
Get-method for the list of all KuratowskiStructures.
Declaration of the class BoyerMyrvoldPlanar.
const Array< node > & m_nodeFromDFI
Returns appropriate node from given DFI.
~KuratowskiStructure()
Destructor.
KuratowskiStructure k
Current Kuratowski Structure.
The namespace for all OGDF objects.
SListPure< KuratowskiStructure > allKuratowskis
List of all Kuratowski Structures.
KuratowskiStructure()
Constructor.
const NodeArray< int > & m_highestSubtreeDFI
The highest DFI in a subtree with node as root.
SListIterator< ExternE > externEEnd
BoyerMyrvoldPlanar * pBM
Link to class BoyerMyrvoldPlanar.
const EdgeArray< node > & m_pointsToRoot
Identifies the rootnode of the child bicomp the given backedge points to.
NodeArray< WInfo * > m_getWInfo
Links appropriate WInfo to node.
NodeArray< SListPure< adjEntry > > & m_backedgeFlags
Holds information, if node is the source of a backedge.
const NodeArray< int > & m_leastAncestor
The DFI of the least ancestor node over all backedges.