Class InterleavedRankSelect

Class Documentation

class InterleavedRankSelect

a static vector of bits with its counts inside its lines, rank with one access to the memory

Public Functions

inline InterleavedRankSelect(void)
explicit InterleavedRankSelect(const BitVector &b)

the directory of the bits b, laid out with them

InterleavedRankSelect(std::span<const Word> w, std::size_t n)

the directory of the n bits of the words w, laid out with them

Pre:

w.size() >= ceil( n / 64 )

inline std::size_t size(void) const
inline std::size_t ones(void) const

the number of 1s

inline std::size_t zeros(void) const

the number of 0s

bool operator[](std::size_t i) const

the bit i

Pre:

i < size()

std::size_t rank1(std::size_t i) const

the number of 1s in the places [ 0 , i )

Pre:

i <= size()

inline std::size_t rank0(std::size_t i) const

the number of 0s in the places [ 0 , i )

Pre:

i <= size()

std::size_t select1(std::size_t k) const

the place of the k-th 1

Pre:

1 <= k <= ones()

Post:

the bit there is 1 and rank1() of it is k - 1

std::size_t select0(std::size_t k) const

the place of the k-th 0

Pre:

1 <= k <= zeros()

Post:

the bit there is 0 and rank0() of it is k - 1

std::size_t directoryBits(void) const

the bits of the counts in the lines, of the superblocks and of the samples, beyond the m bits