SDSL
3.0.0
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 |
![]() | |
typedef bit_vector::size_type | size_type |
Public Member Functions | |
rank_support_v5 (const bit_vector *v=nullptr) | |
rank_support_v5 (const rank_support_v5 &)=default | |
rank_support_v5 (rank_support_v5 &&)=default | |
rank_support_v5 & | operator= (const rank_support_v5 &)=default |
rank_support_v5 & | operator= (rank_support_v5 &&)=default |
size_type | rank (size_type idx) const |
Answers rank queries for the supported bit_vector. More... | |
size_type | operator() (size_type idx) const |
Alias for rank(i) More... | |
size_type | size () const |
size_type | serialize (std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const |
Serializes rank_support. More... | |
void | load (std::istream &in, const bit_vector *v=nullptr) |
Loads the rank_support. More... | |
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== (const rank_support_v5 &other) const noexcept |
bool | operator!= (const rank_support_v5 &other) const noexcept |
void | set_vector (const bit_vector *v=nullptr) |
Sets the supported bit_vector to the given pointer. More... | |
![]() | |
rank_support (const bit_vector *v=nullptr) | |
Constructor. More... | |
rank_support (const rank_support &)=default | |
Copy constructor. More... | |
rank_support (rank_support &&)=default | |
rank_support & | operator= (const rank_support &)=default |
rank_support & | operator= (rank_support &&)=default |
virtual | ~rank_support () |
Destructor. More... | |
Additional Inherited Members | |
![]() | |
const bit_vector * | m_v |
Pointer to the rank supported bit_vector. More... | |
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 38 of file rank_support_v5.hpp.
typedef bit_vector sdsl::rank_support_v5< t_b, t_pat_len >::bit_vector_type |
Definition at line 46 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 47 of file rank_support_v5.hpp.
anonymous enum |
Enumerator | |
---|---|
bit_pat |
Definition at line 48 of file rank_support_v5.hpp.
anonymous enum |
Enumerator | |
---|---|
bit_pat_len |
Definition at line 52 of file rank_support_v5.hpp.
|
inlineexplicit |
Definition at line 62 of file rank_support_v5.hpp.
|
default |
|
default |
|
inline |
Definition at line 163 of file rank_support_v5.hpp.
|
inline |
Definition at line 157 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 150 of file rank_support_v5.hpp.
|
inlinenoexcept |
Definition at line 170 of file rank_support_v5.hpp.
|
inlinevirtual |
Alias for rank(i)
Implements sdsl::rank_support.
Definition at line 138 of file rank_support_v5.hpp.
|
default |
|
default |
|
inlinenoexcept |
Definition at line 168 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 118 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 141 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 172 of file rank_support_v5.hpp.
|
inline |
Definition at line 139 of file rank_support_v5.hpp.