Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

whaInfo.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 namespace ogdf {
37 
48 enum class whaType { W, B, H, A };
49 
50 class whaInfo {
51  template<class T, class Y>
52  friend class MaxSequencePQTree;
53 
54 public:
55  //The deleteType is set to type b (= keep all leaves in the frontier).
56  whaInfo() {
57  m_a = 0;
58  m_h = 0;
59  m_w = 0;
61  m_pertLeafCount = 0;
63  m_aChild = nullptr;
64  m_hChild1 = nullptr;
65  m_hChild2 = nullptr;
66  m_hChild2Sib = nullptr;
67  }
68 
69  ~whaInfo() { }
70 
71  void defaultValues() {
72  m_a = 0;
73  m_h = 0;
74  m_w = 0;
76  m_pertLeafCount = 0;
78  }
79 
80 private:
81  // number of pertinent leaves in the frontier of the node respectively the
82  // number of leaves that have to be deleted in the frontier of the node to
83  // make it an empty node.
84  int m_h;
85 
86  // number of pertinent leaves in the frontier of the node that have to be
87  // deleted in order to create a node of type h, that is a node, where a
88  // permutation of the leaves of the node exist such that the remaining
89  // pertinent leaves form a consecutive sequence on one end of the permutation.
90  int m_w;
91 
92  // number of pertinent leaves in the frontier of the node that have to be
93  // deleted in order to create a node of type $a$, that is a node, where a
94  // permutation of the leaves of the node exist such that the remaining
95  // pertinent leaves form a consecutive somewhere within the permutation.
96  int m_a;
97 
98  // deleteType is type of the node being either
99  // W, B, H or A.
101 
102  //the number of pertinent leaves in the frontier of a node.
104 
105  //counts the number of pertinent children, that have not been
106  // processed yet during the computation of the w,h,a-numbering.
108 
109  // a pointer to the child of node that has to be of type a if the
110  // node itself has been determined to be of type a.
112 
113  // a pointer to the child of node that has to be of type h if the
114  // node itself has been determined to be of type h.
116 
117  // a pointer to the child of node that has to be of type h if the
118  // node itself has been determined to be of type a and m_aChild does
119  // contain the empty pointer.
121 
122 
123  // m_hChild2Sib is a pointer to the pertinent sibling of m_hChild2. This
124  // pointer is necessary if the sequence of pertinent children is not unique.
126 
128 };
129 
130 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::whaInfo::m_notVisitedCount
int m_notVisitedCount
Definition: whaInfo.h:107
ogdf::whaInfo::m_a
int m_a
Definition: whaInfo.h:96
ogdf::whaInfo::m_hChild1
PQNodeRoot * m_hChild1
Definition: whaInfo.h:115
ogdf::whaType::A
@ A
ogdf::whaInfo::m_w
int m_w
Definition: whaInfo.h:90
ogdf::whaInfo::m_h
int m_h
Definition: whaInfo.h:84
PQNodeRoot.h
Declaration and implementation of the class PQNodeRoot.
ogdf::whaInfo::defaultValues
void defaultValues()
Definition: whaInfo.h:71
OGDF_NEW_DELETE
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
Definition: memory.h:84
ogdf::whaType::H
@ H
ogdf::whaType::B
@ B
ogdf::whaType
whaType
The definitions for W, B, H and A describe the type of a node during the computation of the maximal p...
Definition: whaInfo.h:48
ogdf::whaInfo::whaInfo
whaInfo()
Definition: whaInfo.h:56
ogdf::whaInfo::m_aChild
PQNodeRoot * m_aChild
Definition: whaInfo.h:111
ogdf::MaxSequencePQTree
The class template MaxSequencePQTree is designed to compute a maximal consecutive sequence of pertine...
Definition: MaxSequencePQTree.h:97
ogdf::whaType::W
@ W
ogdf::whaInfo::~whaInfo
~whaInfo()
Definition: whaInfo.h:69
ogdf::whaInfo::m_hChild2
PQNodeRoot * m_hChild2
Definition: whaInfo.h:120
ogdf::whaInfo::m_pertLeafCount
int m_pertLeafCount
Definition: whaInfo.h:103
ogdf::whaInfo::m_hChild2Sib
PQNodeRoot * m_hChild2Sib
Definition: whaInfo.h:125
ogdf::whaInfo::m_deleteType
whaType m_deleteType
Definition: whaInfo.h:100
ogdf::whaInfo
Definition: whaInfo.h:50
ogdf::PQNodeRoot
The class PQNodeRoot is used as a base class of the class PQNode.
Definition: PQNodeRoot.h:44