SDSL  3.0.0
Succinct Data Structure Library
sdsl::bit_vector_il< t_bs > Class Template Reference

A bit vector which interleaves the original bit_vector with rank information. More...

#include <bit_vector_il.hpp>

Public Types

typedef bit_vector::size_type size_type
 
typedef size_type value_type
 
typedef bit_vector::difference_type difference_type
 
typedef random_access_const_iterator< bit_vector_iliterator
 
typedef iterator const_iterator
 
typedef bv_tag index_category
 
typedef rank_support_il< 1, t_bs > rank_1_type
 
typedef rank_support_il< 0, t_bs > rank_0_type
 
typedef select_support_il< 1, t_bs > select_1_type
 
typedef select_support_il< 0, t_bs > select_0_type
 

Public Member Functions

 bit_vector_il ()
 
 bit_vector_il (const bit_vector_il &)=default
 
 bit_vector_il (bit_vector_il &&)=default
 
bit_vector_iloperator= (const bit_vector_il &)=default
 
bit_vector_iloperator= (bit_vector_il &&)=default
 
 bit_vector_il (const bit_vector &bv)
 
value_type operator[] (size_type i) const
 Accessing the i-th element of the original bit_vector. More...
 
uint64_t get_int (size_type idx, uint8_t len=64) const
 Get the integer value of the binary string of length len starting at position idx. More...
 
size_type size () const
 Returns the size of the original bit vector. More...
 
size_type serialize (std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const
 Serializes the data structure into the given ostream. More...
 
void load (std::istream &in)
 Loads the data structure from the given istream. 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)
 
iterator begin () const
 
iterator end () const
 
bool operator== (const bit_vector_il &v) const
 
bool operator!= (const bit_vector_il &v) const
 

Friends

class rank_support_il< 1, t_bs >
 
class rank_support_il< 0, t_bs >
 
class select_support_il< 1, t_bs >
 
class select_support_il< 0, t_bs >
 

Detailed Description

template<uint32_t t_bs = 512>
class sdsl::bit_vector_il< t_bs >

A bit vector which interleaves the original bit_vector with rank information.

This class is a uncompressed bit vector representation. It copies the original bit_vector and interleaves the data every t_bs bits with a cumulative sum of set bits before the current position. Each cumulative sum is stored in a 64 bit word.

Template Parameters
t_bsBlock size in bits. t_bs has to be a power of 2 and t_bs >= 64.

Definition at line 44 of file bit_vector_il.hpp.

Member Typedef Documentation

◆ const_iterator

template<uint32_t t_bs = 512>
typedef iterator sdsl::bit_vector_il< t_bs >::const_iterator

Definition at line 54 of file bit_vector_il.hpp.

◆ difference_type

template<uint32_t t_bs = 512>
typedef bit_vector::difference_type sdsl::bit_vector_il< t_bs >::difference_type

Definition at line 52 of file bit_vector_il.hpp.

◆ index_category

template<uint32_t t_bs = 512>
typedef bv_tag sdsl::bit_vector_il< t_bs >::index_category

Definition at line 55 of file bit_vector_il.hpp.

◆ iterator

template<uint32_t t_bs = 512>
typedef random_access_const_iterator<bit_vector_il> sdsl::bit_vector_il< t_bs >::iterator

Definition at line 53 of file bit_vector_il.hpp.

◆ rank_0_type

template<uint32_t t_bs = 512>
typedef rank_support_il<0, t_bs> sdsl::bit_vector_il< t_bs >::rank_0_type

Definition at line 63 of file bit_vector_il.hpp.

◆ rank_1_type

template<uint32_t t_bs = 512>
typedef rank_support_il<1, t_bs> sdsl::bit_vector_il< t_bs >::rank_1_type

Definition at line 62 of file bit_vector_il.hpp.

◆ select_0_type

template<uint32_t t_bs = 512>
typedef select_support_il<0, t_bs> sdsl::bit_vector_il< t_bs >::select_0_type

Definition at line 65 of file bit_vector_il.hpp.

◆ select_1_type

template<uint32_t t_bs = 512>
typedef select_support_il<1, t_bs> sdsl::bit_vector_il< t_bs >::select_1_type

Definition at line 64 of file bit_vector_il.hpp.

◆ size_type

template<uint32_t t_bs = 512>
typedef bit_vector::size_type sdsl::bit_vector_il< t_bs >::size_type

Definition at line 50 of file bit_vector_il.hpp.

◆ value_type

template<uint32_t t_bs = 512>
typedef size_type sdsl::bit_vector_il< t_bs >::value_type

Definition at line 51 of file bit_vector_il.hpp.

Constructor & Destructor Documentation

◆ bit_vector_il() [1/4]

template<uint32_t t_bs = 512>
sdsl::bit_vector_il< t_bs >::bit_vector_il ( )
inline

Definition at line 103 of file bit_vector_il.hpp.

◆ bit_vector_il() [2/4]

template<uint32_t t_bs = 512>
sdsl::bit_vector_il< t_bs >::bit_vector_il ( const bit_vector_il< t_bs > &  )
default

