template<util::AllocType AT = util::AllocType::MALLOC>
class sux::bits::Rank9< AT >
A class implementing Rank9, a ranking structure using 25% additional space and providing very fast ranking.
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.
Warning: if you plan an calling rank(size_t) with argument size(), you must have at least one additional free bit at the end of the provided bit vector.
- Template Parameters
-
template<util::AllocType AT = util::AllocType::MALLOC>
Creates a new instance using a given bit vector.
Note that this constructor only stores a reference to the provided bit vector. Should the content of the bit vector change, the results will be unpredictable.
Warning: if you plan an calling rank(size_t) with argument size(), you must have at least one additional free bit at the end of the provided bit vector.
- Parameters
-
bits | a bit vector of 64-bit words. |
num_bits | the length (in bits) of the bit vector. |