8#ifndef INCLUDED_SDSL_RANK_SUPPORT_SCAN
9#define INCLUDED_SDSL_RANK_SUPPORT_SCAN
23class structure_tree_node;
35template <u
int8_t t_b = 1, u
int8_t t_pat_len = 1>
39 static_assert(t_b == 1u or t_b == 0u or t_b == 10u or t_b == 11u,
40 "rank_support_scan: bit pattern must be `0`,`1`,`10` or `01`");
41 static_assert(t_pat_len == 1u or t_pat_len == 2u,
"rank_support_scan: bit pattern length must be 1 or 2");
81 template <
typename archive_t>
84 template <
typename archive_t>
91 return (*
m_v == *other.m_v);
97 return !(*
this == other);
101template <u
int8_t t_b, u
int8_t t_pat_len>
105 assert(m_v !=
nullptr);
106 assert(idx <= m_v->
size());
107 uint64_t
const * p = m_v->data();
110 while (i + 64 <= idx)
cereal.hpp offers cereal support
size_type size() const noexcept
The number of elements in the int_vector.
A class supporting rank queries in linear time.
rank_support_scan(rank_support_scan const &rs)=default
rank_support_scan(bit_vector const *v=nullptr)
void set_vector(bit_vector const *v=nullptr)
Sets the supported bit_vector to the given pointer.
rank_support_scan & operator=(rank_support_scan &&rs)=default
void CEREAL_LOAD_FUNCTION_NAME(archive_t &)
void CEREAL_SAVE_FUNCTION_NAME(archive_t &) const
void load(std::istream &, int_vector< 1 > const *v=nullptr)
Loads the rank_support.
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.
bit_vector bit_vector_type
rank_support_scan & operator=(rank_support_scan const &rs)=default
size_type rank(size_type idx) const
bool operator==(rank_support_scan const &other) const noexcept
Equality operator.
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.
bit_vector const * m_v
Pointer to the rank supported bit_vector.
bit_vector::size_type size_type
int_vector.hpp contains the sdsl::int_vector class.
io.hpp contains some methods for reading/writing sdsl structures.
Namespace for the succinct data structure library.
int_vector ::size_type size(range_type const &r)
Size of a range.
size_t serialize_empty_object(std::ostream &, structure_tree_node *v=nullptr, std::string name="", T const *t=nullptr)
rank_support.hpp contains classes that support a sdsl::bit_vector with constant time rank information...
static uint32_t word_rank(uint64_t const *, size_type)
static uint32_t full_word_rank(uint64_t const *, size_type)