◆ bit_vector_il() [3/4]

template<uint32_t t_bs = 512>
sdsl::bit_vector_il< t_bs >::bit_vector_il ( bit_vector_il< t_bs > &&  )
default

◆ bit_vector_il() [4/4]

template<uint32_t t_bs = 512>
sdsl::bit_vector_il< t_bs >::bit_vector_il ( const bit_vector bv)
inline

Definition at line 109 of file bit_vector_il.hpp.

Member Function Documentation

◆ begin()

template<uint32_t t_bs = 512>
iterator sdsl::bit_vector_il< t_bs >::begin ( ) const
inline

Definition at line 245 of file bit_vector_il.hpp.

◆ CEREAL_LOAD_FUNCTION_NAME()

template<uint32_t t_bs = 512>
template<typename archive_t >
void sdsl::bit_vector_il< t_bs >::CEREAL_LOAD_FUNCTION_NAME ( archive_t &  ar)
inline

Definition at line 235 of file bit_vector_il.hpp.

◆ CEREAL_SAVE_FUNCTION_NAME()

template<uint32_t t_bs = 512>
template<typename archive_t >
void sdsl::bit_vector_il< t_bs >::CEREAL_SAVE_FUNCTION_NAME ( archive_t &  ar) const
inline

Definition at line 224 of file bit_vector_il.hpp.

◆ end()

template<uint32_t t_bs = 512>
iterator sdsl::bit_vector_il< t_bs >::end ( ) const
inline

Definition at line 247 of file bit_vector_il.hpp.

◆ get_int()

template<uint32_t t_bs = 512>
uint64_t sdsl::bit_vector_il< t_bs >::get_int ( size_type  idx,
uint8_t  len = 64 
) const
inline

Get the integer value of the binary string of length len starting at position idx.

Parameters
idxStarting index of the binary representation of the integer.
lenLength of the binary representation of the integer. Default value is 64.
Returns
The integer value of the binary string of length len starting at position idx.
Precondition
idx+len-1 in [0..size()-1]
len in [1..64]

Definition at line 176 of file bit_vector_il.hpp.

◆ load()

template<uint32_t t_bs = 512>
void sdsl::bit_vector_il< t_bs >::load ( std::istream &  in)
inline

Loads the data structure from the given istream.

Definition at line 213 of file bit_vector_il.hpp.

◆ operator!=()

template<uint32_t t_bs = 512>
bool sdsl::bit_vector_il< t_bs >::operator!= ( const bit_vector_il< t_bs > &  v) const
inline

Definition at line 251 of file bit_vector_il.hpp.

◆ operator=() [1/2]

template<uint32_t t_bs = 512>
bit_vector_il& sdsl::bit_vector_il< t_bs >::operator= ( bit_vector_il< t_bs > &&  )
default

◆ operator=() [2/2]

template<uint32_t t_bs = 512>
bit_vector_il& sdsl::bit_vector_il< t_bs >::operator= ( const bit_vector_il< t_bs > &  )
default

◆ operator==()

template<uint32_t t_bs = 512>
bool sdsl::bit_vector_il< t_bs >::operator== ( const bit_vector_il< t_bs > &  v) const
inline

Definition at line 249 of file bit_vector_il.hpp.

◆ operator[]()

template<uint32_t t_bs = 512>
value_type sdsl::bit_vector_il< t_bs >::operator[] ( size_type  i) const
inline

Accessing the i-th element of the original bit_vector.

Parameters
iAn index i with $ 0 \leq i < size() $.
Returns
The i-th bit of the original bit_vector
Time complexity
$ \Order{1} $

Definition at line 160 of file bit_vector_il.hpp.

◆ serialize()

template<uint32_t t_bs = 512>
size_type sdsl::bit_vector_il< t_bs >::serialize ( std::ostream &  out,
structure_tree_node v = nullptr,
std::string  name = "" 
) const
inline

Serializes the data structure into the given ostream.

Definition at line 198 of file bit_vector_il.hpp.

◆ size()

template<uint32_t t_bs = 512>
size_type sdsl::bit_vector_il< t_bs >::size ( ) const
inline

Returns the size of the original bit vector.

Definition at line 195 of file bit_vector_il.hpp.

Friends And Related Function Documentation

◆ rank_support_il< 0, t_bs >

template<uint32_t t_bs = 512>
friend class rank_support_il< 0, t_bs >
friend

Definition at line 55 of file bit_vector_il.hpp.

◆ rank_support_il< 1, t_bs >

template<uint32_t t_bs = 512>
friend class rank_support_il< 1, t_bs >
friend

Definition at line 55 of file bit_vector_il.hpp.

◆ select_support_il< 0, t_bs >

template<uint32_t t_bs = 512>
friend class select_support_il< 0, t_bs >
friend

Definition at line 55 of file bit_vector_il.hpp.

◆ select_support_il< 1, t_bs >

template<uint32_t t_bs = 512>
friend class select_support_il< 1, t_bs >
friend

Definition at line 55 of file bit_vector_il.hpp.


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