SDSL
3.0.0
Succinct Data Structure Library
|
A rank structure proposed by Sebastiano Vigna. More...
#include <rank_support_v.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_v (const bit_vector *v=nullptr) | |
rank_support_v (const rank_support_v &)=default | |
rank_support_v (rank_support_v &&)=default | |
rank_support_v & | operator= (const rank_support_v &)=default |
rank_support_v & | operator= (rank_support_v &&)=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 int_vector< 1 > *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_v &other) const noexcept |
bool | operator!= (const rank_support_v &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 rank structure proposed by Sebastiano Vigna.
The superblock size is 512. Each superblock is subdivided into 512/64 = 8 blocks. So absolute counts for the superblock add 64/512 bits on top of each supported bit. Since the first of the 8 relative count values is 0, we can fit the remaining 7 (each of width log(512)=9) in a 64bit word. The relative counts add another 64/512 bits on top of each supported bit. In total this results in 128/512=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 39 of file rank_support_v.hpp.
typedef bit_vector sdsl::rank_support_v< t_b, t_pat_len >::bit_vector_type |
Definition at line 47 of file rank_support_v.hpp.
typedef rank_support_trait<t_b, t_pat_len> sdsl::rank_support_v< t_b, t_pat_len >::trait_type |
Definition at line 48 of file rank_support_v.hpp.
anonymous enum |
Enumerator | |
---|---|
bit_pat |
Definition at line 49 of file rank_support_v.hpp.
anonymous enum |
Enumerator | |
---|---|
bit_pat_len |
Definition at line 53 of file rank_support_v.hpp.
|
inlineexplicit |
Definition at line 63 of file rank_support_v.hpp.
|
default |
|
default |
|
inline |
Definition at line 154 of file rank_support_v.hpp.
|
inline |
Definition at line 148 of file rank_support_v.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 141 of file rank_support_v.hpp.
|
inlinenoexcept |
Definition at line 161 of file rank_support_v.hpp.
|
inlinevirtual |
|
default |
|
default |
|
inlinenoexcept |
Definition at line 159 of file rank_support_v.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 116 of file rank_support_v.hpp.
|
inlinevirtual |
Serializes rank_support.
out | Out-Stream to serialize the data to. |
Implements sdsl::rank_support.
Definition at line 132 of file rank_support_v.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 163 of file rank_support_v.hpp.
|
inline |
Definition at line 130 of file rank_support_v.hpp.