![]() |
Pixie
|
Pasta flat rank/select adapter over a copied packed bit sequence. More...
#include <pasta.h>
Public Member Functions | |
| PastaRankSelectSupport (std::span< const uint64_t > source_words, std::size_t num_bits) | |
| Construct an owning Pasta index from caller-provided packed words. | |
| std::size_t | size_impl () const |
| Return the number of valid source bits. | |
| int | bit_impl (std::size_t position) const |
| Return the bit at a zero-based valid position. | |
| uint64_t | rank_impl (std::size_t end_position) const |
Return the one rank in [0, end_position). | |
| uint64_t | select_impl (std::size_t rank) const |
| Return the zero-based position of a one-based one rank. | |
| uint64_t | select0_impl (std::size_t rank) const |
| Return the zero-based position of a one-based zero rank. | |
| bool | supports_select1_impl () const |
| Pasta constructs support for one selects unconditionally. | |
| bool | supports_select0_impl () const |
| Pasta constructs support for zero selects unconditionally. | |
| std::size_t | memory_usage_bytes_impl () const |
| Return bytes owned by the converted source and Pasta metadata. | |
| std::size_t | source_copy_bytes () const |
| Return bytes in Pasta's owned normalized source copy. | |
| std::size_t | index_logical_bytes () const |
| Return Pasta's logical index bytes, excluding its owned source. | |
Public Member Functions inherited from pixie::RankSelectBase< PastaRankSelectSupport > | |
| std::size_t | size () const |
| Return the number of valid bits. | |
| bool | empty () const |
| Check whether the bit vector is empty. | |
| int | operator[] (std::size_t position) const |
| Read a bit by zero-based position. | |
| std::uint64_t | rank (std::size_t end_position) const |
Count one bits in the prefix [0, end_position). | |
| std::uint64_t | rank0 (std::size_t end_position) const |
Count zero bits in the prefix [0, end_position). | |
| std::uint64_t | select (std::size_t rank) const |
| Return the position of the rank-th one bit. | |
| std::uint64_t | select0 (std::size_t rank) const |
| Return the position of the rank-th zero bit. | |
| bool | supports_select1 () const |
| Check whether select queries for one bits are enabled. | |
| bool | supports_select0 () const |
| Check whether select queries for zero bits are enabled. | |
| std::size_t | memory_usage_bytes () const |
| Return owned index memory usage when provided by the implementation. | |
| std::string | to_string () const |
| Convert the logical bits to a binary string. | |
Pasta flat rank/select adapter over a copied packed bit sequence.
The constructor owns a normalized copy of the logical source words; source mutations do not affect this index. Both select directions are always available. Public positions are zero-based, prefix ranks use [0, end), and selects use one-based ranks with the Pixie rank-zero and out-of-range sentinels.
|
inlineexplicit |
Construct an owning Pasta index from caller-provided packed words.
| source_words | Packed least-significant-bit-first source words. |
| num_bits | Number of valid input bits, clamped to source_words. |
|
inline |
Return Pasta's logical index bytes, excluding its owned source.
Pasta reports logical vector sizes rather than allocator capacity.
|
inline |
Return bytes owned by the converted source and Pasta metadata.
Pasta's FlatRankSelect::space_usage() omits its inherited L1/L2 table, so account for that table explicitly from its documented layout.