Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
PQLeaf.h
Go to the documentation of this file.
1
32#pragma once
33
35
36namespace ogdf {
37
47template<class T, class X, class Y>
48class PQLeaf : public PQNode<T, X, Y> {
49public:
74
75 // Constructor
83
95 virtual ~PQLeaf() { }
96
104 virtual PQLeafKey<T, X, Y>* getKey() const { return m_pointerToKey; }
105
120 if (pointerToKey != nullptr) {
121 m_pointerToKey->setNodePointer(this);
122 return true;
123 } else {
124 return false;
125 }
126 }
127
135 virtual PQInternalKey<T, X, Y>* getInternal() const { return nullptr; }
136
152 if (pointerToInternal != nullptr) {
153 return false;
154 } else {
155 return true;
156 }
157 }
158
160
166 virtual PQNodeRoot::PQNodeMark mark() const { return m_mark; }
167
169 virtual void mark(PQNodeRoot::PQNodeMark m) { m_mark = m; }
170
172
182 virtual PQNodeRoot::PQNodeStatus status() const { return m_status; }
183
185 virtual void status(PQNodeRoot::PQNodeStatus s) { m_status = s; }
186
188
195
197 virtual void type(PQNodeRoot::PQNodeType) { }
198
199private:
206
215
221};
222
223}
Declaration and implementation of the class PQNode.
The class template PQInternalKey is a derived class of class template PQBasicKey.
The datastructure PQ-tree was designed to present a set of permutations on an arbitrary set of elemen...
Definition PQLeaf.h:48
virtual PQNodeRoot::PQNodeType type() const
Returns the variable PQInternalNode::m_type in the derived class PQLeaf.
Definition PQLeaf.h:194
virtual PQLeafKey< T, X, Y > * getKey() const
getKey() returns a pointer to the PQLeafKey of PQLeaf.
Definition PQLeaf.h:104
virtual PQNodeRoot::PQNodeStatus status() const
Returns the variable m_status in the derived class PQLeaf.
Definition PQLeaf.h:182
virtual void status(PQNodeRoot::PQNodeStatus s)
Sets the variable m_status in the derived class PQLeaf.
Definition PQLeaf.h:185
PQLeaf(int count, PQNodeRoot::PQNodeStatus stat, PQLeafKey< T, X, Y > *keyPtr, PQNodeKey< T, X, Y > *infoPtr)
The client may choose between two different constructors.
Definition PQLeaf.h:66
virtual PQInternalKey< T, X, Y > * getInternal() const
getInternal() returns 0.
Definition PQLeaf.h:135
PQNodeRoot::PQNodeMark m_mark
m_mark is a variable, storing if the PQLeaf is QUEUEUD, BLOCKED or UNBLOCKED (see PQNode) during the ...
Definition PQLeaf.h:205
virtual bool setInternal(PQInternalKey< T, X, Y > *pointerToInternal)
setInternal() accepts only pointers pointerToInternal = 0.
Definition PQLeaf.h:151
virtual void mark(PQNodeRoot::PQNodeMark m)
Sets the variable m_mark.
Definition PQLeaf.h:169
virtual bool setKey(PQLeafKey< T, X, Y > *pointerToKey)
setKey() sets the pointer variable m_pointerToKey to the specified address of pointerToKey that is of...
Definition PQLeaf.h:118
virtual ~PQLeaf()
The destructor does not delete any accompanying information class as PQLeafKey, PQNodeKey and PQInter...
Definition PQLeaf.h:95
virtual PQNodeRoot::PQNodeMark mark() const
Returns the variable m_mark.
Definition PQLeaf.h:166
virtual void type(PQNodeRoot::PQNodeType)
Sets the variable PQInternalNode::m_type in the derived class PQLeaf.
Definition PQLeaf.h:197
PQNodeRoot::PQNodeStatus m_status
m_status is a variable storing the status of a PQLeaf.
Definition PQLeaf.h:220
PQLeafKey< T, X, Y > * m_pointerToKey
m_pointerToKey stores the adress of the corresponding PQLeafKey.
Definition PQLeaf.h:214
PQLeaf(int count, PQNodeRoot::PQNodeStatus stat, PQLeafKey< T, X, Y > *keyPtr)
Definition PQLeaf.h:76
The class template PQLeafKey is a derived class of class template PQBasicKey.
Definition PQLeafKey.h:87
The class template PQBasicKey is an abstract base class.
Definition PQNode.h:55
The class template PQNodeKey is a derived class of class template PQBasicKey.
Definition PQNodeKey.h:57
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.