SDSL 3.0.3
Succinct Data Structure Library
|
A wavelet tree class for integer sequences. More...
#include <wt_ap.hpp>
Public Types | |
enum | { lex_ordered = 0 } |
typedef int_vector ::size_type | size_type |
typedef int_vector ::value_type | value_type |
typedef int_vector ::difference_type | difference_type |
typedef random_access_const_iterator< wt_ap > | const_iterator |
typedef const_iterator | iterator |
typedef t_wt_byte | wt_byte_type |
typedef t_wt_int | wt_int_type |
typedef wt_tag | index_category |
typedef int_alphabet_tag | alphabet_category |
Public Member Functions | |
wt_ap () | |
Default constructor. | |
template<typename t_it > | |
wt_ap (t_it begin, t_it end, std::string tmp_dir=ram_file_name("")) | |
Construct the wavelet tree from a sequence defined by two interators. | |
wt_ap (wt_ap const &wt) | |
Copy constructor. | |
wt_ap (wt_ap &&wt) | |
Move copy constructor. | |
wt_ap & | operator= (wt_ap const &wt) |
Assignment operator. | |
wt_ap & | operator= (wt_ap &&wt) |
Assignment move operator. | |
size_type | size () const |
Returns the size of the original vector. | |
bool | empty () const |
Returns whether the wavelet tree contains no data. | |
value_type | operator[] (size_type i) const |
Recovers the i-th symbol of the original vector. | |
size_type | rank (size_type i, value_type c) const |
Calculates how many symbols c are in the prefix [0..i-1] of the supported vector. | |
std::pair< size_type, value_type > | inverse_select (size_type i) const |
Calculates how many occurrences of symbol wt[i] are in the prefix [0..i-1] of the original sequence. | |
size_type | select (size_type i, value_type c) const |
Calculates the i-th occurrence of the symbol c in the supported vector. | |
size_type | serialize (std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const |
Serializes the data structure into the given ostream. | |
void | load (std::istream &in) |
Loads the data structure from the given istream. | |
template<typename archive_t > | |
void | CEREAL_SAVE_FUNCTION_NAME (archive_t &ar) const |
Serialise (save) via cereal. | |
template<typename archive_t > | |
void | CEREAL_LOAD_FUNCTION_NAME (archive_t &ar) |
Load via cereal. | |
iterator | begin () |
const_iterator | end () |
iterator | begin () const |
const_iterator | end () const |
bool | operator== (wt_ap const &other) const noexcept |
Equality operator. | |
bool | operator!= (wt_ap const &other) const noexcept |
Inequality operator. | |
Public Attributes | |
size_type const & | sigma = m_sigma |
Protected Attributes | |
size_type | m_size = 0 |
value_type | m_sigma = 0 |
value_type | m_singleton_class_cnt = 0 |
value_type | m_class_cnt = 0 |
wt_byte_type | m_char2class |
wt_byte_type | m_class |
std::vector< wt_int_type > | m_offset |
A wavelet tree class for integer sequences.
t_wt_byte | Type of the wavelet tree used for class representation. |
t_wt_int | Type of the wavelet tree used for class offset representation. |
int_alphabet_tag sdsl::wt_ap< t_wt_byte, t_wt_int >::alphabet_category |
random_access_const_iterator<wt_ap> sdsl::wt_ap< t_wt_byte, t_wt_int >::const_iterator |
int_vector ::difference_type sdsl::wt_ap< t_wt_byte, t_wt_int >::difference_type |
wt_tag sdsl::wt_ap< t_wt_byte, t_wt_int >::index_category |
const_iterator sdsl::wt_ap< t_wt_byte, t_wt_int >::iterator |
int_vector ::size_type sdsl::wt_ap< t_wt_byte, t_wt_int >::size_type |
int_vector ::value_type sdsl::wt_ap< t_wt_byte, t_wt_int >::value_type |
t_wt_byte sdsl::wt_ap< t_wt_byte, t_wt_int >::wt_byte_type |
t_wt_int sdsl::wt_ap< t_wt_byte, t_wt_int >::wt_int_type |
anonymous enum |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
Calculates how many symbols c are in the prefix [0..i-1] of the supported vector.
i | The exclusive index of the prefix range [0..i-1], so ![]() |
c | The symbol to count the occurrences in the prefix. |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
size_type const& sdsl::wt_ap< t_wt_byte, t_wt_int >::sigma = m_sigma |