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 #include <ogdf/basic/SList.h>
39 
40 namespace ogdf {
41 namespace booth_lueker {
42 
43 class EmbedPQTree : public PQTree<edge, IndInfo*, bool> {
44 public:
45  EmbedPQTree() : PQTree<edge, IndInfo*, bool>() { }
46 
47  virtual ~EmbedPQTree() { }
48 
49  virtual void emptyAllPertinentNodes() override;
50 
51  virtual void clientDefinedEmptyNode(PQNode<edge, IndInfo*, bool>* nodePtr) override;
52 
53  virtual int Initialize(SListPure<PlanarLeafKey<IndInfo*>*>& leafKeys);
54 
57  }
58 
60  SListPure<node>& opposed, SListPure<node>& nonOpposed, node v);
61 
62  virtual bool Reduction(SListPure<PlanarLeafKey<IndInfo*>*>& leafKeys);
63 
66  }
67 
69  return clientSibLeft(nodePtr);
70  }
71 
73  return clientSibRight(nodePtr);
74  }
75 
77  return clientLeftEndmost(nodePtr);
78  }
79 
81  return clientRightEndmost(nodePtr);
82  }
83 
86  return clientNextSib(nodePtr, other);
87  }
88 
89  virtual void getFront(PQNode<edge, IndInfo*, bool>* nodePtr,
91 
92 protected:
94  PQNode<edge, IndInfo*, bool>* nodePtr) const override;
95 
97  PQNode<edge, IndInfo*, bool>* nodePtr) const override;
98 
100  PQNode<edge, IndInfo*, bool>* nodePtr) const override;
101 
103  PQNode<edge, IndInfo*, bool>* nodePtr) const override;
104 
106  PQNode<edge, IndInfo*, bool>* other) const override;
107  virtual const char* clientPrintStatus(PQNode<edge, IndInfo*, bool>* nodePtr) override;
108 
109  virtual void front(PQNode<edge, IndInfo*, bool>* nodePtr,
111 
113  SListPure<PQLeafKey<edge, IndInfo*, bool>*>& leafKeys) override {
114  PQTree<edge, IndInfo*, bool>::front(nodePtr, leafKeys);
115  }
116 
117 private:
120  bool addIndicator = false, PQNode<edge, IndInfo*, bool>* opposite = nullptr);
121 
124 };
125 
126 }
127 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
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:45
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: PQLeafKey.h:87
ogdf::booth_lueker::EmbedPQTree::scanSibLeft
PQNode< edge, IndInfo *, bool > * scanSibLeft(PQNode< edge, IndInfo *, bool > *nodePtr) const
Definition: EmbedPQTree.h:68
ogdf::booth_lueker::EmbedPQTree::front
void front(PQNode< edge, IndInfo *, bool > *nodePtr, SListPure< PQLeafKey< edge, IndInfo *, bool > * > &leafKeys) override
Definition: EmbedPQTree.h:112
ogdf::booth_lueker::EmbedPQTree::front
virtual void front(PQNode< edge, IndInfo *, bool > *nodePtr, SListPure< PQBasicKey< edge, IndInfo *, bool > * > &leafKeys)
ogdf::PQTree
Definition: PQNode.h:46
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:41
ogdf::booth_lueker::EmbedPQTree::scanSibRight
PQNode< edge, IndInfo *, bool > * scanSibRight(PQNode< edge, IndInfo *, bool > *nodePtr) const
Definition: EmbedPQTree.h:72
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:1873
ogdf::booth_lueker::EmbedPQTree::Initialize
int Initialize(SListPure< PQLeafKey< edge, IndInfo *, bool > * > &leafKeys) override
Definition: EmbedPQTree.h:55
SList.h
Declaration of singly linked lists and iterators.
ogdf::booth_lueker::EmbedPQTree::scanLeftEndmost
PQNode< edge, IndInfo *, bool > * scanLeftEndmost(PQNode< edge, IndInfo *, bool > *nodePtr) const
Definition: EmbedPQTree.h:76
ogdf::booth_lueker::EmbedPQTree
Definition: EmbedPQTree.h:43
ogdf::SListPure
Singly linked lists.
Definition: SList.h:39
ogdf::PQTree::Initialize
virtual int Initialize(SListPure< PQLeafKey< T, X, Y > * > &leafKeys)
Initializes the PQ-tree with a set of elements.
Definition: PQTree.h:1909
ogdf::booth_lueker::EmbedPQTree::scanRightEndmost
PQNode< edge, IndInfo *, bool > * scanRightEndmost(PQNode< edge, IndInfo *, bool > *nodePtr) const
Definition: EmbedPQTree.h:80
ogdf::booth_lueker::EmbedPQTree::clientRightEndmost
virtual PQNode< edge, IndInfo *, bool > * clientRightEndmost(PQNode< edge, IndInfo *, bool > *nodePtr) const override
EmbedIndicator.h
Declaration of the class EmbedIndicator.
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::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:84
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:64
ogdf::booth_lueker::EmbedPQTree::Initialize
virtual int Initialize(SListPure< PlanarLeafKey< IndInfo * > * > &leafKeys)
ogdf::booth_lueker::EmbedPQTree::~EmbedPQTree
virtual ~EmbedPQTree()
Definition: EmbedPQTree.h:47
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:356
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:2230
ogdf::PQBasicKey
Definition: PQBasicKey.h:112
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: PlanarLeafKey.h:41
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:233
PlanarLeafKey.h
Declaration of class PlanarLeafKey.
ogdf::booth_lueker::EmbedPQTree::clientDefinedEmptyNode
virtual void clientDefinedEmptyNode(PQNode< edge, IndInfo *, bool > *nodePtr) override
ogdf::PQNode< edge, IndInfo *, bool >