Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

EmbedPQTree.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
35 #include <ogdf/basic/SList.h>
36 #include <ogdf/basic/PQTree.h>
39 
40 namespace ogdf {
41 namespace booth_lueker {
42 
43 class EmbedPQTree: public PQTree<edge,IndInfo*,bool>
44 {
45 public:
46 
47  EmbedPQTree() : PQTree<edge,IndInfo*,bool>() { }
48 
49  virtual ~EmbedPQTree() { }
50 
51  virtual void emptyAllPertinentNodes() override;
52 
53  virtual void clientDefinedEmptyNode(PQNode<edge,IndInfo*,bool>* nodePtr) override;
54 
55  virtual int Initialize(SListPure<PlanarLeafKey<IndInfo*>*> &leafKeys);
56 
59  }
60 
61  void ReplaceRoot(
63  SListPure<edge> &frontier,
64  SListPure<node> &opposed,
65  SListPure<node> &nonOpposed,
66  node v);
67 
68  virtual bool Reduction(SListPure<PlanarLeafKey<IndInfo*>*> &leafKeys);
69 
70  bool Reduction(SListPure<PQLeafKey<edge,IndInfo*,bool>*> &leafKeys) override {
72  }
73 
75  return clientSibLeft(nodePtr);
76  }
77 
79  return clientSibRight(nodePtr);
80  }
81 
83  return clientLeftEndmost(nodePtr);
84  }
85 
87  return clientRightEndmost(nodePtr);
88  }
89 
93  return clientNextSib(nodePtr,other);
94  }
95 
96  virtual void getFront(
99 
100 protected:
101 
103  clientSibLeft(PQNode<edge,IndInfo*,bool> *nodePtr) const override;
104 
106  clientSibRight(PQNode<edge,IndInfo*,bool> *nodePtr) const override;
107 
109  clientLeftEndmost(PQNode<edge,IndInfo*,bool> *nodePtr) const override;
110 
112  clientRightEndmost(PQNode<edge,IndInfo*,bool> *nodePtr) const override;
113 
116  PQNode<edge,IndInfo*,bool> *other) const override;
117  virtual const char*
119 
120  virtual void front(
123 
124  void front(
126  SListPure<PQLeafKey<edge,IndInfo*,bool>*> &leafKeys) override
127  {
128  PQTree<edge,IndInfo*,bool>::front(nodePtr, leafKeys);
129  }
130 
131 private:
132 
133  void ReplaceFullRoot(
136  node v,
137  bool addIndicator = false,
138  PQNode<edge,IndInfo*,bool> *opposite = nullptr);
139 
140  void ReplacePartialRoot(
143  node v);
144 };
145 
146 }
147 }
Declaration of singly linked lists and iterators.
virtual int Initialize(SListPure< PlanarLeafKey< IndInfo *> *> &leafKeys)
Declaration of the class EmbedIndicator.
virtual void clientDefinedEmptyNode(PQNode< edge, IndInfo *, bool > *nodePtr) override
PQNode< edge, IndInfo *, bool > * scanNextSib(PQNode< edge, IndInfo *, bool > *nodePtr, PQNode< edge, IndInfo *, bool > *other)
Definition: EmbedPQTree.h:90
PQNode< edge, IndInfo *, bool > * scanSibLeft(PQNode< edge, IndInfo *, bool > *nodePtr) const
Definition: EmbedPQTree.h:74
virtual void emptyAllPertinentNodes() override
Cleans up all flags that have been set in the pertinent nodes during the reduction process...
void ReplaceRoot(SListPure< PlanarLeafKey< IndInfo *> *> &leafKeys, SListPure< edge > &frontier, SListPure< node > &opposed, SListPure< node > &nonOpposed, node v)
Singly linked lists.
Definition: SList.h:38
bool Reduction(SListPure< PQLeafKey< edge, IndInfo *, bool > *> &leafKeys) override
Definition: EmbedPQTree.h:70
virtual bool Reduction(SListPure< PQLeafKey< T, X, Y > *> &leafKeys)
Tests whether permissible permutations of the elements of U exist such that the elements of a subset ...
Definition: PQTree.h:2387
void front(PQNode< edge, IndInfo *, bool > *nodePtr, SListPure< PQLeafKey< edge, IndInfo *, bool > *> &leafKeys) override
Definition: EmbedPQTree.h:124
PQNode< edge, IndInfo *, bool > * scanRightEndmost(PQNode< edge, IndInfo *, bool > *nodePtr) const
Definition: EmbedPQTree.h:86
virtual int Initialize(SListPure< PQLeafKey< T, X, Y > *> &leafKeys)
Initializes the PQ-tree with a set of elements.
Definition: PQTree.h:2032
Declaration and implementation of the class PQTree.
virtual const char * clientPrintStatus(PQNode< edge, IndInfo *, bool > *nodePtr) override
void ReplaceFullRoot(SListPure< PlanarLeafKey< IndInfo *> *> &leafKeys, SListPure< PQBasicKey< edge, IndInfo *, bool > *> &frontier, node v, bool addIndicator=false, PQNode< edge, IndInfo *, bool > *opposite=nullptr)
virtual bool Reduction(SListPure< PlanarLeafKey< IndInfo *> *> &leafKeys)
Declaration of class PlanarLeafKey.
virtual PQNode< edge, IndInfo *, bool > * clientSibLeft(PQNode< edge, IndInfo *, bool > *nodePtr) const override
virtual void front(PQNode< edge, IndInfo *, bool > *nodePtr, SListPure< PQBasicKey< edge, IndInfo *, bool > *> &leafKeys)
virtual void front(PQNode< T, X, Y > *nodePtr, SListPure< PQLeafKey< T, X, Y > *> &leafKeys)
Returns the keys stored in the leaves of the front of nodePtr.
Definition: PQTree.h:1987
virtual PQNode< edge, IndInfo *, bool > * clientNextSib(PQNode< edge, IndInfo *, bool > *nodePtr, PQNode< edge, IndInfo *, bool > *other) const override
virtual PQNode< edge, IndInfo *, bool > * clientRightEndmost(PQNode< edge, IndInfo *, bool > *nodePtr) const override
virtual PQNode< edge, IndInfo *, bool > * clientSibRight(PQNode< edge, IndInfo *, bool > *nodePtr) const override
int Initialize(SListPure< PQLeafKey< edge, IndInfo *, bool > *> &leafKeys) override
Definition: EmbedPQTree.h:57
Class for the representation of edges.
Definition: Graph_d.h:292
Class for the representation of nodes.
Definition: Graph_d.h:169
virtual void getFront(PQNode< edge, IndInfo *, bool > *nodePtr, SListPure< PQBasicKey< edge, IndInfo *, bool > *> &leafKeys)
The class template PQLeafKey is a derived class of class template PQBasicKey.
Definition: PQLeafKey.h:86
Includes declaration of graph class.
void ReplacePartialRoot(SListPure< PlanarLeafKey< IndInfo *> *> &leafKeys, SListPure< PQBasicKey< edge, IndInfo *, bool > *> &frontier, node v)
PQNode< edge, IndInfo *, bool > * scanLeftEndmost(PQNode< edge, IndInfo *, bool > *nodePtr) const
Definition: EmbedPQTree.h:82
virtual PQNode< edge, IndInfo *, bool > * clientLeftEndmost(PQNode< edge, IndInfo *, bool > *nodePtr) const override
The namespace for all OGDF objects.
PQNode< edge, IndInfo *, bool > * scanSibRight(PQNode< edge, IndInfo *, bool > *nodePtr) const
Definition: EmbedPQTree.h:78