Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::PQInternalKey< T, X, Y > Class Template Reference

The class template PQInternalKey is a derived class of class template PQBasicKey. More...

#include <ogdf/basic/pqtree/PQInternalKey.h>

+ Inheritance diagram for ogdf::PQInternalKey< T, X, Y >:

Public Member Functions

 PQInternalKey (Y element)
 
virtual ~PQInternalKey ()
 
virtual X userStructInfo ()
 Overloaded pure virtual function returning 0. More...
 
virtual Y userStructInternal ()
 Overloaded pure virtual function returning m_userStructInternal. More...
 
virtual T userStructKey ()
 Overloaded pure virtual function returning 0. More...
 
- Public Member Functions inherited from ogdf::PQBasicKey< T, X, Y >
 PQBasicKey ()
 Constructor. More...
 
PQNode< T, X, Y > * nodePointer ()
 The function nodePointer() returns a pointer to an element of type PQNode. More...
 
virtual std::ostream & print (std::ostream &os)
 The function print() is a virtual function, that can be overloaded by the user in order to print out the information stored at any of the derived classes. More...
 
void setNodePointer (PQNode< T, X, Y > *pqNode)
 The function setNodePointer() sets the private member m_nodePointer. More...
 
- Public Member Functions inherited from ogdf::PQBasicKeyRoot
 PQBasicKeyRoot ()
 
 ~PQBasicKeyRoot ()
 

Public Attributes

m_userStructInternal
 The class template PQInternalKey has only one public member: the m_userStructInternal that has to be overloaded by the client. More...
 

Detailed Description

template<class T, class X, class Y>
class ogdf::PQInternalKey< T, X, Y >

The class template PQInternalKey is a derived class of class template PQBasicKey.

PQInternalKey is a concrete class. It is constructed to store any kind of information of internal nodes of the PQ-tree. It may only be used for internal nodes as P- and Q-nodes. This information is not allowed to leaves.

The information is stored in m_userStructInternal and is assigned to a unique node in the PQ-tree. This unique node can be identified with the m_nodePointer of the astract base class PQBasicKey. The maintainance of this pointer is left to the user. By keeping the responsibillity by the user, nodes with certain informations can be identified and accessed by him in constant time. This makes the adaption of algorithms fast and easy.

Definition at line 58 of file PQInternalKey.h.

Constructor & Destructor Documentation

◆ PQInternalKey()

template<class T , class X , class Y >
ogdf::PQInternalKey< T, X, Y >::PQInternalKey ( element)
inlineexplicit

Definition at line 70 of file PQInternalKey.h.

◆ ~PQInternalKey()

template<class T , class X , class Y >
virtual ogdf::PQInternalKey< T, X, Y >::~PQInternalKey ( )
inlinevirtual

Definition at line 73 of file PQInternalKey.h.

Member Function Documentation

◆ userStructInfo()

template<class T , class X , class Y >
virtual X ogdf::PQInternalKey< T, X, Y >::userStructInfo ( )
inlinevirtual

Overloaded pure virtual function returning 0.

Implements ogdf::PQBasicKey< T, X, Y >.

Definition at line 79 of file PQInternalKey.h.

◆ userStructInternal()

template<class T , class X , class Y >
virtual Y ogdf::PQInternalKey< T, X, Y >::userStructInternal ( )
inlinevirtual

Overloaded pure virtual function returning m_userStructInternal.

Implements ogdf::PQBasicKey< T, X, Y >.

Definition at line 82 of file PQInternalKey.h.

◆ userStructKey()

template<class T , class X , class Y >
virtual T ogdf::PQInternalKey< T, X, Y >::userStructKey ( )
inlinevirtual

Overloaded pure virtual function returning 0.

Implements ogdf::PQBasicKey< T, X, Y >.

Definition at line 76 of file PQInternalKey.h.

Member Data Documentation

◆ m_userStructInternal

template<class T , class X , class Y >
Y ogdf::PQInternalKey< T, X, Y >::m_userStructInternal

The class template PQInternalKey has only one public member: the m_userStructInternal that has to be overloaded by the client.

This element is kept public, since the user has to have the opportunity to manipulate the information that was stored by his algorithm at a node.

Definition at line 67 of file PQInternalKey.h.


The documentation for this class was generated from the following file: