|
| | WaveletTreeIndex (std::size_t alphabet_size, std::span< const Symbol > data, const WaveletTreeBuildType build_type=WaveletTreeBuildType::Standard) |
| | Construct from a contiguous sequence of typed symbols.
|
| |
template<class ForEachSymbol>
requires (std::same_as<Storage, AlignedStorage>) |
| | WaveletTreeIndex (std::size_t alphabet_size, std::span< const std::size_t > symbol_counts, ForEachSymbol &&for_each_symbol, const WaveletTreeBuildType build_type=WaveletTreeBuildType::Standard) |
| | Construct from counts and one streamed pass over the symbols.
|
| |
| size_t | rank_impl (Symbol symbol, size_t pos) const |
| | Rank of specified symbol up to position pos (exclusive)
|
| |
| size_t | select_impl (Symbol symbol, size_t rank) const |
| | Select the position of the rank-th specified symbol (1-indexed)
|
| |
| std::vector< Symbol > | get_segment_impl (size_t begin, size_t end) const |
| | Accumulates the original data segment.
|
| |
| size_t | size_impl () const |
| |
| void | serialize_impl (BinaryWriter &writer) const |
| | Write a versioned canonical little-endian wavelet-tree artifact.
|
| |
| std::size_t | size () const |
| | Return the number of symbols in the indexed sequence.
|
| |
| bool | empty () const |
| | Check whether the indexed sequence is empty.
|
| |
| std::size_t | rank (Symbol symbol, std::size_t end_position) const |
| | Count occurrences of symbol in [0, end_position).
|
| |
| std::size_t | select (Symbol symbol, std::size_t rank) const |
| | Return the position of the rank-th occurrence of symbol.
|
| |
| std::vector< Symbol > | get_segment (std::size_t begin, std::size_t end) const |
| | Reconstruct the sequence range [@p begin, @p end).
|
| |
|
void | serialize (BinaryWriter &writer) const |
| | Serialize this value through its concrete implementation.
|
| |
template<WaveletTreeSymbol Symbol, StorageImplementation Storage = AlignedStorage>
class pixie::WaveletTreeIndex< Symbol, Storage >
Storage-backed wavelet tree over an unsigned symbol type.
- Template Parameters
-
| Symbol | Unsigned symbol type. Its value range must cover the dense alphabet [0, alphabet_size). |
| Storage | Owning aligned storage or a non-owning read-only view. |
template<WaveletTreeSymbol Symbol, StorageImplementation Storage = AlignedStorage>
Restore one checked wavelet-tree artifact.
The aligned-storage specialization copies all restored metadata. The read-only specialization retains views into the reader's backing bytes, which must remain alive, immutable, and aligned for 64-bit access. On success reader advances past exactly one framed artifact; on failure it is unchanged. validation selects quick structural checks or exact bitvector-derived metadata validation.
- Parameters
-
| reader | Input cursor, advanced only after successful validation. |
| validation | Quick structural or full bitvector-derived validation. |
- Exceptions
-
| std::invalid_argument | for malformed, truncated, incompatible, or structurally inconsistent metadata. |
| std::length_error | when an encoded count is not representable. |
template<WaveletTreeSymbol Symbol, StorageImplementation Storage = AlignedStorage>
| std::vector< Symbol > pixie::WaveletTreeIndex< Symbol, Storage >::get_segment_impl |
( |
size_t | begin, |
|
|
size_t | end ) const |
|
inline |
Accumulates the original data segment.
- Parameters
-
| begin | Begin of the segment |
| end | End of the segment |
- Returns
- Queried segment of data
Queries packed bit vectors and rank/select metadata directly through the node storage. A deserialized view does not consult or retain its BinaryReader. The current implementation materializes the requested output and an equally sized temporary buffer, for peak auxiliary and result storage of two Symbol values per returned symbol.