18#ifndef INCLUDE_SDSL_INT_VECTOR_IO_WRAPPERS
19#define INCLUDE_SDSL_INT_VECTOR_IO_WRAPPERS
33template <u
int8_t fixedIntW
idth = 0>
53 written_bytes += _sdsl_serialize_size_and_int_width(out, fixedIntWidth, m_vec.width(), m_vec.bit_size());
55 for (
size_type i = 0; i < m_vec.size(); ++i)
58 uint8_t w = ww & 0x7F;
63 out.write((
char const *)&w,
sizeof(uint8_t));
68 out.write((
char const *)&w,
sizeof(uint8_t));
76template <u
int8_t fixedIntW
idth = 0>
91 void load(std::istream & in)
98 m_vec.width(int_width);
99 m_vec.bit_resize(
size);
102 while (i < m_vec.size())
109 in.read((
char *)&w,
sizeof(uint8_t));
113 while ((w & 0x80) > 0);
119template <
class coder_type = coder::elias_delta<>>
139 coder_type::encode(m_vec, enc_vec);
140 written_bytes += enc_vec.
serialize(out, child,
"enc_vector");
142 return written_bytes;
146template <
class coder_type = coder::elias_delta<>>
165 coder_type::decode(enc_vec, m_vec);
169template <
class int_vector_type =
int_vector<>>
184 return m_vec.serialize(out, v, name);
188template <
class int_vector_type =
int_vector<>>
206template <
class int_vector_serialize_wrapper_type =
int_vector_serialize_wrapper<>>
int_vector_type::size_type size_type
int_vector_type::value_type value_type
int_vector< fixedIntWidth > int_vector_type
void load(std::istream &in)
int_vector_load_vbyte_wrapper(int_vector_type &vec)
void load(std::istream &in)
int_vector_type::size_type size_type
int_vector_type::value_type value_type
int_vector int_vector_type
int_vector_load_vlen_wrapper(int_vector_type &vec)
void load(std::istream &in)
int_vector_type::size_type size_type
int_vector_load_wrapper(int_vector_type &vec)
int_vector_type::value_type value_type
int_vector< fixedIntWidth > int_vector_type
int_vector_serialize_vbyte_wrapper(int_vector_type const &vec)
int_vector_type::size_type size_type
size_type serialize(std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const
size_type serialize(std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const
int_vector_type::value_type value_type
int_vector_type::size_type size_type
int_vector int_vector_type
int_vector_serialize_vlen_wrapper(int_vector_type const &vec)
int_vector_serialize_wrapper(int_vector_type const &vec)
size_type serialize(std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const
int_vector_type::size_type size_type
A generic vector class for integers of width .
int_vector_size_type size_type
int_vector_trait< t_width >::int_width_type int_width_type
void load(std::istream &in)
Load the int_vector for a stream.
int_vector_trait< t_width >::value_type value_type
size_type serialize(std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const
Serializes the int_vector to a stream.
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)
coder_elias_delta.hpp contains the class sdsl::coder::elias_delta
int_vector.hpp contains the sdsl::int_vector class.
Namespace for the succinct data structure library.
int_vector ::size_type size(range_type const &r)
Size of a range.
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.