forked from simongog/sdsl-lite
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexpl-24.cpp
More file actions
Latest commit
17 lines (15 loc) · 501 Bytes
/
Copy pathexpl-24.cpp
File metadata and controls
17 lines (15 loc) · 501 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include<sdsl/bp_support.hpp>
#include<iostream>
usingnamespacestd;
usingnamespacesdsl;
intmain()
{
// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
// ( ( ( ) ( ) ) ( ) ( ( ( ) ( ) ) ( ) ) )
bit_vector b = {1,1,1,0,1,0,0,1,0,1,1,1,0,1,0,0,1,0,0,0};
bp_support_sada<> bps(&b); // <- pointer to b
cout << bps.find_close(0) << ", "
<< bps.find_open(3) << ", "
<< bps.enclose(4) << ", "
<< bps.double_enclose(13, 16) << endl;
}