-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathload_factor.cpp
More file actions
49 lines (39 loc) · 943 Bytes
/
load_factor.cpp
File metadata and controls
49 lines (39 loc) · 943 Bytes
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
#include "include/level_bin.h"
typedef aidel::LevelBinCon<int, int> levelbin_type;
int main(int argc, char **argv)
{
levelbin_type lb1;
bool f = true;
int i=0;
while(f){
f=lb1.con_insert(i, 0);
i++;
}
std::cout<<"seq: "<<i<<std::endl;
lb1.print(std::cout);
levelbin_type lb2;
f = true;
int n=200;
i=0;
while(f){
f=lb2.con_insert(n, 0);
n--;
i++;
}
std::cout<<"==========================="<<std::endl;
std::cout<<"reseq: "<<i<<std::endl;
lb2.print(std::cout);
levelbin_type lb3;
f = true;
i=0;
std::random_device rd;
std::mt19937 gen(rd());
std::uniform_int_distribution<> rand_uniform(0, 1000000);
while(f){
f=lb3.con_insert(rand_uniform(gen), 0);
i++;
}
std::cout<<"==========================="<<std::endl;
std::cout<<"random: "<<i<<std::endl;
lb3.print(std::cout);
}