SDSL: Succinct Data Structure Library
A C++ template library for succinct data structures
 All Classes Namespaces Files Functions Variables Typedefs Friends
Classes | Public Types | Public Member Functions | Public Attributes | Friends
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>

List of all members.

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 (const nn_dict_dynamic &nn)
 Copy constructor.
nn_dict_dynamicoperator= (const nn_dict_dynamic &nn)
 Assignment operator.
void swap (nn_dict_dynamic &nn)
bool operator[] (const size_type &idx) const
 Access the bit at index idx.
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.
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=NULL, std::string name="") const
 Serialize the data structure.

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.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
nNumber of supported bits

Member Function Documentation

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().
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() $
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().

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