SDSL 3.0.1
Succinct Data Structure Library
Loading...
Searching...
No Matches
sdsl::hyb_vector< k_sblock_rate > Class Template Reference

A hybrid-encoded compressed bitvector representation. More...

#include <hyb_vector.hpp>

Public Types

typedef bit_vector::size_type size_type
 
typedef bit_vector::value_type value_type
 
typedef bit_vector::difference_type difference_type
 
typedef random_access_const_iterator< hyb_vectoriterator
 
typedef rank_support_hyb< 1, k_sblock_rate > rank_1_type
 
typedef rank_support_hyb< 0, k_sblock_rate > rank_0_type
 
typedef select_support_hyb< 1, k_sblock_rate > select_1_type
 
typedef select_support_hyb< 0, k_sblock_rate > select_0_type
 

Public Member Functions

 hyb_vector ()=default
 Default constructor.
 
 hyb_vector (const hyb_vector &hybrid)=default
 
 hyb_vector (hyb_vector &&hybrid)=default
 
hyb_vectoroperator= (const hyb_vector &hybrid)=default
 
hyb_vectoroperator= (hyb_vector &&hybrid)=default
 
 hyb_vector (const bit_vector &bv)
 Constructor.
 
uint64_t get_int (size_type idx, const uint8_t len=64) const
 Get the integer value of the binary string of length len starting at position idx.
 
value_type operator[] (size_type i) const
 Accessing the i-th element of the original bitvector.
 
size_type size () const
 Returns the size of the original bitvector.
 
size_type serialize (std::ostream &out, structure_tree_node *v=nullptr, 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.
 
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 hyb_vector &v) const
 
bool operator!= (const hyb_vector &v) const
 

Friends

class rank_support_hyb< 1, k_sblock_rate >
 
class rank_support_hyb< 0, k_sblock_rate >
 
class select_support_hyb< 1, k_sblock_rate >
 
class select_support_hyb< 0, k_sblock_rate >
 

Detailed Description

template<uint32_t k_sblock_rate = 16>
class sdsl::hyb_vector< k_sblock_rate >

A hybrid-encoded compressed bitvector representation.

Template Parameters
k_sblock_rateSuperblock rate (number of blocks inside superblock)

References:

  • Juha Karkkainen, Dominik Kempa and Simon J. Puglisi. Hybrid Compression of Bitvectors for the FM-Index. DCC 2014.

Definition at line 66 of file hyb_vector.hpp.

Member Typedef Documentation

◆ difference_type

template<uint32_t k_sblock_rate = 16>
typedef bit_vector::difference_type sdsl::hyb_vector< k_sblock_rate >::difference_type

Definition at line 71 of file hyb_vector.hpp.

◆ iterator

template<uint32_t k_sblock_rate = 16>
typedef random_access_const_iterator<hyb_vector> sdsl::hyb_vector< k_sblock_rate >::iterator

Definition at line 72 of file hyb_vector.hpp.

◆ rank_0_type

template<uint32_t k_sblock_rate = 16>
typedef rank_support_hyb<0, k_sblock_rate> sdsl::hyb_vector< k_sblock_rate >::rank_0_type

Definition at line 74 of file hyb_vector.hpp.

◆ rank_1_type

template<uint32_t k_sblock_rate = 16>
typedef rank_support_hyb<1, k_sblock_rate> sdsl::hyb_vector< k_sblock_rate >::rank_1_type

Definition at line 73 of file hyb_vector.hpp.

◆ select_0_type

template<uint32_t k_sblock_rate = 16>
typedef select_support_hyb<0, k_sblock_rate> sdsl::hyb_vector< k_sblock_rate >::select_0_type

Definition at line 76 of file hyb_vector.hpp.

◆ select_1_type

template<uint32_t k_sblock_rate = 16>
typedef select_support_hyb<1, k_sblock_rate> sdsl::hyb_vector< k_sblock_rate >::select_1_type

Definition at line 75 of file hyb_vector.hpp.

◆ size_type

template<uint32_t k_sblock_rate = 16>
typedef bit_vector::size_type sdsl::hyb_vector< k_sblock_rate >::size_type

Definition at line 69 of file hyb_vector.hpp.

◆ value_type

template<uint32_t k_sblock_rate = 16>
typedef bit_vector::value_type sdsl::hyb_vector< k_sblock_rate >::value_type

Definition at line 70 of file hyb_vector.hpp.

Constructor & Destructor Documentation

◆ hyb_vector() [1/4]

template<uint32_t k_sblock_rate = 16>
sdsl::hyb_vector< k_sblock_rate >::hyb_vector ( )
default

Default constructor.

◆ hyb_vector() [2/4]

template<uint32_t k_sblock_rate = 16>
sdsl::hyb_vector< k_sblock_rate >::hyb_vector ( const hyb_vector< k_sblock_rate > &  hybrid)
default

