|
SDSL 3.0.1
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 (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. | |
| 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, const bit_vector *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== (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. | |
Public Member Functions inherited from sdsl::rank_support | |
| rank_support (const bit_vector *v=nullptr) | |
| Constructor. | |
| rank_support (const rank_support &)=default | |
| Copy constructor. | |
| rank_support (rank_support &&)=default | |
| rank_support & | operator= (const rank_support &)=default |
| rank_support & | operator= (rank_support &&)=default |
| virtual | ~rank_support () |
| Destructor. | |
| virtual size_type | rank (size_type i) const =0 |
| Answers rank queries for the supported bit_vector. | |
| virtual size_type | operator() (size_type idx) const =0 |
| Alias for rank(i) | |
| virtual size_type | serialize (std::ostream &out, structure_tree_node *v, std::string name) const =0 |
| Serializes rank_support. | |
| virtual void | load (std::istream &in, const bit_vector *v=nullptr)=0 |
| Loads the rank_support. | |
| virtual void | set_vector (const bit_vector *v=nullptr)=0 |
| Sets the supported bit_vector to the given pointer. | |
Additional Inherited Members | |
Protected Attributes inherited from sdsl::rank_support | |
| const bit_vector * | 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 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.