forked from simongog/sdsl-lite
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexpl-13.cpp
More file actions
Latest commit
16 lines (14 loc) · 418 Bytes
/
Copy pathexpl-13.cpp
File metadata and controls
16 lines (14 loc) · 418 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include<sdsl/wavelet_trees.hpp>
#include<iostream>
usingnamespacestd;
usingnamespacesdsl;
intmain()
{
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;
}