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