Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

FindKuratowskis.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 
37 namespace ogdf {
38 
39 
41 
44 struct ExternE {
49 };
50 
52 
54 struct WInfo {
55 public:
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) {
82  return lhs & static_cast<int>(rhs);
83 }
84 
85 inline int operator |= (int& lhs, WInfo::MinorType rhs) {
86  lhs |= static_cast<int>(rhs);
87  return lhs;
88 }
89 
92  friend class FindKuratowskis;
93  friend class ExtractKuratowskis;
94 public:
99 
102  copy(orig);
103  }
104 
107  copy(orig);
108  return *this;
109  }
110 
112  void clear();
113 
117  int V_DFI;
118 
122 
129 
130 protected:
132 
136 
138 
143 
146 
149 
152 
155 
157 
160 
163 
172 
174  void copy(const KuratowskiStructure& orig);
176  void copyPointer(const KuratowskiStructure& orig, SListPure<WInfo>& list);
177 };
178 
180 
183 public:
185  explicit FindKuratowskis(BoyerMyrvoldPlanar* bm);
188 
190  void addKuratowskiStructure(
191  const node currentNode,
192  const node root,
193  const node stopx,
194  const node stopy);
195 
198  return allKuratowskis;
199  }
200 
203  return allKuratowskis;
204  }
205 
206  FindKuratowskis &operator=(const FindKuratowskis &) = delete;
207 
208 protected:
211 
214 
216  const int& m_embeddingGrade;
217 
219  const bool m_bundles;
220 
223 
226 
229 
231 
236 
238 
241 
244 
247 
249 
251  const NodeArray<adjEntry>(& m_link)[2];
252 
255 
257 
260 
263 
266 
269 
271 
274 
277 
279 
282 
284 
288 
291 
293  node findRoot(node stopX);
294 
296  void extractHighestFacePath(ListPure<adjEntry>& highestFacePath, int marker);
297 
299  void extractExternalFacePath(
300  SListPure<adjEntry>& externalFacePath,
301  const ListPure<adjEntry>& highestFacePath,
302  int marker,
303  int highMarker);
304 
306  void splitInMinorTypes(
307  const SListPure<adjEntry>& externalFacePath,
308  int marker);
309 
311  void extractExternalSubgraph(
312  const node stop,
313  int root,
314  SListPure<int>& externalStartnodes,
315  SListPure<node>& externalEndnodes);
317  void extractExternalSubgraphBundles(
318  const node stop,
319  int root,
320  SListPure<edge>& externalSubgraph,
321  int nodeMarker);
322 
324 #if 1
325  void extractPertinentSubgraph(SListPure<WInfo>& W_All);
326 #else
327  void extractPertinentSubgraph(SListPure<WInfo>& W_All, const node V);
328 #endif
329 
331  void extractPertinentSubgraphBundles(
332  const SListPure<WInfo>& W_All,
333  const node V,
334  SListPure<edge>& pertinentSubgraph,
335  int nodeMarker);
336 };
337 
338 }
const NodeArray< ListPure< node > > & m_separatedDFSChildList
A list to all separated DFS-children of node.
int operator&(int i, TopologyModule::Options b)
KuratowskiStructure & operator=(const KuratowskiStructure &orig)
Assignment.
unsigned int operator|=(unsigned int &i, CPUFeatureMask fm)
Extracts multiple Kuratowski Subdivisions.
NodeArray< int > & m_visitedWithBackedge
Keeps track of all vertices that are visited by the walkup through a specific backedge.
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:472
#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.
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.
Doubly linked lists.
Definition: List.h:40
const SListPure< KuratowskiStructure > & getAllKuratowskis() const
Constant get-method for the list of all KuratowskiStructures.
Graph & m_g
Input graph.
SListPure< SListPure< adjEntry > > highestXYPaths
The appropriate paths of the highestFacePath for each wNode.
A Kuratowski Structure is a special graph structure containing severals subdivisions.
SListPure< node > endnodes
Encapsulates a pointer to an ogdf::SList element.
Definition: SList.h:40
ListPure< adjEntry > highestFacePath
The whole highestFacePath of the bicomp containing V.
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?
SListPure< SListPure< adjEntry > > zPaths
A path from the zNode in minortype D to node V for each highest XY-Path.
~FindKuratowskis()
Destructor.
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:423
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.
SListPure< adjEntry > * zPath
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:167
SListPure< node > stopXEndnodes
List of all endnodes of paths starting at stopX (only without bundles)
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< 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.
SListPure< adjEntry > * highestXYPath
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.