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

Public Attributes

const uint64_t & 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 30 of file nn_dict_dynamic.hpp.

Member Typedef Documentation

◆ size_type

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 54 of file nn_dict_dynamic.hpp.

◆ nn_dict_dynamic() [2/3]

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

Copy constructor.

Definition at line 88 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 98 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 286 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 275 of file nn_dict_dynamic.hpp.

◆ load()

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

Load the data structure.

Definition at line 250 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 152 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 303 of file nn_dict_dynamic.hpp.

◆ operator=() [1/2]

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

Assignment operator.

Definition at line 105 of file nn_dict_dynamic.hpp.

◆ operator=() [2/2]

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

Assignment move operator.

Definition at line 116 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 296 of file nn_dict_dynamic.hpp.

◆ operator[]() [1/2]

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

Definition at line 144 of file nn_dict_dynamic.hpp.

◆ operator[]() [2/2]

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

Access the bit at index idx.

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

Definition at line 138 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 202 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 260 of file nn_dict_dynamic.hpp.

◆ size()

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

Definition at line 49 of file nn_dict_dynamic.hpp.

Friends And Related Function Documentation

◆ reference

friend class reference
friend

Definition at line 36 of file nn_dict_dynamic.hpp.

◆ util::set_zero_bits

void util::set_zero_bits ( nn_dict_dynamic nn)
friend

Member Data Documentation

◆ depth

const uint64_t& sdsl::nn_dict_dynamic::depth

Definition at line 47 of file nn_dict_dynamic.hpp.


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