SDSL 3.0.1
Succinct Data Structure Library
|
A generic immutable space-saving vector class for unsigned integers. More...
#include <vlc_vector.hpp>
Public Types | |
typedef uint64_t | value_type |
typedef random_access_const_iterator< vlc_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 iv_tag | index_category |
typedef vlc_vector_trait< t_width >::int_vector_type | int_vector_type |
Public Member Functions | |
vlc_vector ()=default | |
vlc_vector (const vlc_vector &)=default | |
vlc_vector (vlc_vector &&)=default | |
vlc_vector & | operator= (const vlc_vector &)=default |
vlc_vector & | operator= (vlc_vector &&)=default |
template<class Container > | |
vlc_vector (const Container &c) | |
Constructor for a Container of unsigned integers. More... | |
template<uint8_t int_width> | |
vlc_vector (int_vector_buffer< int_width > &v_buf) | |
Constructor for an int_vector_buffer of unsigned integers. More... | |
size_type | size () const |
The number of elements in the vlc_vector. More... | |
bool | empty () const |
Returns if the vlc_vector is empty. More... | |
const const_iterator | begin () const |
Iterator that points to the first element of the vlc_vector. More... | |
const const_iterator | end () const |
Iterator that points to the position after the last element of the vlc_vector. More... | |
bool | operator== (const vlc_vector &v) const |
bool | operator!= (const vlc_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 |
Serializes the vlc_vector to a stream. More... | |
void | load (std::istream &in) |
Load the vlc_vector from a stream. More... | |
template<typename archive_t > | |
void | CEREAL_SAVE_FUNCTION_NAME (archive_t &ar) const |
Serialise (save) via cereal. More... | |
template<typename archive_t > | |
void | CEREAL_LOAD_FUNCTION_NAME (archive_t &ar) |
Serialise (load) via cereal. More... | |
value_type | sample (const size_type i) const |
Returns the ith sample of vlc_vector. More... | |
uint32_t | get_sample_dens () const |
void | set_sample_dens (const uint32_t sdens) |
Static Public Member Functions | |
static size_type | max_size () |
Return the largest size that this container can ever have. More... | |
Public Attributes | |
bit_vector | m_z |
Static Public Attributes | |
static const uint32_t | sample_dens = t_dens |
A generic immutable space-saving vector class for unsigned integers.
The values of a vlc_vector are immutable after the constructor call. The class could be parametrized with a self-delimiting code t_coder and the sample density.
t_coder | Type of self-delimiting coder. |
t_dens | Sampling density of pointers into the stream of self-delimiting coded numbers. |
t_width | Width of the underlying int_vector for the pointers. |
Definition at line 39 of file vlc_vector.hpp.
typedef t_coder sdsl::vlc_vector< t_coder, t_dens, t_width >::coder |
Definition at line 53 of file vlc_vector.hpp.
typedef iterator sdsl::vlc_vector< t_coder, t_dens, t_width >::const_iterator |
Definition at line 47 of file vlc_vector.hpp.
typedef const value_type* sdsl::vlc_vector< t_coder, t_dens, t_width >::const_pointer |
Definition at line 50 of file vlc_vector.hpp.
typedef const value_type sdsl::vlc_vector< t_coder, t_dens, t_width >::const_reference |
Definition at line 49 of file vlc_vector.hpp.
typedef ptrdiff_t sdsl::vlc_vector< t_coder, t_dens, t_width >::difference_type |
Definition at line 51 of file vlc_vector.hpp.
typedef iv_tag sdsl::vlc_vector< t_coder, t_dens, t_width >::index_category |
Definition at line 54 of file vlc_vector.hpp.
typedef vlc_vector_trait<t_width>::int_vector_type sdsl::vlc_vector< t_coder, t_dens, t_width >::int_vector_type |
Definition at line 55 of file vlc_vector.hpp.
typedef random_access_const_iterator<vlc_vector> sdsl::vlc_vector< t_coder, t_dens, t_width >::iterator |
Definition at line 46 of file vlc_vector.hpp.
typedef const value_type sdsl::vlc_vector< t_coder, t_dens, t_width >::reference |
Definition at line 48 of file vlc_vector.hpp.
typedef int_vector ::size_type sdsl::vlc_vector< t_coder, t_dens, t_width >::size_type |
Definition at line 52 of file vlc_vector.hpp.
typedef uint64_t sdsl::vlc_vector< t_coder, t_dens, t_width >::value_type |
Definition at line 45 of file vlc_vector.hpp.
|
default |
|
default |
|
default |
sdsl::vlc_vector< t_coder, t_dens, t_width >::vlc_vector | ( | const Container & | c | ) |
Constructor for a Container of unsigned integers.
c | A container of unsigned integers. |
Definition at line 163 of file vlc_vector.hpp.
sdsl::vlc_vector< t_coder, t_dens, t_width >::vlc_vector | ( | int_vector_buffer< int_width > & | v_buf | ) |
Constructor for an int_vector_buffer of unsigned integers.
Definition at line 200 of file vlc_vector.hpp.
|
inline |
Iterator that points to the first element of the vlc_vector.
Definition at line 100 of file vlc_vector.hpp.
void sdsl::vlc_vector< t_coder, t_dens, t_width >::CEREAL_LOAD_FUNCTION_NAME | ( | archive_t & | ar | ) |
Serialise (load) via cereal.
Definition at line 274 of file vlc_vector.hpp.
void sdsl::vlc_vector< t_coder, t_dens, t_width >::CEREAL_SAVE_FUNCTION_NAME | ( | archive_t & | ar | ) | const |
Serialise (save) via cereal.
Definition at line 265 of file vlc_vector.hpp.
|
inline |
Returns if the vlc_vector is empty.
Definition at line 97 of file vlc_vector.hpp.
|
inline |
Iterator that points to the position after the last element of the vlc_vector.
Definition at line 103 of file vlc_vector.hpp.
|
inline |
Definition at line 137 of file vlc_vector.hpp.
void sdsl::vlc_vector< t_coder, t_dens, t_width >::load | ( | std::istream & | in | ) |
Load the vlc_vector from a stream.
Definition at line 256 of file vlc_vector.hpp.
|
inlinestatic |
Return the largest size that this container can ever have.
Definition at line 94 of file vlc_vector.hpp.
|
inline |
Definition at line 110 of file vlc_vector.hpp.
|
default |
|
default |
|
inline |
Definition at line 105 of file vlc_vector.hpp.
|
inline |
[]-operator
Definition at line 152 of file vlc_vector.hpp.
value_type sdsl::vlc_vector< t_coder, t_dens, t_width >::sample | ( | const size_type | i | ) | const |
Returns the ith sample of vlc_vector.
vlc_vector::size_type sdsl::vlc_vector< t_coder, t_dens, t_width >::serialize | ( | std::ostream & | out, |
structure_tree_node * | v = nullptr , |
||
std::string | name = "" |
||
) | const |
Serializes the vlc_vector to a stream.
Definition at line 242 of file vlc_vector.hpp.
|
inline |
Definition at line 146 of file vlc_vector.hpp.
|
inline |
The number of elements in the vlc_vector.
Definition at line 92 of file vlc_vector.hpp.
bit_vector sdsl::vlc_vector< t_coder, t_dens, t_width >::m_z |
Definition at line 58 of file vlc_vector.hpp.
|
static |
Definition at line 57 of file vlc_vector.hpp.