![]() |
Pixie
|
Optional rank/select implementation over the 3-star backend. More...
#include <three_star.h>
Public Member Functions | |
| ThreeStarRankSelectSupport (std::span< const std::uint64_t > source_words, std::size_t num_bits) | |
| Build the upstream uncompressed 3-star configuration. | |
| std::size_t | size_impl () const |
| Return the logical source length. | |
| int | bit_impl (std::size_t position) const |
| Read a source bit; position must be below size(). | |
| std::uint64_t | rank_impl (std::size_t end_position) const |
Return the one rank in [0, end_position). | |
| std::uint64_t | select_impl (std::size_t rank) const |
| Return the zero-based position of a one-based one rank. | |
| bool | supports_select1_impl () const |
| 3-star implements one-select, but not zero-select. | |
| bool | supports_select0_impl () const |
| 3-star's upstream zero-select implementation is incomplete. | |
| std::uint64_t | select0_impl (std::size_t occurrence) const |
| Return zero for occurrence zero, otherwise size(): disabled. | |
| std::size_t | memory_usage_bytes_impl () const |
| Return upstream-reported logical bytes for source and metadata. | |
| std::size_t | source_copy_bytes () const |
| Return logical bytes in 3-star's uncompressed source copy. | |
| std::size_t | index_logical_bytes () const |
| Return upstream-reported logical metadata bytes. | |
Public Member Functions inherited from pixie::RankSelectBase< ThreeStarRankSelectSupport > | |
| 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. | |
Optional rank/select implementation over the 3-star backend.
This adapter exposes only the upstream operations that are complete in the pinned upstream source: one-rank and one-select. Its backing input and metadata are owned by the upstream process-global implementation, so only one instance may be live at a time. The comparison target supplies its upstream global state. Upstream construction diagnostics are suppressed to keep terminal I/O out of the timed build operation. The source copy includes zero padding for complete superblocks and sentinels.
|
inlineexplicit |
Build the upstream uncompressed 3-star configuration.
| source_words | Packed least-significant-bit-first source words. |
| num_bits | Logical source length, clamped to source_words. |