SDSL 3.0.2
Succinct Data Structure Library
Loading...
Searching...
No Matches
sdsl::coder::elias_delta< T > Class Template Reference

A class to encode and decode between Elias- $\delta$ and binary code. More...

#include <coder_elias_delta.hpp>

Classes

struct  impl
 

Public Types

typedef uint64_t size_type
 

Static Public Member Functions

static uint8_t encoding_length (uint64_t)
 
template<bool t_sumup, bool t_inc, class t_iter >
static uint64_t decode (uint64_t const *data, const size_type start_idx, size_type n, t_iter it=(t_iter) nullptr)
 Decode n Elias-delta encoded bits beginning at start_idx in the bitstring "data".
 
static uint64_t decode_prefix_sum (uint64_t const *d, const size_type start_idx, size_type n)
 Decode n Elias delta encoded integers beginning at start_idx in the bitstring "data" and return the sum of these values.
 
static uint64_t decode_prefix_sum (uint64_t const *d, const size_type start_idx, const size_type end_idx, size_type n)
 
template<class int_vector >
static bool encode (int_vector const &v, int_vector &z)
 
template<class int_vector >
static bool decode (int_vector const &z, int_vector &v)
 
static void encode (uint64_t x, uint64_t *&z, uint8_t &offset)
 Encode one positive integer x to an int_vector at bit position start_idx.
 
template<class int_vector >
static uint64_t * raw_data (int_vector &v)
 

Static Public Attributes

static struct sdsl::coder::elias_delta::impl data
 
static const uint8_t min_codeword_length = 1
 

Detailed Description

template<typename T = void>
class sdsl::coder::elias_delta< T >

A class to encode and decode between Elias- $\delta$ and binary code.

Definition at line 24 of file coder_elias_delta.hpp.

Member Typedef Documentation

◆ size_type

template<typename T = void>
typedef uint64_t sdsl::coder::elias_delta< T >::size_type

Definition at line 27 of file coder_elias_delta.hpp.

Member Function Documentation

◆ decode() [1/2]

template<typename T >
template<class int_vector >
bool sdsl::coder::elias_delta< T >::decode ( int_vector const &  z,
int_vector v 
)
inlinestatic

Definition at line 596 of file coder_elias_delta.hpp.

◆ decode() [2/2]

template<typename T >
template<bool t_sumup, bool t_inc, class t_iter >
uint64_t sdsl::coder::elias_delta< T >::decode ( uint64_t const *  data,
const size_type  start_idx,
size_type  n,
t_iter  it = (t_iter) nullptr 
)
inlinestatic

Decode n Elias-delta encoded bits beginning at start_idx in the bitstring "data".

Definition at line 620 of file coder_elias_delta.hpp.

◆ decode_prefix_sum() [1/2]

template<typename T >
uint64_t sdsl::coder::elias_delta< T >::decode_prefix_sum ( uint64_t const *  d,
const size_type  start_idx,
const size_type  end_idx,
size_type  n 
)
inlinestatic

Definition at line 240 of file coder_elias_delta.hpp.

◆ decode_prefix_sum() [2/2]

template<typename T >
uint64_t sdsl::coder::elias_delta< T >::decode_prefix_sum ( uint64_t const *  d,
const size_type  start_idx,
size_type  n 
)
inlinestatic

Decode n Elias delta encoded integers beginning at start_idx in the bitstring "data" and return the sum of these values.

Parameters
dataPointer to the beginning of the Elias delta encoded bitstring.
start_idxIndex of the first bit to endcode the values from.
nNumber of values to decode from the bitstring. Attention: There have to be at least n encoded values in the bitstring.

Definition at line 471 of file coder_elias_delta.hpp.

◆ encode() [1/2]

template<typename T >
template<class int_vector >
bool sdsl::coder::elias_delta< T >::encode ( int_vector const &  v,
int_vector z 
)
inlinestatic

Definition at line 174 of file coder_elias_delta.hpp.

◆ encode() [2/2]

template<typename T >
void sdsl::coder::elias_delta< T >::encode ( uint64_t  x,
uint64_t *&  z,
uint8_t &  offset 
)
inlinestatic

Encode one positive integer x to an int_vector at bit position start_idx.

Definition at line 222 of file coder_elias_delta.hpp.

◆ encoding_length()

template<typename T >
uint8_t sdsl::coder::elias_delta< T >::encoding_length ( uint64_t  w)
inlinestatic

Definition at line 166 of file coder_elias_delta.hpp.

◆ raw_data()

template<typename T = void>
template<class int_vector >
static uint64_t * sdsl::coder::elias_delta< T >::raw_data ( int_vector v)
inlinestatic

Definition at line 158 of file coder_elias_delta.hpp.

Member Data Documentation

◆ data

template<typename T >
elias_delta< T >::impl sdsl::coder::elias_delta< T >::data
static

Definition at line 648 of file coder_elias_delta.hpp.

◆ min_codeword_length

template<typename T = void>
const uint8_t sdsl::coder::elias_delta< T >::min_codeword_length = 1
static

Definition at line 123 of file coder_elias_delta.hpp.


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