File: expl-11.cpp

package info (click to toggle)
seqan3 3.0.2%2Bds-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 16,052 kB
  • sloc: cpp: 144,641; makefile: 1,288; ansic: 294; sh: 228; xml: 217; javascript: 50; python: 27; php: 25
file content (16 lines) | stat: -rw-r--r-- 345 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>
#include <sdsl/bit_vectors.hpp>

using namespace std;
using namespace sdsl;

int main()
{
    bit_vector b = {0,1,0,1,1,1,0,0,0,1,1};
    size_t cnt10 = rank_support_v<10,2>(&b)(b.size());
    select_support_mcl<10,2> b_sel10(&b);

    for (size_t i=1; i <= cnt10; ++i)
        cout << b_sel10(i) << " ";
    cout << endl;
}