8#ifndef INCLUDED_SDSL_SELECT_SUPPORT_SCAN
9#define INCLUDED_SDSL_SELECT_SUPPORT_SCAN
29template <u
int8_t t_b = 1, u
int8_t t_pat_len = 1>
33 static_assert(t_b == 1u or t_b == 0u or t_b == 10u,
34 "select_support_scan: bit pattern must be `0`,`1`,`10` or `01`");
35 static_assert(t_pat_len == 1u or t_pat_len == 2u,
"select_support_scan: bit pattern length must be 1 or 2");
60 template <
typename archive_t>
63 template <
typename archive_t>
79template <u
int8_t t_b, u
int8_t t_pat_len>
80template <
typename archive_t>
84template <u
int8_t t_b, u
int8_t t_pat_len>
85template <
typename archive_t>
89template <u
int8_t t_b, u
int8_t t_pat_len>
93 const uint64_t * data = m_v->data();
100 return (word_pos << 6) +
106 uint64_t old_carry = carry;
108 while (sum_args + args < i)
111 assert(data + 1 < m_v->data() + (m_v->capacity() >> 6));
116 return (word_pos << 6) +
A class supporting linear time select queries.
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(const select_support_scan< t_b, t_pat_len > &ss)
select_support_scan< t_b, t_pat_len > & operator=(const select_support_scan &ss)
bit_vector bit_vector_type
void CEREAL_SAVE_FUNCTION_NAME(archive_t &ar) const
Serialise (save) via cereal.
size_type operator()(size_type i) const
Alias for select.
void set_vector(const bit_vector *v=nullptr)
This method sets the supported bit_vector.
void load(std::istream &, SDSL_UNUSED const bit_vector *v=nullptr)
select_support_scan(const bit_vector *v=nullptr)
The base class of classes supporting select queries for a sdsl::bit_vector in constant time.
const int_vector< 1 > * 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.
Namespace for the succinct data structure library.
size_t serialize_empty_object(std::ostream &, structure_tree_node *v=nullptr, std::string name="", const T *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 size_type args_in_the_word(uint64_t, uint64_t &)
static uint64_t init_carry(const uint64_t *, size_type)
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)
util.hpp contains some helper methods for int_vector and other stuff like demangle class names.