45 template<
class T,
class X,
class Y>
class PQTree;
46 template<
class T,
class X,
class Y>
class PQLeafKey;
74 explicit PQNode(
int count);
306 if (pointerToInfo !=
nullptr)
520 template<
class T,
class X,
class Y>
548 template<
class T,
class X,
class Y>
570 template<
class T,
class X,
class Y>
601 template<
class T,
class X,
class Y>
The class template PQNodeKey is a derived class of class template PQBasicKey.
int m_pertChildCount
Stores the number of pertinent children of the node.
List< PQNode< T, X, Y > * > * partialChildren
Stores all partial children of a node during a reduction.
int pertChildCount() const
Returs the number of pertinent children of a node.
SibDirection putSibling(PQNode< T, X, Y > *newSib, SibDirection preference)
The function putSibling() with preference stores a new sibling at a free sibling pointer of the node...
int m_pertLeafCount
Stores the number of pertinent leaves in the frontier of the node.
List< PQNode< T, X, Y > * > * fullChildren
Stores all full children of a node during a reduction.
PQNode< T, X, Y > * referenceParent() const
Returns the pointer to the parent if node is a reference child.
Declaration and implementation of the class PQNodeRoot.
PQNode< T, X, Y > * getEndmost(SibDirection side) const
Returns one of the endmost children of node, if node is a Q-node.
PQNode< T, X, Y > * m_referenceParent
Is a pointer to the parent, in case that the parent is a P-node and the node itself is its reference ...
PQNode(int count, PQNodeKey< T, X, Y > *infoPtr)
The (first) constructor combines the node with its information and will automatically set the PQBasic...
PQNodeType parentType() const
Returns the type of the parent of a node.
PQNodeKey< T, X, Y > * m_pointerToInfo
Stores a pointer to the corresponding information of the node.
virtual ~PQNode()
The destructor does not delete any accompanying information class as PQLeafKey, PQNodeKey and PQInter...
virtual bool setKey(PQLeafKey< T, X, Y > *pointerToKey)=0
Sets a specified pointer variable in a derived class to the specified adress of pointerToKey that is ...
PQNodeType m_parentType
Stores the type of the parent which can be either a P- or Q-node.
virtual PQLeafKey< T, X, Y > * getKey() const =0
getKey() returns a pointer to the PQLeafKeyof a node, in case that the node is supposed to have a key...
virtual PQNodeMark mark() const =0
mark() returns the variable PQLeaf::m_mark in the derived class PQLeaf and PQInternalNode.
int m_debugTreeNumber
Needed for debuging purposes.
bool endmostChild() const
The function endmostChild() checks if a node is endmost child of a Q-node.
SibDirection putSibling(PQNode< T, X, Y > *newSib)
The default function putSibling() stores a new sibling at a free sibling pointer of the node...
virtual PQNodeStatus status() const =0
Returns the variable PQLeaf::m_status in the derived class PQLeaf and PQInternalNode.
PQNode< T, X, Y > * m_rightEndmost
Stores the right endmost child of a Q-node.
PQNode< T, X, Y > * referenceChild() const
Returns a pointer to the reference child if node is a P-node.
bool changeSiblings(PQNode< T, X, Y > *oldSib, PQNode< T, X, Y > *newSib)
The function changeSiblings() replaces the old sibling oldSib of the node by a new sibling newSib...
void parentType(PQNodeType newParentType)
Sets the type of the parent of a node.
int m_identificationNumber
Each node that has been introduced once into the tree gets a unique number.
PQNode< T, X, Y > * getSib(SibDirection side) const
The function getSib() returns one of the siblings of the node.
Doubly linked lists (maintaining the length of the list).
PQNode< T, X, Y > * m_referenceChild
Stores a pointer to one child, the reference child of the doubly linked cirkular list of children of ...
PQNode< T, X, Y > * getNextSib(PQNode< T, X, Y > *other) const
The function getNextSib() returns one of the siblings of the node.
bool setNodeInfo(PQNodeKey< T, X, Y > *pointerToInfo)
Sets the pointer m_pointerToInfo to the specified adress of pointerToInfo.
virtual bool setInternal(PQInternalKey< T, X, Y > *pointerToInternal)=0
int identificationNumber() const
Returns the identification number of a node.
PQNodeKey< T, X, Y > * getNodeInfo() const
Returns the identification number of a node.
void childCount(int count)
Sets the number of children of a node.
PQNode< T, X, Y > * m_leftEndmost
PQNode< T, X, Y > * parent(PQNode< T, X, Y > *newParent)
Sets the parent pointer of a node.
PQNode< T, X, Y > * m_parent
Is a pointer to the parent.
virtual PQInternalKey< T, X, Y > * getInternal() const =0
getInternal() returns a pointer to the PQInternalKey information of a node, in case that the node is ...
The class template PQInternalKey is a derived class of class template PQBasicKey. ...
PQNode< T, X, Y > * parent() const
The function parent() returns a pointer to the parent of a node.
The class template PQLeafKey is a derived class of class template PQBasicKey.
The class template PQBasicKey is an abstract base class.
int childCount() const
Returns the number of children of a node.
PQNode< T, X, Y > * m_sibRight
Stores a pointer ot the right sibling of PQNode.
PQNode< T, X, Y > * getEndmost(PQNode< T, X, Y > *other) const
Returns one of the endmost children of node, if node is a Q-node.
void setNodePointer(PQNode< T, X, Y > *pqNode)
The function setNodePointer() sets the private member m_nodePointer.
The namespace for all OGDF objects.
The class PQNodeRoot is used as a base class of the class PQNode.
void pertChildCount(int count)
Sets the number of pertinent children of a node.
PQNode< T, X, Y > * m_sibLeft
Stores a pointer ot the left sibling of PQNode.
PQNode< T, X, Y > * m_firstFull
Stores a pointer to the first full child of a Q-node.
bool changeEndmost(PQNode< T, X, Y > *oldEnd, PQNode< T, X, Y > *newEnd)
The function changeEndmost() replaces the old endmost child oldEnd of the node by a new child newEnd...
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Declaration of doubly linked lists and iterators.
virtual PQNodeType type() const =0
Returns the variable PQInternalNode::m_type in the derived class PQLeaf and PQInternalNode.