Skip to content

Commit 49f5565

Browse files
committed
Merge pull request #111 from simongog/tutorial
Tutorial
2 parents 0b23e5c + dc1fb5a commit 49f5565

File tree

14 files changed

+76
-21
lines changed

14 files changed

+76
-21
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ What is it?
66

77
The Succinct Data Structure Library (SDSL) is a powerful and flexible C++11
88
library implementing succinct data structures. In total, the library contains
9-
the highlights of 40 [research publications](https://github.com/simongog/sdsl-lite/wiki/Literature).
10-
Succinct data structures
9+
the highlights of 40 [research publications][SDSLLIT] Succinct data structures
1110
can represent an object (such as a bitvector or a tree) in space close the
1211
information-theoretic lower bound of the object while supporting operations
1312
of the original object efficiently. The theoretical time complexity of an
@@ -51,7 +50,7 @@ data structure to their full potential.
5150
features provided by the library.
5251
* All data structures are tested for correctness using a unit-testing framework.
5352
* We provide a large collection of supporting documentation consisting of examples,
54-
[cheat sheet][SDSLCS], tutorial slides and walk-through.
53+
[cheat sheet][SDSLCS], [tutorial slides and walk-through][TUT].
5554

5655
The library contains many succinct data structures from the following categories:
5756

@@ -145,7 +144,7 @@ To compile the program using `g++` run:
145144
g++ -std=c++11 -O3 -I ~/include -L ~/lib program.cpp -o lsdsl
146145
```
147146

148-
Next we suggest you look at the comprehensive [tutorial][TUT] of Simon Gog which describes
147+
Next we suggest you look at the comprehensive [tutorial][TUT] which describes
149148
all major features of the library or look at some of the provided [examples](examples).
150149

151150
Test
@@ -203,7 +202,9 @@ more information see the COPYING file in the library directory.
203202
Lots of time was spent implementing the many features of the library. If you
204203
use the library in an academic setting please cite the following paper:
205204

206-
_Simon Gog, Matthias Petri: Optimized Succinct Data Structures for Massive Data, Accepted for publication in Software, Practice and Experience_.
205+
Simon Gog, Matthias Petri:
206+
[Optimized Succinct Data Structures for Massive Data][SPE],
207+
Accepted for publication in Software, Practice and Experience.
207208

208209
## External Resources used in SDSL
209210

@@ -212,7 +213,7 @@ construction algorithms.
212213

213214
* Yuta Mori's incredible fast suffix [libdivsufsort][DIVSUF]
214215
algorithm (version 2.0.1) for byte-alphabets.
215-
* An adapted version of Jesper Larsson's implementation of the
216+
* An adapted version of Jesper Larsson's [implementation][QSUFIMPL] of the
216217
algorithm of [Larson and Sadakane][LS] for integer-alphabets.
217218

218219
Additionally, we use the [googletest][GTEST] framework to provide unit tests.
@@ -252,3 +253,6 @@ Feel free to contact any of the authors or create an issue on the
252253
[LS]: http://www.sciencedirect.com/science/article/pii/S0304397507005257 "Larson & Sadakane Algorithm"
253254
[GTEST]: https://code.google.com/p/googletest/ "Google C++ Testing Framework"
254255
[SDSLCS]: http://simongog.github.io/assets/data/sdsl-cheatsheet.pdf "SDSL Cheat Sheet"
256+
[SDSLLIT]: https://github.com/simongog/sdsl-lite/wiki/Literature "Succinct Data Structure Literature"
257+
[TUT]: http://simongog.github.io/assets/data/sdsl-slides/tutorial "Tutorial"
258+
[QSUFIMPL]: http://www.larsson.dogma.net/qsufsort.c "Original Qsufsort Implementation"

include/sdsl/enc_vector.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct enc_vector_trait<64> {
5656
* @ingroup int_vector
5757
*/
5858
template<class t_coder=coder::elias_delta,
59-
uint32_t t_dens = 8, uint8_t t_width=0>
59+
uint32_t t_dens = 128, uint8_t t_width=0>
6060
class enc_vector
6161
{
6262
private:

include/sdsl/rrr_vector.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class select_support_rrr; // in rrr_vector
6969
* In this version the block size can be adjust by the template parameter t_bs!
7070
* \sa sdsl::rrr_vector for a specialized version for block_size=15
7171
*/
72-
template<uint16_t t_bs=15, class t_rac=int_vector<>, uint16_t t_k=32>
72+
template<uint16_t t_bs=63, class t_rac=int_vector<>, uint16_t t_k=32>
7373
class rrr_vector
7474
{
7575
static_assert(t_bs >= 3 and t_bs <= 256 , "rrr_vector: block size t_bs must be 3 <= t_bs <= 256.");

include/sdsl/vlc_vector.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ struct vlc_vector_trait<32> {
4343
/*! The values of a vlc_vector are immutable after the constructor call. The class
4444
* could be parametrized with a self-delimiting code t_coder and the sample density.
4545
* \tparam t_coder Type of self-delimiting coder.
46-
* \tparam t_dens Sampling density of stored absolute values.
47-
* \tparam t_width Width of the underlying int_vector for the absolute samples.
46+
* \tparam t_dens Sampling density of pointers into the stream of self-delimiting coded numbers.
47+
* \tparam t_width Width of the underlying int_vector for the pointers.
4848
*/
4949
template<class t_coder = coder::elias_delta,
50-
uint32_t t_dens = 16,
50+
uint32_t t_dens = 128,
5151
uint8_t t_width = 0>
5252
class vlc_vector
5353
{

tutorial/expl-02.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ using namespace sdsl;
66

77
int main()
88
{
9-
int_vector<> v(10000000);
9+
int_vector<> v(10*(1<<20));
1010
for (size_t i=0; i<10; ++i)
11-
for (size_t j=0; j<1000000; ++j)
12-
v[i*1000000+j] = j;
11+
for (size_t j=0; j < 1U<<20; ++j)
12+
v[i*(1<<20)+j] = j;
1313
cout << size_in_mega_bytes(v) << endl;
1414
util::bit_compress(v);
1515
cout << size_in_mega_bytes(v) << endl;

tutorial/expl-03.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ using namespace sdsl;
66

77
int main()
88
{
9-
int_vector<> v(10000000, 3);
9+
int_vector<> v(10*(1<<20), 0);
1010
v[0] = 1ULL<<63;
1111
util::bit_compress(v);
1212
cout << size_in_mega_bytes(v) << endl;

tutorial/expl-04.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ int main()
88
{
99
bit_vector b = {1,1,0,1,0,0,1};
1010
cout << b << endl;
11-
b = bit_vector(80000000, 0);
11+
b = bit_vector(80*(1<<20), 0);
1212
for (size_t i=0; i < b.size(); i+=100)
1313
b[i] = 1;
1414
cout << size_in_mega_bytes(b) << endl;

tutorial/expl-05.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ using namespace sdsl;
66

77
int main()
88
{
9-
bit_vector b = bit_vector(80000000, 0);
9+
bit_vector b = bit_vector(80*(1<<20), 0);
1010
for (size_t i=0; i < b.size(); i+=100)
1111
b[i] = 1;
1212
cout << size_in_mega_bytes(b) << endl;

tutorial/expl-06.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ using namespace sdsl;
66

77
int main()
88
{
9-
bit_vector b = bit_vector(80000000, 0);
9+
bit_vector b = bit_vector(80*(1<<20), 0);
1010
for (size_t i=0; i < b.size(); i+=100)
1111
b[i] = 1;
1212
sd_vector<> sdb(b);

tutorial/expl-14.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using namespace sdsl;
77
int main()
88
{
99
wt_hutu<rrr_vector<63>> wt;
10-
construct_im(wt, "ハローワールド!", 1);
10+
construct_im(wt, "こんにちは世界", 1);
1111
for (size_t i=0; i < wt.size(); ++i)
1212
cout << wt[i];
1313
cout << endl;

0 commit comments

Comments
 (0)