SDSL 3.0.3
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 value_type const * | 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 (enc_vector const &)=default | |
enc_vector (enc_vector &&)=default | |
enc_vector & | operator= (enc_vector const &)=default |
enc_vector & | operator= (enc_vector &&)=default |
template<class Container> | |
enc_vector (Container const &c) | |
Constructor for a Container of unsigned integers. | |
template<uint8_t int_width> | |
enc_vector (int_vector_buffer< int_width > &v_buf) | |
Constructor for an int_vector_buffer of unsigned integers. | |
~enc_vector () | |
Default Destructor. | |
size_type | size () const |
The number of elements in the enc_vector. | |
bool | empty () const |
Returns if the enc_vector is empty. | |
const const_iterator | begin () const |
Iterator that points to the first element of the enc_vector. | |
const const_iterator | end () const |
Iterator that points to the position after the last element of the enc_vector. | |
bool | operator== (enc_vector const &v) const |
bool | operator!= (enc_vector const &v) const |
value_type | operator[] (size_type i) const |
operator[] | |
size_type | serialize (std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const |
Serialize the enc_vector to a stream. | |
void | load (std::istream &in) |
Load the enc_vector from a stream. | |
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. | |
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. |
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 62 of file enc_vector.hpp.
typedef t_coder sdsl::enc_vector< t_coder, t_dens, t_width >::coder |
Definition at line 76 of file enc_vector.hpp.
typedef iterator sdsl::enc_vector< t_coder, t_dens, t_width >::const_iterator |
Definition at line 70 of file enc_vector.hpp.
typedef value_type const* sdsl::enc_vector< t_coder, t_dens, t_width >::const_pointer |
Definition at line 73 of file enc_vector.hpp.
typedef const value_type sdsl::enc_vector< t_coder, t_dens, t_width >::const_reference |
Definition at line 72 of file enc_vector.hpp.
typedef ptrdiff_t sdsl::enc_vector< t_coder, t_dens, t_width >::difference_type |
Definition at line 74 of file enc_vector.hpp.
typedef enc_vector sdsl::enc_vector< t_coder, t_dens, t_width >::enc_vec_type |
Definition at line 80 of file enc_vector.hpp.
typedef iv_tag sdsl::enc_vector< t_coder, t_dens, t_width >::index_category |
Definition at line 78 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 77 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 69 of file enc_vector.hpp.
typedef const value_type sdsl::enc_vector< t_coder, t_dens, t_width >::reference |
Definition at line 71 of file enc_vector.hpp.
typedef int_vector ::size_type sdsl::enc_vector< t_coder, t_dens, t_width >::size_type |
Definition at line 75 of file enc_vector.hpp.
typedef uint64_t sdsl::enc_vector< t_coder, t_dens, t_width >::value_type |
Definition at line 68 of file enc_vector.hpp.
|
default |
|
default |
|
default |
sdsl::enc_vector< t_coder, t_dens, t_width >::enc_vector | ( | Container const & | c | ) |
Constructor for a Container of unsigned integers.
c | A container of unsigned integers. |
Definition at line 236 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 321 of file enc_vector.hpp.
|
inline |
Default Destructor.
Definition at line 118 of file enc_vector.hpp.
|
inline |
Iterator that points to the first element of the enc_vector.
Definition at line 140 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 416 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 407 of file enc_vector.hpp.
|
inline |
Returns if the enc_vector is empty.
Definition at line 134 of file enc_vector.hpp.
|
inline |
Iterator that points to the position after the last element of the enc_vector.
Definition at line 146 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 196 of file enc_vector.hpp.
|
inline |
Definition at line 187 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 398 of file enc_vector.hpp.
|
inlinestatic |
Return the largest size that this container can ever have.
Definition at line 128 of file enc_vector.hpp.
|
inline |
Definition at line 156 of file enc_vector.hpp.
|
default |
|
default |
|
inline |
Definition at line 151 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 227 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 386 of file enc_vector.hpp.
|
inline |
The number of elements in the enc_vector.
Definition at line 122 of file enc_vector.hpp.
int_vector<0> sdsl::enc_vector< t_coder, t_dens, t_width >::m_z |
Definition at line 82 of file enc_vector.hpp.
|
static |
Definition at line 79 of file enc_vector.hpp.