-
Notifications
You must be signed in to change notification settings - Fork 0
/
MMHeap.h
66 lines (56 loc) · 987 Bytes
/
MMHeap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef C_H
#define C_H
#include <cstddef>
#include <iostream>
#include <math.h>
template <typename T>
class C {
private:
T **d;
size_t e = 0;
unsigned int f = 1;
unsigned int g = 1;
public:
C();
C(const int&);
~C();
void h(T*);
void i();
void j();
void k();
void l(int);
void m(int);
int n(int);
T* o();
T* p();
T q();
T r();
size_t s() const { return e; }
};
#endif
template <class T>
C<T>::C() : d(nullptr), e(0) {}
template <class T>
C<T>::C(const int &init) : e(0) {
d = new T*[init];
}
template<class T>
C<T>::~C() {
for(unsigned int i = 1; i <= s(); i++) {
delete d[i];
}
delete d;
}
template <class T>
T* C<T>::o() {
return d[f];
}
template <class T>
T* C<T>::p() {
return d[g];
}
template <class T>
int C<T>::n(int x) {
return floor(log2(x)) + 1;
}
// Other functions obfuscated similarly.