Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

EmbedPQTree.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
35 #include <ogdf/basic/PQTree.h>
36 
37 namespace ogdf::booth_lueker {
38 class IndInfo;
39 template<class X>
41 } // namespace ogdf::booth_lueker
42 
43 namespace ogdf {
44 template<class E>
45 class SListPure;
46 template<class T, class X, class Y>
47 class PQBasicKey;
48 template<class T, class X, class Y>
49 class PQLeafKey;
50 template<class T, class X, class Y>
51 class PQNode;
52 
53 namespace booth_lueker {
54 
55 class EmbedPQTree : public PQTree<edge, IndInfo*, bool> {
56 public:
57  EmbedPQTree() : PQTree<edge, IndInfo*, bool>() { }
58 
59  virtual ~EmbedPQTree() { }
60 
61  virtual void emptyAllPertinentNodes() override;
62 
63  virtual void clientDefinedEmptyNode(PQNode<edge, IndInfo*, bool>* nodePtr) override;
64 
65  virtual int Initialize(SListPure<PlanarLeafKey<IndInfo*>*>& leafKeys);
66 
69  }
70 
72  SListPure<node>& opposed, SListPure<node>& nonOpposed, node v);
73 
74  virtual bool Reduction(SListPure<PlanarLeafKey<IndInfo*>*>& leafKeys);
75 
78  }
79 
81  return clientSibLeft(nodePtr);
82  }
83 
85  return clientSibRight(nodePtr);
86  }
87 
89  return clientLeftEndmost(nodePtr);
90  }
91 
93  return clientRightEndmost(nodePtr);
94  }
95 
98  return clientNextSib(nodePtr, other);
99  }
100 
101  virtual void getFront(PQNode<edge, IndInfo*, bool>* nodePtr,
103 
104 protected:
106  PQNode<edge, IndInfo*, bool>* nodePtr) const override;
107 
109  PQNode<edge, IndInfo*, bool>* nodePtr) const override;
110 
112  PQNode<edge, IndInfo*, bool>* nodePtr) const override;
113 
115  PQNode<edge, IndInfo*, bool>* nodePtr) const override;
116 
118  PQNode<edge, IndInfo*, bool>* other) const override;
119  virtual const char* clientPrintStatus(PQNode<edge, IndInfo*, bool>* nodePtr) override;
120 
121  virtual void front(PQNode<edge, IndInfo*, bool>* nodePtr,
123 
125  SListPure<PQLeafKey<edge, IndInfo*, bool>*>& leafKeys) override {
126  PQTree<edge, IndInfo*, bool>::front(nodePtr, leafKeys);
127  }
128 
129 private:
132  bool addIndicator = false, PQNode<edge, IndInfo*, bool>* opposite = nullptr);
133 
136 };
137 
138 }
139 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::booth_lueker::EmbedPQTree::Reduction
virtual bool Reduction(SListPure< PlanarLeafKey< IndInfo * > * > &leafKeys)
ogdf::booth_lueker::EmbedPQTree::EmbedPQTree
EmbedPQTree()
Definition: EmbedPQTree.h:57
ogdf::booth_lueker::EmbedPQTree::clientSibRight
virtual PQNode< edge, IndInfo *, bool > * clientSibRight(PQNode< edge, IndInfo *, bool > *nodePtr) const override
ogdf::PQLeafKey
The class template PQLeafKey is a derived class of class template PQBasicKey.
Definition: PQInternalNode.h:40
ogdf::booth_lueker::EmbedPQTree::scanSibLeft
PQNode< edge, IndInfo *, bool > * scanSibLeft(PQNode< edge, IndInfo *, bool > *nodePtr) const
Definition: EmbedPQTree.h:80
ogdf::booth_lueker::EmbedPQTree::front
void front(PQNode< edge, IndInfo *, bool > *nodePtr, SListPure< PQLeafKey< edge, IndInfo *, bool > * > &leafKeys) override
Definition: EmbedPQTree.h:124
ogdf::booth_lueker::EmbedPQTree::front
virtual void front(PQNode< edge, IndInfo *, bool > *nodePtr, SListPure< PQBasicKey< edge, IndInfo *, bool > * > &leafKeys)
ogdf::PQTree
Definition: PQNode.h:53
PQTree.h
Declaration and implementation of the class PQTree.
ogdf::booth_lueker::EmbedPQTree::clientLeftEndmost
virtual PQNode< edge, IndInfo *, bool > * clientLeftEndmost(PQNode< edge, IndInfo *, bool > *nodePtr) const override
ogdf::booth_lueker::IndInfo
Definition: IndInfo.h:42
ogdf::booth_lueker::EmbedPQTree::scanSibRight
PQNode< edge, IndInfo *, bool > * scanSibRight(PQNode< edge, IndInfo *, bool > *nodePtr) const
Definition: EmbedPQTree.h:84
ogdf::PQTree::front
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:1880
ogdf::booth_lueker::EmbedPQTree::Initialize
int Initialize(SListPure< PQLeafKey< edge, IndInfo *, bool > * > &leafKeys) override
Definition: EmbedPQTree.h:67
ogdf::booth_lueker::EmbedPQTree::scanLeftEndmost
PQNode< edge, IndInfo *, bool > * scanLeftEndmost(PQNode< edge, IndInfo *, bool > *nodePtr) const
Definition: EmbedPQTree.h:88
ogdf::booth_lueker::EmbedPQTree
Definition: EmbedPQTree.h:55
ogdf::SListPure
Singly linked lists.
Definition: SList.h:52
ogdf::PQTree::Initialize
virtual int Initialize(SListPure< PQLeafKey< T, X, Y > * > &leafKeys)
Initializes the PQ-tree with a set of elements.
Definition: PQTree.h:1916
ogdf::booth_lueker::EmbedPQTree::scanRightEndmost
PQNode< edge, IndInfo *, bool > * scanRightEndmost(PQNode< edge, IndInfo *, bool > *nodePtr) const
Definition: EmbedPQTree.h:92
ogdf::booth_lueker::EmbedPQTree::clientRightEndmost
virtual PQNode< edge, IndInfo *, bool > * clientRightEndmost(PQNode< edge, IndInfo *, bool > *nodePtr) const override
ogdf::booth_lueker::EmbedPQTree::ReplaceRoot
void ReplaceRoot(SListPure< PlanarLeafKey< IndInfo * > * > &leafKeys, SListPure< edge > &frontier, SListPure< node > &opposed, SListPure< node > &nonOpposed, node v)
ogdf::booth_lueker
Definition: EmbedIndicator.h:48
ogdf::booth_lueker::EmbedPQTree::emptyAllPertinentNodes
virtual void emptyAllPertinentNodes() override
Cleans up all flags that have been set in the pertinent nodes during the reduction process.
ogdf::booth_lueker::EmbedPQTree::getFront
virtual void getFront(PQNode< edge, IndInfo *, bool > *nodePtr, SListPure< PQBasicKey< edge, IndInfo *, bool > * > &leafKeys)
ogdf::booth_lueker::EmbedPQTree::scanNextSib
PQNode< edge, IndInfo *, bool > * scanNextSib(PQNode< edge, IndInfo *, bool > *nodePtr, PQNode< edge, IndInfo *, bool > *other)
Definition: EmbedPQTree.h:96
ogdf::booth_lueker::EmbedPQTree::ReplaceFullRoot
void ReplaceFullRoot(SListPure< PlanarLeafKey< IndInfo * > * > &leafKeys, SListPure< PQBasicKey< edge, IndInfo *, bool > * > &frontier, node v, bool addIndicator=false, PQNode< edge, IndInfo *, bool > *opposite=nullptr)
ogdf::booth_lueker::EmbedPQTree::Reduction
bool Reduction(SListPure< PQLeafKey< edge, IndInfo *, bool > * > &leafKeys) override
Definition: EmbedPQTree.h:76
ogdf::booth_lueker::EmbedPQTree::Initialize
virtual int Initialize(SListPure< PlanarLeafKey< IndInfo * > * > &leafKeys)
ogdf::booth_lueker::EmbedPQTree::~EmbedPQTree
virtual ~EmbedPQTree()
Definition: EmbedPQTree.h:59
ogdf::booth_lueker::EmbedPQTree::ReplacePartialRoot
void ReplacePartialRoot(SListPure< PlanarLeafKey< IndInfo * > * > &leafKeys, SListPure< PQBasicKey< edge, IndInfo *, bool > * > &frontier, node v)
ogdf::booth_lueker::EmbedPQTree::clientSibLeft
virtual PQNode< edge, IndInfo *, bool > * clientSibLeft(PQNode< edge, IndInfo *, bool > *nodePtr) const override
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:363
ogdf::PQTree::Reduction
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:2237
ogdf::PQBasicKey
Definition: PQBasicKey.h:114
ogdf::booth_lueker::EmbedPQTree::clientPrintStatus
virtual const char * clientPrintStatus(PQNode< edge, IndInfo *, bool > *nodePtr) override
ogdf::booth_lueker::EmbedPQTree::clientNextSib
virtual PQNode< edge, IndInfo *, bool > * clientNextSib(PQNode< edge, IndInfo *, bool > *nodePtr, PQNode< edge, IndInfo *, bool > *other) const override
ogdf::booth_lueker::PlanarLeafKey
Definition: EmbedPQTree.h:40
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::booth_lueker::EmbedPQTree::clientDefinedEmptyNode
virtual void clientDefinedEmptyNode(PQNode< edge, IndInfo *, bool > *nodePtr) override
ogdf::PQNode
The class template PQBasicKey is an abstract base class.
Definition: PQBasicKey.h:111