forked from simongog/sdsl-lite
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexpl-09.cpp
More file actions
Latest commit
17 lines (15 loc) · 431 Bytes
/
Copy pathexpl-09.cpp
File metadata and controls
17 lines (15 loc) · 431 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include<iostream>
#include<sdsl/bit_vectors.hpp>
usingnamespacestd;
usingnamespacesdsl;
intmain()
{
bit_vector b = {0,1,0,1};
rank_support_v<1> b_r1(&b);
rank_support_v<0> b_r0(&b);
rank_support_v<10,2> b_r10(&b);
rank_support_v<01,2> b_r01(&b);
for (size_t i=0; i<=b.size(); ++i)
cout << i << ": "<< b_r1(i) << "" << b_r0(i)
<< "" << b_r10(i) << "" << b_r01(i) << endl;
}