◆ hyb_vector() [3/4]

template<uint32_t k_sblock_rate = 16>
sdsl::hyb_vector< k_sblock_rate >::hyb_vector ( hyb_vector< k_sblock_rate > &&  hybrid)
default

◆ hyb_vector() [4/4]

template<uint32_t k_sblock_rate = 16>
sdsl::hyb_vector< k_sblock_rate >::hyb_vector ( const bit_vector bv)
inline

Constructor.

Definition at line 104 of file hyb_vector.hpp.

Member Function Documentation

◆ begin()

template<uint32_t k_sblock_rate = 16>
iterator sdsl::hyb_vector< k_sblock_rate >::begin ( ) const
inline

Definition at line 649 of file hyb_vector.hpp.

◆ CEREAL_LOAD_FUNCTION_NAME()

template<uint32_t k_sblock_rate = 16>
template<typename archive_t >
void sdsl::hyb_vector< k_sblock_rate >::CEREAL_LOAD_FUNCTION_NAME ( archive_t &  ar)
inline

Definition at line 641 of file hyb_vector.hpp.

◆ CEREAL_SAVE_FUNCTION_NAME()

template<uint32_t k_sblock_rate = 16>
template<typename archive_t >
void sdsl::hyb_vector< k_sblock_rate >::CEREAL_SAVE_FUNCTION_NAME ( archive_t &  ar) const
inline

Definition at line 632 of file hyb_vector.hpp.

◆ end()

template<uint32_t k_sblock_rate = 16>
iterator sdsl::hyb_vector< k_sblock_rate >::end ( ) const
inline

Definition at line 651 of file hyb_vector.hpp.

◆ get_int()

template<uint32_t k_sblock_rate = 16>
uint64_t sdsl::hyb_vector< k_sblock_rate >::get_int ( size_type  idx,
const 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 592 of file hyb_vector.hpp.

◆ load()

template<uint32_t k_sblock_rate = 16>
void sdsl::hyb_vector< k_sblock_rate >::load ( std::istream &  in)
inline

Loads the data structure from the given istream.

Definition at line 623 of file hyb_vector.hpp.

◆ operator!=()

template<uint32_t k_sblock_rate = 16>
bool sdsl::hyb_vector< k_sblock_rate >::operator!= ( const hyb_vector< k_sblock_rate > &  v) const
inline

Definition at line 659 of file hyb_vector.hpp.

◆ operator=() [1/2]

template<uint32_t k_sblock_rate = 16>
hyb_vector & sdsl::hyb_vector< k_sblock_rate >::operator= ( const hyb_vector< k_sblock_rate > &  hybrid)
default

◆ operator=() [2/2]

template<uint32_t k_sblock_rate = 16>
hyb_vector & sdsl::hyb_vector< k_sblock_rate >::operator= ( hyb_vector< k_sblock_rate > &&  hybrid)
default

◆ operator==()

template<uint32_t k_sblock_rate = 16>
bool sdsl::hyb_vector< k_sblock_rate >::operator== ( const hyb_vector< k_sblock_rate > &  v) const
inline

Definition at line 653 of file hyb_vector.hpp.

◆ operator[]()

template<uint32_t k_sblock_rate = 16>
value_type sdsl::hyb_vector< k_sblock_rate >::operator[] ( size_type  i) const
inline

Accessing the i-th element of the original bitvector.

Definition at line 604 of file hyb_vector.hpp.

◆ serialize()

template<uint32_t k_sblock_rate = 16>
size_type sdsl::hyb_vector< k_sblock_rate >::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 610 of file hyb_vector.hpp.

◆ size()

template<uint32_t k_sblock_rate = 16>
size_type sdsl::hyb_vector< k_sblock_rate >::size ( ) const
inline

Returns the size of the original bitvector.

Definition at line 607 of file hyb_vector.hpp.

Friends And Related Function Documentation

◆ rank_support_hyb< 0, k_sblock_rate >

template<uint32_t k_sblock_rate = 16>
friend class rank_support_hyb< 0, k_sblock_rate >
friend

Definition at line 76 of file hyb_vector.hpp.

◆ rank_support_hyb< 1, k_sblock_rate >

template<uint32_t k_sblock_rate = 16>
friend class rank_support_hyb< 1, k_sblock_rate >
friend

Definition at line 76 of file hyb_vector.hpp.

◆ select_support_hyb< 0, k_sblock_rate >

template<uint32_t k_sblock_rate = 16>
friend class select_support_hyb< 0, k_sblock_rate >
friend

Definition at line 76 of file hyb_vector.hpp.

◆ select_support_hyb< 1, k_sblock_rate >

template<uint32_t k_sblock_rate = 16>
friend class select_support_hyb< 1, k_sblock_rate >
friend

Definition at line 76 of file hyb_vector.hpp.


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