SDSL 3.0.3
Succinct Data Structure Library
|
A class supporting rank queries in constant time. More...
#include <rank_support_v5.hpp>
Public Types | |
enum | { bit_pat = t_b } |
enum | { bit_pat_len = t_pat_len } |
typedef bit_vector | bit_vector_type |
typedef rank_support_trait< t_b, t_pat_len > | trait_type |
Public Types inherited from sdsl::rank_support | |
typedef bit_vector::size_type | size_type |
Public Member Functions | |
rank_support_v5 (bit_vector const *v=nullptr) | |
rank_support_v5 (rank_support_v5 const &)=default | |
rank_support_v5 (rank_support_v5 &&)=default | |
rank_support_v5 & | operator= (rank_support_v5 const &)=default |
rank_support_v5 & | operator= (rank_support_v5 &&)=default |
size_type | rank (size_type idx) const |
Answers rank queries for the supported bit_vector. | |
size_type | operator() (size_type idx) const |
Alias for rank(i) | |
size_type | size () const |
size_type | serialize (std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const |
Serializes rank_support. | |
void | load (std::istream &in, bit_vector const *v=nullptr) |
Loads the rank_support. | |
template<typename archive_t> | |
void | CEREAL_SAVE_FUNCTION_NAME (archive_t &ar) const |
template<typename archive_t> | |
void | CEREAL_LOAD_FUNCTION_NAME (archive_t &ar) |
bool | operator== (rank_support_v5 const &other) const noexcept |
bool | operator!= (rank_support_v5 const &other) const noexcept |
void | set_vector (bit_vector const *v=nullptr) |
Sets the supported bit_vector to the given pointer. | |
Public Member Functions inherited from sdsl::rank_support | |
rank_support (bit_vector const *v=nullptr) | |
Constructor. | |
rank_support (rank_support const &)=default | |
Copy constructor. | |
rank_support (rank_support &&)=default | |
rank_support & | operator= (rank_support const &)=default |
rank_support & | operator= (rank_support &&)=default |
virtual | ~rank_support () |
Destructor. |
Additional Inherited Members | |
Protected Attributes inherited from sdsl::rank_support | |
bit_vector const * | m_v |
Pointer to the rank supported bit_vector. |
A class supporting rank queries in constant time.
The superblock size is 2048. Each superblock is subdivided into 2048/(6*64) = 5 blocks (with some bit remaining). So absolute counts for the superblock add 64/2048 bits on top of each supported bit. Since the first of the 6 relative count values is 0, we can fit the remaining 5 (each of width log(2048)=11) in a 64 bit word. The relative counts add another 64/2048 bits bits on top of each supported bit. In total this results in 128/2048= 6.25% overhead.
t_b | Bit pattern 0,1,10,01 which should be ranked. |
t_pat_len | Length of the bit pattern. |
Definition at line 44 of file rank_support_v5.hpp.
typedef bit_vector sdsl::rank_support_v5< t_b, t_pat_len >::bit_vector_type |
Definition at line 52 of file rank_support_v5.hpp.
typedef rank_support_trait<t_b, t_pat_len> sdsl::rank_support_v5< t_b, t_pat_len >::trait_type |
Definition at line 53 of file rank_support_v5.hpp.
anonymous enum |
Enumerator | |
---|---|
bit_pat_len |
Definition at line 58 of file rank_support_v5.hpp.
anonymous enum |
Enumerator | |
---|---|
bit_pat |
Definition at line 54 of file rank_support_v5.hpp.
|
inlineexplicit |
Definition at line 68 of file rank_support_v5.hpp.
|
default |
|
default |
|
inline |
Definition at line 182 of file rank_support_v5.hpp.
|
inline |
Definition at line 176 of file rank_support_v5.hpp.
|
inlinevirtual |
Loads the rank_support.
in | In-Stream to load the rank_support data from. |
v | The supported bit_vector. |
Implements sdsl::rank_support.
Definition at line 169 of file rank_support_v5.hpp.
|
inlinenoexcept |
Definition at line 192 of file rank_support_v5.hpp.
|
inlinevirtual |
Alias for rank(i)
Implements sdsl::rank_support.
Definition at line 151 of file rank_support_v5.hpp.
|
default |
|
default |
|
inlinenoexcept |
Definition at line 187 of file rank_support_v5.hpp.
|
inlinevirtual |
Answers rank queries for the supported bit_vector.
i | Argument for the length of the prefix v[0..i-1]. |
Implements sdsl::rank_support.
Definition at line 131 of file rank_support_v5.hpp.
|
inlinevirtual |
Serializes rank_support.
out | Out-Stream to serialize the data to. |
Implements sdsl::rank_support.
Definition at line 160 of file rank_support_v5.hpp.
|
inlinevirtual |
Sets the supported bit_vector to the given pointer.
v | The new bit_vector to support. |
Implements sdsl::rank_support.
Definition at line 197 of file rank_support_v5.hpp.
|
inline |
Definition at line 155 of file rank_support_v5.hpp.