blob: 578d3e6a5ef6b04c3f65eddfbd1494ef399641a4 (
plain)
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
|
#ifndef _VEB_TREE_H_
#define _VEB_TREE_H_
#include <memory>
#include <vector>
using namespace std;
#include "veb.h"
class VEBTree: public VEB {
public:
VEBTree(int size);
void Insert(int value);
int GetSuccessor(int value);
private:
int GetNextValue(int value);
int GetCluster(int value);
int Compose(int cluster, int value);
int lower_bits, upper_size;
shared_ptr<VEB> summary;
vector<shared_ptr<VEB> > clusters;
};
#endif
|