SDSL
3.0.0
Succinct Data Structure Library
|
Trait struct for the binomial coefficient struct to handle different type of integers. More...
#include <rrr_helper.hpp>
Public Types | |
typedef uint64_t | number_type |
Static Public Member Functions | |
static uint16_t | hi (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 ![]() | |
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 ![]() | |
static uint16_t | popcount (number_type x) |
Count the number of set bits in x. More... | |
Trait struct for the binomial coefficient struct to handle different type of integers.
This generic implementation works for 64-bit integers.
Definition at line 32 of file rrr_helper.hpp.
typedef uint64_t sdsl::binomial_coefficients_trait< log_n >::number_type |
Definition at line 34 of file rrr_helper.hpp.
|
inlinestatic |
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. |
Definition at line 45 of file rrr_helper.hpp.
|
inlinestatic |
Definition at line 35 of file rrr_helper.hpp.
|
inlinestatic |
Count the number of set bits in x.
x | The integer x. |
Definition at line 67 of file rrr_helper.hpp.
|
inlinestatic |
Write a -bit integer x of type number_type to a bitvector.
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. |
Definition at line 58 of file rrr_helper.hpp.