8#ifndef INCLUDED_SDSL_SELECT_SUPPORT_SCAN
9#define INCLUDED_SDSL_SELECT_SUPPORT_SCAN
25class structure_tree_node;
37template <u
int8_t t_b = 1, u
int8_t t_pat_len = 1>
41 static_assert(t_b == 1u or t_b == 0u or t_b == 10u,
42 "select_support_scan: bit pattern must be `0`,`1`,`10` or `01`");
43 static_assert(t_pat_len == 1u or t_pat_len == 2u,
"select_support_scan: bit pattern length must be 1 or 2");
72 template <
typename archive_t>
75 template <
typename archive_t>
90 return (*
m_v == *other.m_v);
96 return !(*
this == other);
100template <u
int8_t t_b, u
int8_t t_pat_len>
101template <
typename archive_t>
105template <u
int8_t t_b, u
int8_t t_pat_len>
106template <
typename archive_t>
110template <u
int8_t t_b, u
int8_t t_pat_len>
114 uint64_t
const * data = m_v->data();
121 return (word_pos << 6)
127 uint64_t old_carry = carry;
129 while (sum_args + args < i)
132 assert(data + 1 < m_v->data() + (m_v->capacity() >> 6));
137 return (word_pos << 6)
cereal.hpp offers cereal support
A class supporting linear time select queries.
select_support_scan< t_b, t_pat_len > & operator=(select_support_scan const &ss)
bool operator==(select_support_scan const &other) const noexcept
Equality operator.
bool operator!=(select_support_scan const &other) const noexcept
Inequality operator.
size_type select(size_type i) const
Select returns the index of the i-th 1-bit in the supported bit_vector.
void CEREAL_LOAD_FUNCTION_NAME(archive_t &ar)
Serialise (load) via cereal.
size_type serialize(std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const
Serialize the select_support to an out file stream.
select_support_scan(select_support_scan< t_b, t_pat_len > const &ss)
void load(std::istream &, SDSL_UNUSED bit_vector const *v=nullptr)
bit_vector bit_vector_type
void CEREAL_SAVE_FUNCTION_NAME(archive_t &ar) const
Serialise (save) via cereal.
void set_vector(bit_vector const *v=nullptr)
This method sets the supported bit_vector.
size_type operator()(size_type i) const
Alias for select.
select_support_scan(bit_vector const *v=nullptr)
The base class of classes supporting select queries for a sdsl::bit_vector in constant time.
int_vector< 1 > const * m_v
Pointer to the select supported sdsl::bit_vector.
int_vector< 1 >::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.
size_t serialize_empty_object(std::ostream &, structure_tree_node *v=nullptr, std::string name="", T const *t=nullptr)
select_support.hpp contains classes that support a sdsl::bit_vector with constant time select informa...
static uint64_t get_carry(uint64_t)
static size_type ith_arg_pos_in_the_word(uint64_t, size_type, uint64_t)
static uint64_t init_carry(uint64_t const *, size_type)
static size_type args_in_the_word(uint64_t, uint64_t &)
static size_type ith_arg_pos_in_the_first_word(uint64_t, size_type, uint8_t, uint64_t)
static size_type args_in_the_first_word(uint64_t, uint8_t, uint64_t)