SDSL 3.0.3
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. | |
nearest_neighbour_dictionary (bit_vector const &v) | |
Constructor. | |
nearest_neighbour_dictionary (nearest_neighbour_dictionary const &nnd) | |
Copy constructor. | |
nearest_neighbour_dictionary (nearest_neighbour_dictionary &&nnd) | |
Move constructor. | |
~nearest_neighbour_dictionary () | |
Destructor. | |
nearest_neighbour_dictionary & | operator= (nearest_neighbour_dictionary const &nnd) |
nearest_neighbour_dictionary & | operator= (nearest_neighbour_dictionary &&nnd) |
size_type | rank (size_type idx) const |
Answers rank queries for the supported bit_vector. | |
size_type | select (size_type i) const |
Answers select queries for the supported bit_vector. | |
size_type | prev (size_type i) const |
Answers "previous occurence of one" queries for the supported bit_vector. | |
size_type | next (size_type i) const |
Answers "next occurence of one" queries for the supported bit_vector. | |
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. | |
void | load (std::istream &in) |
Loads the nearest_neighbour_dictionary. | |
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. | |
bool | operator!= (nearest_neighbour_dictionary const &other) const noexcept |
Inequality operator. | |
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 44 of file nearest_neighbour_dictionary.hpp.
typedef bit_vector::size_type sdsl::nearest_neighbour_dictionary< t_sample_dens >::size_type |
Definition at line 50 of file nearest_neighbour_dictionary.hpp.
|
inline |
Default constructor.
Definition at line 67 of file nearest_neighbour_dictionary.hpp.
|
inline |
Constructor.
v | The supported bit_vector. |
Definition at line 73 of file nearest_neighbour_dictionary.hpp.
|
inline |
Copy constructor.
Definition at line 121 of file nearest_neighbour_dictionary.hpp.
|
inline |
Move constructor.
Definition at line 133 of file nearest_neighbour_dictionary.hpp.
|
inline |
Destructor.
Definition at line 139 of file nearest_neighbour_dictionary.hpp.
|
inline |
Definition at line 289 of file nearest_neighbour_dictionary.hpp.
|
inline |
Definition at line 278 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 267 of file nearest_neighbour_dictionary.hpp.
|
inline |
Answers "next occurence of one" queries for the supported bit_vector.
i | Position ![]() |
Definition at line 230 of file nearest_neighbour_dictionary.hpp.
|
inline |
Definition at line 242 of file nearest_neighbour_dictionary.hpp.
|
inlinenoexcept |
Inequality operator.
Definition at line 309 of file nearest_neighbour_dictionary.hpp.
|
inline |
Definition at line 152 of file nearest_neighbour_dictionary.hpp.
|
inline |
Definition at line 142 of file nearest_neighbour_dictionary.hpp.
|
inlinenoexcept |
Equality operator.
Definition at line 301 of file nearest_neighbour_dictionary.hpp.
|
inline |
Answers "previous occurence of one" queries for the supported bit_vector.
i | Position ![]() |
Definition at line 218 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 172 of file nearest_neighbour_dictionary.hpp.
|
inline |
Answers select queries for the supported bit_vector.
i | Select the ![]() ![]() |
Definition at line 199 of file nearest_neighbour_dictionary.hpp.
|
inline |
Serializes the nearest_neighbour_dictionary.
out | Out-Stream to serialize the data to. |
Definition at line 250 of file nearest_neighbour_dictionary.hpp.
|
inline |
Definition at line 237 of file nearest_neighbour_dictionary.hpp.