SDSL: Succinct Data Structure Library
A C++ template library for succinct data structures
|
Trait class for the binomial coefficient class to handle different type of intergers. More...
#include <rrr_helper.hpp>
Public Types | |
typedef uint64_t | number_type |
Static Public Member Functions | |
static uint16_t | l1BP (number_type x) |
template<class bit_vector_type > | |
static number_type | get_int (const bit_vector_type &bv, typename bit_vector_type::size_type pos, uint16_t len) |
Read a -bit integer of type number_type from a bitvector. | |
template<class bit_vector_type > | |
static void | set_int (bit_vector_type &bv, typename bit_vector_type::size_type pos, number_type x, uint16_t len) |
Write a -bit integer x of type number_type to a bitvector. | |
static uint16_t | popcount (number_type x) |
Count the number of set bits in x. |
Trait class for the binomial coefficient class to handle different type of intergers.
This generic implementation works for 64-bit integers.
static number_type sdsl::binomial_coefficients_trait< log_n >::get_int | ( | const bit_vector_type & | bv, |
typename bit_vector_type::size_type | pos, | ||
uint16_t | len | ||
) | [inline, static] |
Read a -bit integer of type number_type from a bitvector.
bv | A bit_vector of int_vector from which we extract the integer. |
pos | Position of the least significant bit of the integer which should be read. |
len | bit-width of the integer which should be read. |
static uint16_t sdsl::binomial_coefficients_trait< log_n >::popcount | ( | number_type | x | ) | [inline, static] |
Count the number of set bits in x.
x | The integer x. |
static void sdsl::binomial_coefficients_trait< log_n >::set_int | ( | bit_vector_type & | bv, |
typename bit_vector_type::size_type | pos, | ||
number_type | x, | ||
uint16_t | len | ||
) | [inline, static] |
Write a -bit integer x of type number_type to a bitvector.
\param bv A bit_vecor or int_vector in which we write the integer.
pos | Position of the least significant bit of the integer which should be written. |
x | The integer x which should be written. |
len | Bit-width of x. |