Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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