8#ifndef INCLUDED_SDSL_CONSTRUCT_BWT
9#define INCLUDED_SDSL_CONSTRUCT_BWT
37template <u
int8_t t_w
idth>
40 static_assert(t_width == 0 or t_width == 8,
41 "construct_bwt: width must be `0` for integer alphabet and `8` for byte alphabet");
50 uint8_t bwt_width = text.
width();
53 auto gen_bwt = [&n](
auto & bwt,
auto & text,
auto & sa)
58 bwt[i] = text[sa[i] + to_add[sa[i] == 0]];
66 gen_bwt(bwt, text, sa);
75 gen_bwt(bwt, text, sa_buf);
A generic vector class for integers of width .
static int_vector_mapper< t_width > create(std::string const &key, cache_config &config)
int_vector.hpp contains the sdsl::int_vector class.
int_vector_buffer.hpp contains the sdsl::int_vector_buffer class.
io.hpp contains some methods for reading/writing sdsl structures.
Namespace for the succinct data structure library.
char const * key_bwt_trait_impl< 0, T >::KEY_BWT
std::string cache_file_name(std::string const &key, cache_config const &config)
Returns the file name of the resource.
char const * key_text_trait_impl< 0, T >::KEY_TEXT
void register_cache_file(std::string const &key, cache_config &config)
Register the existing resource specified by the key to the cache.
bool is_ram_file(std::string const &file)
Determines if the given file is a RAM-file.
void construct_bwt(cache_config &config)
Constructs the Burrows and Wheeler Transform (BWT) from text over byte- or integer-alphabet and suffi...
int_vector_mapper< t_width, std::ios_base::in > const read_only_mapper
Helper class for construction process.
static char const * KEY_BWT
static char const * KEY_TEXT