Sux
Public Member Functions | List of all members
sux::bits::SimpleSelectHalf< AT > Class Template Reference

#include <SimpleSelectHalf.hpp>

Public Member Functions

 SimpleSelectHalf ()
 
 SimpleSelectHalf (const uint64_t *const bits, const uint64_t num_bits)
 
uint64_t select (const uint64_t rank)
 
uint64_t select (const uint64_t rank, uint64_t *const next)
 
size_t bitCount () const
 

Detailed Description

template<util::AllocType AT = util::AllocType::MALLOC>
class sux::bits::SimpleSelectHalf< AT >

A simple Select implementation based on a two-level inventory, and wired for approximately the same number of zeros and ones.

The constructors of this class only store a reference to a provided bit vector. Should the content of the bit vector change, the results will be unpredictable.

This implementation has been specifically developed to be used with EliasFano.

Template Parameters
ATa type of memory allocation out of sux::util::AllocType.

Constructor & Destructor Documentation

◆ SimpleSelectHalf() [1/2]

template<util::AllocType AT = util::AllocType::MALLOC>
sux::bits::SimpleSelectHalf< AT >::SimpleSelectHalf ( )
inline

◆ SimpleSelectHalf() [2/2]

template<util::AllocType AT = util::AllocType::MALLOC>
sux::bits::SimpleSelectHalf< AT >::SimpleSelectHalf ( const uint64_t *const  bits,
const uint64_t  num_bits 
)
inline

Creates a new instance using a given bit vector.

Parameters
bitsa bit vector of 64-bit words.
num_bitsthe length (in bits) of the bit vector.

Member Function Documentation

◆ bitCount()

template<util::AllocType AT = util::AllocType::MALLOC>
size_t sux::bits::SimpleSelectHalf< AT >::bitCount ( ) const
inline

Returns an estimate of the size (in bits) of this structure.

◆ select() [1/2]

template<util::AllocType AT = util::AllocType::MALLOC>
uint64_t sux::bits::SimpleSelectHalf< AT >::select ( const uint64_t  rank)
inline

◆ select() [2/2]

template<util::AllocType AT = util::AllocType::MALLOC>
uint64_t sux::bits::SimpleSelectHalf< AT >::select ( const uint64_t  rank,
uint64_t *const  next 
)
inline

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