SDSL 3.0.1
Succinct Data Structure Library
|
A generic immutable space-saving vector class for unsigned integers. More...
#include <enc_vector.hpp>
Public Types | |
typedef uint64_t | value_type |
typedef random_access_const_iterator< enc_vector > | iterator |
typedef iterator | const_iterator |
typedef const value_type | reference |
typedef const value_type | const_reference |
typedef const value_type * | const_pointer |
typedef ptrdiff_t | difference_type |
typedef int_vector ::size_type | size_type |
typedef t_coder | coder |
typedef enc_vector_trait< t_width >::int_vector_type | int_vector_type |
typedef iv_tag | index_category |
typedef enc_vector | enc_vec_type |
Public Member Functions | |
enc_vector ()=default | |
enc_vector (const enc_vector &)=default | |
enc_vector (enc_vector &&)=default | |
enc_vector & | operator= (const enc_vector &)=default |
enc_vector & | operator= (enc_vector &&)=default |
template<class Container > | |
enc_vector (const Container &c) | |
Constructor for a Container of unsigned integers. More... | |
template<uint8_t int_width> | |
enc_vector (int_vector_buffer< int_width > &v_buf) | |
Constructor for an int_vector_buffer of unsigned integers. More... | |
~enc_vector () | |
Default Destructor. More... | |
size_type | size () const |
The number of elements in the enc_vector. More... | |
bool | empty () const |
Returns if the enc_vector is empty. More... | |
const const_iterator | begin () const |
Iterator that points to the first element of the enc_vector. More... | |
const const_iterator | end () const |
Iterator that points to the position after the last element of the enc_vector. More... | |
bool | operator== (const enc_vector &v) const |
bool | operator!= (const enc_vector &v) const |
value_type | operator[] (size_type i) const |
operator[] More... | |
size_type | serialize (std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const |
Serialize the enc_vector to a stream. More... | |
void | load (std::istream &in) |
Load the enc_vector from a stream. More... | |
template<typename archive_t > | |
void | CEREAL_SAVE_FUNCTION_NAME (archive_t &ar) const |
template<typename archive_t > | |
void | CEREAL_LOAD_FUNCTION_NAME (archive_t &ar) |
value_type | sample (const size_type i) const |
Returns the i-th sample of enc_vector. More... | |
uint32_t | get_sample_dens () const |
void | get_inter_sampled_values (const size_type i, uint64_t *it) const |
Static Public Member Functions | |
static size_type | max_size () |
Return the largest size that this container can ever have. More... | |
Public Attributes | |
int_vector< 0 > | m_z |
Static Public Attributes | |
static const uint32_t | sample_dens = t_dens |
A generic immutable space-saving vector class for unsigned integers.
A vector v is stored more space-efficiently by self-delimiting coding the deltas v[i+1]-v[i] (v[-1]:=0). Space of the structure and random access time to it can be controlled by a sampling parameter t_dens.
t_coder | Self-delimiting coder. |
t_dens | Every t_dens-th element of v is sampled. |
t_width | Width of the int_vector used to store the samples and pointers. This class is a parameter of csa_sada. |
Definition at line 49 of file enc_vector.hpp.
typedef t_coder sdsl::enc_vector< t_coder, t_dens, t_width >::coder |
Definition at line 63 of file enc_vector.hpp.
typedef iterator sdsl::enc_vector< t_coder, t_dens, t_width >::const_iterator |
Definition at line 57 of file enc_vector.hpp.
typedef const value_type* sdsl::enc_vector< t_coder, t_dens, t_width >::const_pointer |
Definition at line 60 of file enc_vector.hpp.
typedef const value_type sdsl::enc_vector< t_coder, t_dens, t_width >::const_reference |
Definition at line 59 of file enc_vector.hpp.
typedef ptrdiff_t sdsl::enc_vector< t_coder, t_dens, t_width >::difference_type |
Definition at line 61 of file enc_vector.hpp.
typedef enc_vector sdsl::enc_vector< t_coder, t_dens, t_width >::enc_vec_type |
Definition at line 67 of file enc_vector.hpp.
typedef iv_tag sdsl::enc_vector< t_coder, t_dens, t_width >::index_category |
Definition at line 65 of file enc_vector.hpp.
typedef enc_vector_trait<t_width>::int_vector_type sdsl::enc_vector< t_coder, t_dens, t_width >::int_vector_type |
Definition at line 64 of file enc_vector.hpp.
typedef random_access_const_iterator<enc_vector> sdsl::enc_vector< t_coder, t_dens, t_width >::iterator |
Definition at line 56 of file enc_vector.hpp.
typedef const value_type sdsl::enc_vector< t_coder, t_dens, t_width >::reference |
Definition at line 58 of file enc_vector.hpp.
typedef int_vector ::size_type sdsl::enc_vector< t_coder, t_dens, t_width >::size_type |
Definition at line 62 of file enc_vector.hpp.
typedef uint64_t sdsl::enc_vector< t_coder, t_dens, t_width >::value_type |
Definition at line 55 of file enc_vector.hpp.
|
default |
|
default |
|
default |
sdsl::enc_vector< t_coder, t_dens, t_width >::enc_vector | ( | const Container & | c | ) |
Constructor for a Container of unsigned integers.
c | A container of unsigned integers. |
Definition at line 200 of file enc_vector.hpp.
sdsl::enc_vector< t_coder, t_dens, t_width >::enc_vector | ( | int_vector_buffer< int_width > & | v_buf | ) |
Constructor for an int_vector_buffer of unsigned integers.
Definition at line 284 of file enc_vector.hpp.
|
inline |
Default Destructor.
Definition at line 104 of file enc_vector.hpp.
|
inline |
Iterator that points to the first element of the enc_vector.
Definition at line 116 of file enc_vector.hpp.
void sdsl::enc_vector< t_coder, t_dens, t_width >::CEREAL_LOAD_FUNCTION_NAME | ( | archive_t & | ar | ) |
Definition at line 379 of file enc_vector.hpp.
void sdsl::enc_vector< t_coder, t_dens, t_width >::CEREAL_SAVE_FUNCTION_NAME | ( | archive_t & | ar | ) | const |
Definition at line 370 of file enc_vector.hpp.
|
inline |
Returns if the enc_vector is empty.
Definition at line 113 of file enc_vector.hpp.
|
inline |
Iterator that points to the position after the last element of the enc_vector.
Definition at line 119 of file enc_vector.hpp.
|
inline |
i | The index of the sample for which all values till the next sample should be decoded. 0 <= i < size()/get_sample_dens() |
it | A pointer to a uint64_t vector, whereto the values should be written |
Definition at line 160 of file enc_vector.hpp.
|
inline |
Definition at line 154 of file enc_vector.hpp.
void sdsl::enc_vector< t_coder, t_dens, t_width >::load | ( | std::istream & | in | ) |
Load the enc_vector from a stream.
Definition at line 361 of file enc_vector.hpp.
|
inlinestatic |
Return the largest size that this container can ever have.
Definition at line 110 of file enc_vector.hpp.
|
inline |
Definition at line 126 of file enc_vector.hpp.
|
default |
|
default |
|
inline |
Definition at line 121 of file enc_vector.hpp.
|
inline |
|
inline |
Returns the i-th sample of enc_vector.
i | The index of the sample. 0 <= i < size()/get_sample_dens() |
Definition at line 190 of file enc_vector.hpp.
enc_vector::size_type sdsl::enc_vector< t_coder, t_dens, t_width >::serialize | ( | std::ostream & | out, |
structure_tree_node * | v = nullptr , |
||
std::string | name = "" |
||
) | const |
Serialize the enc_vector to a stream.
out | Out stream to write the data structure. |
Definition at line 347 of file enc_vector.hpp.
|
inline |
The number of elements in the enc_vector.
Definition at line 107 of file enc_vector.hpp.
int_vector<0> sdsl::enc_vector< t_coder, t_dens, t_width >::m_z |
Definition at line 69 of file enc_vector.hpp.
|
static |
Definition at line 66 of file enc_vector.hpp.