Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

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