8#ifndef INCLUDED_SDSL_RANK_SUPPORT_SCAN
9#define INCLUDED_SDSL_RANK_SUPPORT_SCAN
26template <u
int8_t t_b = 1, u
int8_t t_pat_len = 1>
30 static_assert(t_b == 1u or t_b == 0u or t_b == 10u or t_b == 11u,
31 "rank_support_scan: bit pattern must be `0`,`1`,`10` or `01`");
32 static_assert(t_pat_len == 1u or t_pat_len == 2u,
"rank_support_scan: bit pattern length must be 1 or 2");
61 template <
typename archive_t>
64 template <
typename archive_t>
75template <u
int8_t t_b, u
int8_t t_pat_len>
79 assert(m_v !=
nullptr);
80 assert(idx <= m_v->
size());
81 const uint64_t * p = m_v->data();
size_type size() const noexcept
The number of elements in the int_vector.
A class supporting rank queries in linear time.
bit_vector bit_vector_type
void load(std::istream &, const int_vector< 1 > *v=nullptr)
Loads the rank_support.
rank_support_scan & operator=(rank_support_scan &&rs)=default
rank_support_scan(const rank_support_scan &rs)=default
void CEREAL_LOAD_FUNCTION_NAME(archive_t &)
void set_vector(const bit_vector *v=nullptr)
Sets the supported bit_vector to the given pointer.
void CEREAL_SAVE_FUNCTION_NAME(archive_t &) const
rank_support_scan(const bit_vector *v=nullptr)
size_type operator()(size_type idx) const
size_type serialize(std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const
Serializes rank_support.
size_type rank(size_type idx) const
bool operator==(rank_support_scan const &other) const noexcept
Equality operator.
rank_support_scan & operator=(const rank_support_scan &rs)=default
bool operator!=(rank_support_scan const &other) const noexcept
Inequality operator.
rank_support_scan(rank_support_scan &&rs)=default
The base class of classes supporting rank_queries for a sdsl::bit_vector in constant time.
const bit_vector * m_v
Pointer to the rank supported bit_vector.
bit_vector::size_type size_type
Namespace for the succinct data structure library.
int_vector ::size_type size(const range_type &r)
Size of a range.
size_t serialize_empty_object(std::ostream &, structure_tree_node *v=nullptr, std::string name="", const T *t=nullptr)
rank_support.hpp contains classes that support a sdsl::bit_vector with constant time rank information...
static uint32_t word_rank(const uint64_t *, size_type)
static uint32_t full_word_rank(const uint64_t *, size_type)