pasta_bit_vector
1.0.1
Bit Vector with Compact and Fast Rank and Select Support
|
Rank support for BitVector that can be used as an alternative to Rank for bit vectors up to length 2^40. More...
#include <wide_rank.hpp>
Public Member Functions | |
WideRank ()=default | |
Default constructor w/o parameter. | |
WideRank (VectorType &bv) | |
Constructor. Creates the auxiliary information for efficient rank queries. | |
size_t | rank0 (size_t index) const |
Computes rank of zeros. | |
size_t | rank1 (size_t index) const |
Computes rank of ones. | |
virtual size_t | space_usage () const |
Estimate for the space usage. | |
Friends | |
template<OptimizedFor o, FindL2WideWith f, typename v > | |
class | WideRankSelect |
Friend class, using internal information l12_. | |
Rank support for BitVector that can be used as an alternative to Rank for bit vectors up to length 2^40.
The rank support is an extended and engineered version of the popcount rank support by Zhou et al. [2]. This flat rank support hoverer removes the highest utility array (L0) and also groups twice as many L2-blocks in a single L1-block. This allows us to store more information—most importantly the number of ones w.r.t. the beginning of the L1-block—in the L2-blocks. For the L1/2-block layout see BigL12Type.
OptimizedFor | Compile time option to optimize data structure for either 0, 1, or no specific type of query. |
VectorType | Type of the vector the rank data structure is constructed for, e.g., plain BitVector or a compressed bit vector. |
|
inline |
Constructor. Creates the auxiliary information for efficient rank queries.
bv | Vector of type VectorType the rank structure is created for. |
|
inlinenodiscard |
Computes rank of zeros.
index | Index the rank of zeros is computed for. |
index
.
|
inlinenodiscard |
Computes rank of ones.
index | Index the rank of ones is computed for. |
index
.
|
inlinenodiscardvirtual |
Estimate for the space usage.
Reimplemented in pasta::WideRankSelect< optimized_for, find_with, VectorType >.