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

Trait class for the binomial coefficient class to handle different type of intergers. More...

#include <rrr_helper.hpp>

List of all members.

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 $len$-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 $len$-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.

Detailed Description

template<uint16_t log_n>
struct sdsl::binomial_coefficients_trait< log_n >

Trait class for the binomial coefficient class to handle different type of intergers.

This generic implementation works for 64-bit integers.


Member Function Documentation

template<uint16_t log_n>
template<class bit_vector_type >
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 $len$-bit integer of type number_type from a bitvector.

Parameters:
bvA bit_vector of int_vector from which we extract the integer.
posPosition of the least significant bit of the integer which should be read.
lenbit-width of the integer which should be read.
Returns:
The len-bit integer.
template<uint16_t log_n>
static uint16_t sdsl::binomial_coefficients_trait< log_n >::popcount ( number_type  x) [inline, static]

Count the number of set bits in x.

Parameters:
xThe integer x.
template<uint16_t log_n>
template<class bit_vector_type >
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 $len$-bit integer x of type number_type to a bitvector.

  \param bv       A bit_vecor or int_vector in which we write the integer.
Parameters:
posPosition of the least significant bit of the integer which should be written.
xThe integer x which should be written.
lenBit-width of x.

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