SDSL 3.0.3
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 (bit_vector const *v=nullptr) | |
rank_support_v (rank_support_v const &)=default | |
rank_support_v (rank_support_v &&)=default | |
rank_support_v & | operator= (rank_support_v const &)=default |
rank_support_v & | operator= (rank_support_v &&)=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, int_vector< 1 > 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_v const &other) const noexcept |
bool | operator!= (rank_support_v const &other) const noexcept |
void | set_vector (bit_vector const *v=nullptr) |
Sets the supported bit_vector to the given pointer. | |
![]() | |
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 | |
![]() | |
bit_vector const * | m_v |
Pointer to the rank supported bit_vector. | |
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 48 of file rank_support_v.hpp.
typedef bit_vector sdsl::rank_support_v< t_b, t_pat_len >::bit_vector_type |
Definition at line 56 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 57 of file rank_support_v.hpp.
anonymous enum |
Enumerator | |
---|---|
bit_pat |
Definition at line 58 of file rank_support_v.hpp.
anonymous enum |
Enumerator | |
---|---|
bit_pat_len |
Definition at line 62 of file rank_support_v.hpp.
|
inlineexplicit |
Definition at line 72 of file rank_support_v.hpp.
|
default |
|
default |
|
inline |
Definition at line 173 of file rank_support_v.hpp.
|
inline |
Definition at line 167 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 160 of file rank_support_v.hpp.
|
inlinenoexcept |
Definition at line 183 of file rank_support_v.hpp.
|
inlinevirtual |
|
default |
|
default |
|
inlinenoexcept |
Definition at line 178 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 129 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 151 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 188 of file rank_support_v.hpp.
|
inline |
Definition at line 146 of file rank_support_v.hpp.