8#ifndef INCLUDED_SDSL_RANK_SUPPORT_SCAN
9#define INCLUDED_SDSL_RANK_SUPPORT_SCAN
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
A generic vector class for integers of width .
rank_support_scan(rank_support_scan const &rs)=default
rank_support_scan(bit_vector const *v=nullptr)
bit_vector bit_vector_type
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
Alias for rank(i)
size_type serialize(std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const
Serializes rank_support.
rank_support_scan & operator=(rank_support_scan const &rs)=default
size_type rank(size_type idx) const
Answers rank queries for the supported bit_vector.
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
rank_support(bit_vector const *v=nullptr)
Constructor.
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< 1 > bit_vector
bit_vector is a specialization of the int_vector.
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)