File: expl-15.cpp

package info (click to toggle)
libsdsl 2.1.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 3,980 kB
  • sloc: cpp: 42,286; makefile: 1,171; ansic: 318; sh: 201; python: 27
file content (22 lines) | stat: -rw-r--r-- 534 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <sdsl/wavelet_trees.hpp>
#include <iostream>
#include <utility>

using namespace std;
using namespace sdsl;

template<class value_type, class size_type>
ostream& operator<<(ostream& os, const std::pair<value_type, size_type>& p)
{
    return os << "(" << p.first << "," << p.second << ")";
}

int main()
{
    wt_int<rrr_vector<63>> wt;
    construct_im(wt, "6   1000 1 4 7 3   18 6 3", 'd');
    auto res = wt.range_search_2d(1, 5, 4, 18);
    for (auto point : res.second)
        cout << point << " ";
    cout << endl;
}