33 std::size_t
size()
const {
return impl().size_impl(); }
47 std::size_t
rank(std::uint64_t symbol, std::size_t end_position)
const {
48 return impl().rank_impl(symbol, end_position);
57 std::size_t
select(std::uint64_t symbol, std::size_t
rank)
const {
58 return impl().select_impl(symbol,
rank);
68 std::size_t end)
const {
69 return impl().get_segment_impl(begin, end);
74 const Impl& impl()
const {
return static_cast<const Impl&
>(*this); }
CRTP facade for wavelet-tree queries.
Definition wavelet_tree.h:27
bool empty() const
Check whether the indexed sequence is empty.
Definition wavelet_tree.h:39
std::size_t select(std::uint64_t symbol, std::size_t rank) const
Return the position of the rank-th occurrence of symbol.
Definition wavelet_tree.h:57
std::size_t size() const
Return the number of symbols in the indexed sequence.
Definition wavelet_tree.h:33
std::vector< std::uint64_t > get_segment(std::size_t begin, std::size_t end) const
Reconstruct the sequence range [@p begin, @p end).
Definition wavelet_tree.h:67
std::size_t rank(std::uint64_t symbol, std::size_t end_position) const
Count occurrences of symbol in [0, end_position).
Definition wavelet_tree.h:47
WaveletTreeBuildType
Construction strategy for a wavelet-tree implementation.
Definition wavelet_tree.h:18