forked from simongog/sdsl-lite
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexpl-14.cpp
More file actions
Latest commit
18 lines (16 loc) · 502 Bytes
/
Copy pathexpl-14.cpp
File metadata and controls
18 lines (16 loc) · 502 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include<sdsl/wavelet_trees.hpp>
#include<iostream>
usingnamespacestd;
usingnamespacesdsl;
intmain()
{
wt_hutu<rrr_vector<63>> wt;
construct_im(wt, "こんにちは世界", 1);
for (size_t i=0; i < wt.size(); ++i)
cout << wt[i];
cout << endl;
auto t1 = wt.lex_count(0, wt.size(), 0x80);
auto t2 = wt.lex_count(0, wt.size(), 0xbf);
cout << "# of bytes : " << wt.size() << endl;
cout << "# of UTF-8 symbols: " << get<1>(t1) + get<2>(t2) << endl;
}