File: expl-13.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 (16 lines) | stat: -rw-r--r-- 418 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <sdsl/wavelet_trees.hpp>
#include <iostream>

using namespace std;
using namespace sdsl;

int main()
{
    wt_blcd<> wt;
    construct(wt, "expl-13.cpp", 1);
    for (size_t i=0; i < wt.size() and wt[i]!='\n'; ++i)
        cout << wt[i];
    cout << endl;
    cout << "number of lines  : " << wt.rank(wt.size(), '\n') << endl;
    cout << "first '=' in line: " << wt.rank(wt.select(1, '='),'\n')+1 << endl;
}