pasta::bit_vector  v1.0.0
Compact and Fast Rank and Select Data Structure for Bit Vectors
pasta::L12Type Struct Reference

Struct used to store L1- and L2-blocks for BitVectorRank and BitVectorSelect. More...

#include <l12_type.hpp>

Public Member Functions

 L12Type ()=default
 Constructor. Empty constructor required for tlx::SimpleVector.
 
 L12Type (uint32_t const _l1, std::array< uint16_t, 3 > const _l2)
 Constructor. Setting all values and packing the L2-block entries. More...
 
uint16_t operator[] (size_t const index) const
 Access operator used to access the L2-block entries individually. More...
 

Public Attributes

uint32_t l1
 L1-block value.
 
uint32_t l2_values
 Packed L2-block values.
 

Detailed Description

Struct used to store L1- and L2-blocks for BitVectorRank and BitVectorSelect.

In L12Entry, the 32-bit L1-block entry is stored, as well as the three corresponding L2-block entries (each requiring 10 bits). Note that 2 bits are still unused.

Constructor & Destructor Documentation

◆ L12Type()

pasta::L12Type::L12Type ( uint32_t const  _l1,
std::array< uint16_t, 3 > const  _l2 
)
inline

Constructor. Setting all values and packing the L2-block entries.

Parameters
_l1Value of the L1-block entry.
_l2Values of the three L2-block entries ( asstd::array).

Member Function Documentation

◆ operator[]()

uint16_t pasta::L12Type::operator[] ( size_t const  index) const
inline

Access operator used to access the L2-block entries individually.

Parameters
indexThe index (0, 1, or 3) of the L2-block.
Returns
Popcount of the corresponding L2-block.

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