SDSL 3.0.3
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 value_type const * | 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 (vlc_vector const &)=default | |
vlc_vector (vlc_vector &&)=default | |
vlc_vector & | operator= (vlc_vector const &)=default |
vlc_vector & | operator= (vlc_vector &&)=default |
template<class Container > | |
vlc_vector (Container const &c) | |
Constructor for a Container of unsigned integers. | |
template<uint8_t int_width> | |
vlc_vector (int_vector_buffer< int_width > &v_buf) | |
Constructor for an int_vector_buffer of unsigned integers. | |
size_type | size () const |
The number of elements in the vlc_vector. | |
bool | empty () const |
Returns if the vlc_vector is empty. | |
const const_iterator | begin () const |
Iterator that points to the first element of the vlc_vector. | |
const const_iterator | end () const |
Iterator that points to the position after the last element of the vlc_vector. | |
bool | operator== (vlc_vector const &v) const |
bool | operator!= (vlc_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 |
Serializes the vlc_vector to a stream. | |
void | load (std::istream &in) |
Load the vlc_vector from a stream. | |
template<typename archive_t > | |
void | CEREAL_SAVE_FUNCTION_NAME (archive_t &ar) const |
Serialise (save) via cereal. | |
template<typename archive_t > | |
void | CEREAL_LOAD_FUNCTION_NAME (archive_t &ar) |
Serialise (load) via cereal. | |
value_type | sample (const size_type i) const |
Returns the ith sample of vlc_vector. | |
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. | |
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 53 of file vlc_vector.hpp.
typedef t_coder sdsl::vlc_vector< t_coder, t_dens, t_width >::coder |
Definition at line 67 of file vlc_vector.hpp.
typedef iterator sdsl::vlc_vector< t_coder, t_dens, t_width >::const_iterator |
Definition at line 61 of file vlc_vector.hpp.
typedef value_type const* sdsl::vlc_vector< t_coder, t_dens, t_width >::const_pointer |
Definition at line 64 of file vlc_vector.hpp.
typedef const value_type sdsl::vlc_vector< t_coder, t_dens, t_width >::const_reference |
Definition at line 63 of file vlc_vector.hpp.
typedef ptrdiff_t sdsl::vlc_vector< t_coder, t_dens, t_width >::difference_type |
Definition at line 65 of file vlc_vector.hpp.
typedef iv_tag sdsl::vlc_vector< t_coder, t_dens, t_width >::index_category |
Definition at line 68 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 69 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 60 of file vlc_vector.hpp.
typedef const value_type sdsl::vlc_vector< t_coder, t_dens, t_width >::reference |
Definition at line 62 of file vlc_vector.hpp.
typedef int_vector ::size_type sdsl::vlc_vector< t_coder, t_dens, t_width >::size_type |
Definition at line 66 of file vlc_vector.hpp.
typedef uint64_t sdsl::vlc_vector< t_coder, t_dens, t_width >::value_type |
Definition at line 59 of file vlc_vector.hpp.
|
default |
|
default |
|
default |
sdsl::vlc_vector< t_coder, t_dens, t_width >::vlc_vector | ( | Container const & | c | ) |
Constructor for a Container of unsigned integers.
c | A container of unsigned integers. |
Definition at line 196 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 236 of file vlc_vector.hpp.
|
inline |
Iterator that points to the first element of the vlc_vector.
Definition at line 124 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 312 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 303 of file vlc_vector.hpp.
|
inline |
Returns if the vlc_vector is empty.
Definition at line 118 of file vlc_vector.hpp.
|
inline |
Iterator that points to the position after the last element of the vlc_vector.
Definition at line 130 of file vlc_vector.hpp.
|
inline |
Definition at line 170 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 294 of file vlc_vector.hpp.
|
inlinestatic |
Return the largest size that this container can ever have.
Definition at line 112 of file vlc_vector.hpp.
|
inline |
Definition at line 140 of file vlc_vector.hpp.
|
default |
|
default |
|
inline |
Definition at line 135 of file vlc_vector.hpp.
|
inline |
[]-operator
Definition at line 186 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 282 of file vlc_vector.hpp.
|
inline |
Definition at line 179 of file vlc_vector.hpp.
|
inline |
The number of elements in the vlc_vector.
Definition at line 107 of file vlc_vector.hpp.
bit_vector sdsl::vlc_vector< t_coder, t_dens, t_width >::m_z |
Definition at line 72 of file vlc_vector.hpp.
|
static |
Definition at line 71 of file vlc_vector.hpp.