SDSL: Succinct Data Structure Library
A C++ template library for succinct data structures
 All Classes Namespaces Files Functions Variables Typedefs Friends
Public Types | Public Member Functions | Friends
sdsl::bit_vector_interleaved< blockSize > Class Template Reference

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

#include <bit_vector_interleaved.hpp>

List of all members.

Public Types

typedef bit_vector::size_type size_type
typedef size_type value_type
typedef
rank_support_interleaved
< 1, blockSize > 
rank_1_type
typedef
rank_support_interleaved
< 0, blockSize > 
rank_0_type
typedef
select_support_interleaved
< 1, blockSize > 
select_1_type
typedef
select_support_interleaved
< 0, blockSize > 
select_0_type

Public Member Functions

 bit_vector_interleaved (const bit_vector &bv)
value_type operator[] (size_type i) const
 Accessing the i-th element of the original bit_vector.
size_type size () const
 Returns the size of the original bit vector.
size_type serialize (std::ostream &out, structure_tree_node *v=NULL, std::string name="") const
 Serializes the data structure into the given ostream.
void load (std::istream &in)
 Loads the data structure from the given istream.
void swap (bit_vector_interleaved &bv)

Friends

class rank_support_interleaved< 1, blockSize >
class rank_support_interleaved< 0, blockSize >
class select_support_interleaved< 1, blockSize >
class select_support_interleaved< 0, blockSize >

Detailed Description

template<uint32_t blockSize = 512>
class sdsl::bit_vector_interleaved< blockSize >

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 blockSize bits with a cumulative sum of set bits before the current position. Each cumulative sum is stored in a 64 bit word.

Precondition:
blockSize has to be a power of 2 and blockSize >= 64

Member Function Documentation

template<uint32_t blockSize = 512>
value_type sdsl::bit_vector_interleaved< blockSize >::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} $

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