8#ifndef INCLUDED_SDSL_RMQ_SUCCINCT_SCT
9#define INCLUDED_SDSL_RMQ_SUCCINCT_SCT
27template <
bool t_min = true,
class t_bp_support = bp_support_sada<256, 32, rank_support_v5<>>>
30template <
class t_bp_support = bp_support_sada<256, 32, rank_support_v5<>>>
46template <
bool t_min,
class t_bp_support>
50 t_bp_support m_sct_bp_support;
68 template <
class t_rac>
73#ifdef RMQ_SCT_BUILD_BP_NOT_SUCCINCT
88 m_sct_bp_support.set_vector(&m_sct_bp);
94 *
this = std::move(rm);
102 *
this = std::move(tmp);
111 m_sct_bp = std::move(rm.m_sct_bp);
112 m_sct_bp_support = std::move(rm.m_sct_bp_support);
113 m_sct_bp_support.set_vector(&m_sct_bp);
135 size_type i = m_sct_bp_support.select(l + 1);
136 size_type j = m_sct_bp_support.select(r + 1);
137 size_type fc_i = m_sct_bp_support.find_close(i);
144 size_type ec = m_sct_bp_support.rr_enclose(i, j);
145 if (ec == m_sct_bp_support.size())
151 return m_sct_bp_support.rank(ec) - 1;
158 return m_sct_bp.size() / 2;
165 written_bytes += m_sct_bp.serialize(out, child,
"sct_bp");
166 written_bytes += m_sct_bp_support.serialize(out, child,
"sct_bp_support");
168 return written_bytes;
174 m_sct_bp_support.load(in, &m_sct_bp);
177 template <
typename archive_t>
184 template <
typename archive_t>
189 m_sct_bp_support.set_vector(&m_sct_bp);
195 return (m_sct_bp == other.m_sct_bp) && (m_sct_bp_support == other.m_sct_bp_support);
201 return !(*
this == other);
bp_support_sada.hpp contains an implementation of a balanced parentheses support structure proposed b...
cereal.hpp offers cereal support
int_vector_size_type size_type
A class to support range minimum or range maximum queries on a random access container.
void CEREAL_SAVE_FUNCTION_NAME(archive_t &ar) const
bool operator==(rmq_succinct_sct const &other) const noexcept
Equality operator.
void CEREAL_LOAD_FUNCTION_NAME(archive_t &ar)
size_type operator()(const size_type l, const size_type r) const
Range minimum/maximum query for the supported random access container v.
bit_vector::size_type value_type
t_bp_support bp_support_type
rmq_succinct_sct & operator=(rmq_succinct_sct &&rm)
rmq_succinct_sct(rmq_succinct_sct const &rm)
Copy constructor.
bool operator!=(rmq_succinct_sct const &other) const noexcept
Inequality operator.
rmq_succinct_sct()
Default constructor.
bp_support_type const & sct_bp_support
size_type serialize(std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const
rmq_succinct_sct(rmq_succinct_sct &&rm)
Move constructor.
bit_vector const & sct_bp
rmq_succinct_sct(t_rac const *v=nullptr)
Constructor.
bit_vector::size_type size_type
rmq_succinct_sct & operator=(rmq_succinct_sct const &rm)
void load(std::istream &in)
static structure_tree_node * add_child(structure_tree_node *v, std::string const &name, std::string const &type)
static void add_size(structure_tree_node *v, uint64_t value)
int_vector.hpp contains the sdsl::int_vector class.
Namespace for the succinct data structure library.
void construct_supercartesian_tree_bp(t_rac const &vec, bit_vector &bp, bool const minimum=true)
Calculate the balanced parentheses of the Super-Cartesian tree, described in Ohlebusch and Gog (SPIRE...
bit_vector construct_supercartesian_tree_bp_succinct(t_rac const &vec, bool const minimum=true)
Calculate the balanced parentheses of the Super-Cartesian tree, described in Ohlebusch and Gog (SPIRE...
int_vector< 1 > bit_vector
bit_vector is a specialization of the int_vector.
rank_support_v5.hpp contains rank_support_v5.5
rmq_succinct_sct< false, t_bp_support > type
structure_tree.hpp contains a helper class which can represent the memory structure of a class.
util.hpp contains some helper methods for int_vector and other stuff like demangle class names.