SDSL 3.0.3
Succinct Data Structure Library
Loading...
Searching...
No Matches
sdsl::nn_dict_dynamic Class Reference

A class for a dynamic bit vector which also supports the prev and next operations. More...

#include <nn_dict_dynamic.hpp>

Classes

class  reference
 

Public Types

typedef int_vector< 64 >::size_type size_type
 

Public Member Functions

size_type size () const
 
 nn_dict_dynamic (const uint64_t n=0)
 Constructor.
 
 nn_dict_dynamic (nn_dict_dynamic const &nn)
 Copy constructor.
 
 nn_dict_dynamic (nn_dict_dynamic &&nn)
 move constructor
 
nn_dict_dynamicoperator= (nn_dict_dynamic const &nn)
 Assignment operator.
 
nn_dict_dynamicoperator= (nn_dict_dynamic &&nn)
 Assignment move operator.
 
bool operator[] (size_type const &idx) const
 Access the bit at index idx.
 
reference operator[] (size_type const &idx)
 
size_type next (const size_type idx) const
 Get the leftmost index $i\geq idx$ where a bit is set.
 
size_type prev (const size_type idx) const
 Get the rightmost index $i \leq idx$ where a bit is set.
 
void load (std::istream &in)
 Load the data structure.
 
size_type serialize (std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const
 Serialize the data structure.
 
template<typename archive_t>
void CEREAL_SAVE_FUNCTION_NAME (archive_t &ar) const
 Serialise (save) via cereal.
 
template<typename archive_t>
void CEREAL_LOAD_FUNCTION_NAME (archive_t &ar)
 Load via cereal.
 
bool operator== (nn_dict_dynamic const &other) const noexcept
 Equality operator.
 
bool operator!= (nn_dict_dynamic const &other) const noexcept
 Inequality operator.
 

Public Attributes

uint64_t const & depth
 

Friends

class reference
 
void util::set_zero_bits (nn_dict_dynamic &nn)
 

Detailed Description

A class for a dynamic bit vector which also supports the prev and next operations.

Definition at line 39 of file nn_dict_dynamic.hpp.

Member Typedef Documentation

◆ size_type

Definition at line 42 of file nn_dict_dynamic.hpp.

Constructor & Destructor Documentation

◆ nn_dict_dynamic() [1/3]

sdsl::nn_dict_dynamic::nn_dict_dynamic ( const uint64_t n = 0)
inline

Constructor.

Parameters
nNumber of supported bits

Definition at line 66 of file nn_dict_dynamic.hpp.

◆ nn_dict_dynamic() [2/3]

sdsl::nn_dict_dynamic::nn_dict_dynamic ( nn_dict_dynamic const & nn)
inline

Copy constructor.

Definition at line 103 of file nn_dict_dynamic.hpp.

◆ nn_dict_dynamic() [3/3]

sdsl::nn_dict_dynamic::nn_dict_dynamic ( nn_dict_dynamic && nn)
inline

move constructor

Definition at line 113 of file nn_dict_dynamic.hpp.

Member Function Documentation

◆ CEREAL_LOAD_FUNCTION_NAME()

template<typename archive_t>
void sdsl::nn_dict_dynamic::CEREAL_LOAD_FUNCTION_NAME ( archive_t & ar)
inline

Load via cereal.

Definition at line 303 of file nn_dict_dynamic.hpp.

◆ CEREAL_SAVE_FUNCTION_NAME()

template<typename archive_t>
void sdsl::nn_dict_dynamic::CEREAL_SAVE_FUNCTION_NAME ( archive_t & ar) const
inline

Serialise (save) via cereal.

Definition at line 292 of file nn_dict_dynamic.hpp.

◆ load()

void sdsl::nn_dict_dynamic::load ( std::istream & in)
inline

Load the data structure.

Definition at line 267 of file nn_dict_dynamic.hpp.

◆ next()

size_type sdsl::nn_dict_dynamic::next ( const size_type idx) const
inline

Get the leftmost index $i\geq idx$ where a bit is set.

Parameters
idxLeft border of the search interval. $ 0\leq idx < size()$
Returns
If there exists a leftmost index $i\geq idx$ where a bit is set, then $i$ is returned, otherwise size().

Definition at line 169 of file nn_dict_dynamic.hpp.

◆ operator!=()

bool sdsl::nn_dict_dynamic::operator!= ( nn_dict_dynamic const & other) const
inlinenoexcept

Inequality operator.

Definition at line 320 of file nn_dict_dynamic.hpp.

◆ operator=() [1/2]

nn_dict_dynamic & sdsl::nn_dict_dynamic::operator= ( nn_dict_dynamic && nn)
inline

Assignment move operator.

Definition at line 130 of file nn_dict_dynamic.hpp.

◆ operator=() [2/2]

nn_dict_dynamic & sdsl::nn_dict_dynamic::operator= ( nn_dict_dynamic const & nn)
inline

Assignment operator.

Definition at line 119 of file nn_dict_dynamic.hpp.

◆ operator==()

bool sdsl::nn_dict_dynamic::operator== ( nn_dict_dynamic const & other) const
inlinenoexcept

Equality operator.

Definition at line 313 of file nn_dict_dynamic.hpp.

◆ operator[]() [1/2]

reference sdsl::nn_dict_dynamic::operator[] ( size_type const & idx)
inline

Definition at line 158 of file nn_dict_dynamic.hpp.

◆ operator[]() [2/2]

bool sdsl::nn_dict_dynamic::operator[] ( size_type const & idx) const
inline

Access the bit at index idx.

Parameters
idxIndex
Precondition
$ 0 \leq  idx < size() $

Definition at line 152 of file nn_dict_dynamic.hpp.

◆ prev()

size_type sdsl::nn_dict_dynamic::prev ( const size_type idx) const
inline

Get the rightmost index $i \leq idx$ where a bit is set.

Parameters
idxRight border of the search interval. $ 0 \leq idx < size()$
Returns
If there exists a rightmost index $i \leq idx$ where a bit is set, then $i$ is returned, otherwise size().

Definition at line 219 of file nn_dict_dynamic.hpp.

◆ serialize()

size_type sdsl::nn_dict_dynamic::serialize ( std::ostream & out,
structure_tree_node * v = nullptr,
std::string name = "" ) const
inline

Serialize the data structure.

Definition at line 277 of file nn_dict_dynamic.hpp.

◆ size()

size_type sdsl::nn_dict_dynamic::size ( ) const
inline

Definition at line 58 of file nn_dict_dynamic.hpp.

Friends And Related Symbol Documentation

◆ reference

friend class reference
friend

Definition at line 45 of file nn_dict_dynamic.hpp.

◆ util::set_zero_bits

void util::set_zero_bits ( nn_dict_dynamic & nn)
friend

Member Data Documentation

◆ depth

uint64_t const& sdsl::nn_dict_dynamic::depth

Definition at line 56 of file nn_dict_dynamic.hpp.


The documentation for this class was generated from the following file: