Skip to content

Commit ac20212

Browse files
authored
Merge pull request #21 from ekg/wm_string
dynamic wavelet matrix
2 parents cd3d781 + 9d7cc28 commit ac20212

File tree

5 files changed

+638
-562
lines changed

5 files changed

+638
-562
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ CMakeLists.txt~
44
debug.cpp~
55
gap_bv_benchmark.txt
66
README.md~
7+
*~

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ add_executable(h0_lz77 h0_lz77.cpp)
5353
add_executable(rle_bwt rle_bwt.cpp)
5454
add_executable(cw-bwt cw-bwt.cpp)
5555
add_executable(benchmark benchmark.cpp)
56+
add_executable(wm_string wm_string.cpp)
5657

5758
add_dependencies(debug hopscotch_map)
5859
add_dependencies(rle_lz77_v1 hopscotch_map)
@@ -61,4 +62,5 @@ add_dependencies(h0_lz77 hopscotch_map)
6162
add_dependencies(rle_bwt hopscotch_map)
6263
add_dependencies(cw-bwt hopscotch_map)
6364
add_dependencies(benchmark hopscotch_map)
65+
add_dependencies(wm_string hopscotch_map)
6466

include/dynamic.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <internal/hacked_vector.hpp>
2424
#include <internal/lciv.hpp>
2525
#include <internal/wt_string.hpp>
26+
#include <internal/wm_string.hpp>
2627
#include <internal/fm_index.hpp>
2728

2829
namespace dyn{
@@ -57,6 +58,11 @@ typedef succinct_bitvector<spsi<packed_bit_vector,8192,16>> suc_bv;
5758
*/
5859
typedef wt_string<suc_bv> wt_str;
5960

61+
/*
62+
* succinct/compressed dynamic string implemented with a wavelet matrix.
63+
*/
64+
typedef wm_string<succinct_bitvector<spsi<packed_bit_vector,256,16>>> wm_str;
65+
6066
/*
6167
* run-length encoded (RLE) string. This string uses 1 sparse bitvector
6268
* for all runs, one dynamic string for run heads, and sigma sparse bitvectors (one per character)

0 commit comments

Comments
 (0)