SDSL 3.0.1
Succinct Data Structure Library
|
Nearest neighbour dictionary for sparse uniform sets (described in Geary et al., A Simple Optimal Representation for Balanced Parentheses, CPM 2004). More...
#include <nearest_neighbour_dictionary.hpp>
Public Types | |
typedef bit_vector::size_type | size_type |
Public Member Functions | |
nearest_neighbour_dictionary () | |
Default constructor. More... | |
nearest_neighbour_dictionary (const bit_vector &v) | |
Constructor. More... | |
nearest_neighbour_dictionary (const nearest_neighbour_dictionary &nnd) | |
Copy constructor. More... | |
nearest_neighbour_dictionary (nearest_neighbour_dictionary &&nnd) | |
Move constructor. More... | |
~nearest_neighbour_dictionary () | |
Destructor. More... | |
nearest_neighbour_dictionary & | operator= (const nearest_neighbour_dictionary &nnd) |
nearest_neighbour_dictionary & | operator= (nearest_neighbour_dictionary &&nnd) |
size_type | rank (size_type idx) const |
Answers rank queries for the supported bit_vector. More... | |
size_type | select (size_type i) const |
Answers select queries for the supported bit_vector. More... | |
size_type | prev (size_type i) const |
Answers "previous occurence of one" queries for the supported bit_vector. More... | |
size_type | next (size_type i) const |
Answers "next occurence of one" queries for the supported bit_vector. More... | |
size_type | size () const |
size_type | ones () const |
size_type | serialize (std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const |
Serializes the nearest_neighbour_dictionary. More... | |
void | load (std::istream &in) |
Loads the nearest_neighbour_dictionary. 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== (nearest_neighbour_dictionary const &other) const noexcept |
Equality operator. More... | |
bool | operator!= (nearest_neighbour_dictionary const &other) const noexcept |
Inequality operator. More... | |
Nearest neighbour dictionary for sparse uniform sets (described in Geary et al., A Simple Optimal Representation for Balanced Parentheses, CPM 2004).
Template parameter t_sample_dens corresponds to parameter t in the paper. The data structure the following methods:
Definition at line 39 of file nearest_neighbour_dictionary.hpp.
typedef bit_vector::size_type sdsl::nearest_neighbour_dictionary< t_sample_dens >::size_type |
Definition at line 45 of file nearest_neighbour_dictionary.hpp.
|
inline |
Default constructor.
Definition at line 62 of file nearest_neighbour_dictionary.hpp.
|
inline |
Constructor.
v | The supported bit_vector. |
Definition at line 70 of file nearest_neighbour_dictionary.hpp.
|
inline |
Copy constructor.
Definition at line 120 of file nearest_neighbour_dictionary.hpp.
|
inline |
Move constructor.
Definition at line 132 of file nearest_neighbour_dictionary.hpp.
|
inline |
Destructor.
Definition at line 135 of file nearest_neighbour_dictionary.hpp.
|
inline |
Definition at line 271 of file nearest_neighbour_dictionary.hpp.
|
inline |
Definition at line 260 of file nearest_neighbour_dictionary.hpp.
|
inline |
Loads the nearest_neighbour_dictionary.
in | In-Stream to load the rank_support data from. |
Definition at line 249 of file nearest_neighbour_dictionary.hpp.
|
inline |
Answers "next occurence of one" queries for the supported bit_vector.
i | Position ![]() |
Definition at line 218 of file nearest_neighbour_dictionary.hpp.
|
inline |
Definition at line 227 of file nearest_neighbour_dictionary.hpp.
|
inlinenoexcept |
Inequality operator.
Definition at line 291 of file nearest_neighbour_dictionary.hpp.
|
inline |
Definition at line 137 of file nearest_neighbour_dictionary.hpp.
|
inline |
Definition at line 147 of file nearest_neighbour_dictionary.hpp.
|
inlinenoexcept |
Equality operator.
Definition at line 283 of file nearest_neighbour_dictionary.hpp.
|
inline |
Answers "previous occurence of one" queries for the supported bit_vector.
i | Position ![]() |
Definition at line 206 of file nearest_neighbour_dictionary.hpp.
|
inline |
Answers rank queries for the supported bit_vector.
idx | Argument for the length of the prefix v[0..idx-1]. |
Definition at line 167 of file nearest_neighbour_dictionary.hpp.
|
inline |
Answers select queries for the supported bit_vector.
i | Select the ![]() ![]() |
Definition at line 190 of file nearest_neighbour_dictionary.hpp.
|
inline |
Serializes the nearest_neighbour_dictionary.
out | Out-Stream to serialize the data to. |
Definition at line 232 of file nearest_neighbour_dictionary.hpp.
|
inline |
Definition at line 225 of file nearest_neighbour_dictionary.hpp.