SDSL 3.0.3
Succinct Data Structure Library
Loading...
Searching...
No Matches
sdsl::vlc_vector< t_coder, t_dens, t_width > Class Template Reference

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_vectoriterator
 
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_vectoroperator= (vlc_vector const &)=default
 
vlc_vectoroperator= (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
 

Detailed Description

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
class sdsl::vlc_vector< t_coder, t_dens, t_width >

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.

Template Parameters
t_coderType of self-delimiting coder.
t_densSampling density of pointers into the stream of self-delimiting coded numbers.
t_widthWidth of the underlying int_vector for the pointers.

Definition at line 53 of file vlc_vector.hpp.

Member Typedef Documentation

◆ coder

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
t_coder sdsl::vlc_vector< t_coder, t_dens, t_width >::coder

Definition at line 67 of file vlc_vector.hpp.

◆ const_iterator

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
iterator sdsl::vlc_vector< t_coder, t_dens, t_width >::const_iterator

Definition at line 61 of file vlc_vector.hpp.

◆ const_pointer

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
value_type const* sdsl::vlc_vector< t_coder, t_dens, t_width >::const_pointer

Definition at line 64 of file vlc_vector.hpp.

◆ const_reference

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
const value_type sdsl::vlc_vector< t_coder, t_dens, t_width >::const_reference

Definition at line 63 of file vlc_vector.hpp.

◆ difference_type

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
ptrdiff_t sdsl::vlc_vector< t_coder, t_dens, t_width >::difference_type

Definition at line 65 of file vlc_vector.hpp.

◆ index_category

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
iv_tag sdsl::vlc_vector< t_coder, t_dens, t_width >::index_category

Definition at line 68 of file vlc_vector.hpp.

◆ int_vector_type

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
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.

◆ iterator

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
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.

◆ reference

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
const value_type sdsl::vlc_vector< t_coder, t_dens, t_width >::reference

Definition at line 62 of file vlc_vector.hpp.

◆ size_type

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
int_vector ::size_type sdsl::vlc_vector< t_coder, t_dens, t_width >::size_type

Definition at line 66 of file vlc_vector.hpp.

◆ value_type

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
uint64_t sdsl::vlc_vector< t_coder, t_dens, t_width >::value_type

Definition at line 59 of file vlc_vector.hpp.

Constructor & Destructor Documentation

◆ vlc_vector() [1/5]

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
sdsl::vlc_vector< t_coder, t_dens, t_width >::vlc_vector ( )
default

◆ vlc_vector() [2/5]

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
sdsl::vlc_vector< t_coder, t_dens, t_width >::vlc_vector ( vlc_vector< t_coder, t_dens, t_width > const & )
default

◆ vlc_vector() [3/5]

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
sdsl::vlc_vector< t_coder, t_dens, t_width >::vlc_vector ( vlc_vector< t_coder, t_dens, t_width > && )
default

◆ vlc_vector() [4/5]

template<class t_coder , uint32_t t_dens, uint8_t t_width>
template<class Container >
sdsl::vlc_vector< t_coder, t_dens, t_width >::vlc_vector ( Container const & c)

Constructor for a Container of unsigned integers.

Parameters
cA container of unsigned integers.
Precondition
No two adjacent values should be equal.

Definition at line 196 of file vlc_vector.hpp.

◆ vlc_vector() [5/5]

template<class t_coder , uint32_t t_dens, uint8_t t_width>
template<uint8_t int_width>
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.

Member Function Documentation

◆ begin()

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
const const_iterator sdsl::vlc_vector< t_coder, t_dens, t_width >::begin ( ) const
inline

Iterator that points to the first element of the vlc_vector.

Definition at line 124 of file vlc_vector.hpp.

◆ CEREAL_LOAD_FUNCTION_NAME()

template<class t_coder , uint32_t t_dens, uint8_t t_width>
template<typename archive_t >
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.

◆ CEREAL_SAVE_FUNCTION_NAME()

template<class t_coder , uint32_t t_dens, uint8_t t_width>
template<typename archive_t >
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.

◆ empty()

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
bool sdsl::vlc_vector< t_coder, t_dens, t_width >::empty ( ) const
inline

Returns if the vlc_vector is empty.

Definition at line 118 of file vlc_vector.hpp.

◆ end()

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
const const_iterator sdsl::vlc_vector< t_coder, t_dens, t_width >::end ( ) const
inline

Iterator that points to the position after the last element of the vlc_vector.

Definition at line 130 of file vlc_vector.hpp.

◆ get_sample_dens()

template<class t_coder , uint32_t t_dens, uint8_t t_width>
uint32_t sdsl::vlc_vector< t_coder, t_dens, t_width >::get_sample_dens ( ) const
inline

Definition at line 170 of file vlc_vector.hpp.

◆ load()

template<class t_coder , uint32_t t_dens, uint8_t t_width>
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.

◆ max_size()

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
static size_type sdsl::vlc_vector< t_coder, t_dens, t_width >::max_size ( )
inlinestatic

Return the largest size that this container can ever have.

Definition at line 112 of file vlc_vector.hpp.

◆ operator!=()

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
bool sdsl::vlc_vector< t_coder, t_dens, t_width >::operator!= ( vlc_vector< t_coder, t_dens, t_width > const & v) const
inline

Definition at line 140 of file vlc_vector.hpp.

◆ operator=() [1/2]

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
vlc_vector & sdsl::vlc_vector< t_coder, t_dens, t_width >::operator= ( vlc_vector< t_coder, t_dens, t_width > && )
default

◆ operator=() [2/2]

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
vlc_vector & sdsl::vlc_vector< t_coder, t_dens, t_width >::operator= ( vlc_vector< t_coder, t_dens, t_width > const & )
default

◆ operator==()

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
bool sdsl::vlc_vector< t_coder, t_dens, t_width >::operator== ( vlc_vector< t_coder, t_dens, t_width > const & v) const
inline

Definition at line 135 of file vlc_vector.hpp.

◆ operator[]()

template<class t_coder , uint32_t t_dens, uint8_t t_width>
vlc_vector< t_coder, t_dens, t_width >::value_type sdsl::vlc_vector< t_coder, t_dens, t_width >::operator[] ( size_type i) const
inline

[]-operator

Definition at line 186 of file vlc_vector.hpp.

◆ sample()

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
value_type sdsl::vlc_vector< t_coder, t_dens, t_width >::sample ( const size_type i) const

Returns the ith sample of vlc_vector.

◆ serialize()

template<class t_coder , uint32_t t_dens, uint8_t t_width>
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.

◆ set_sample_dens()

template<class t_coder , uint32_t t_dens, uint8_t t_width>
void sdsl::vlc_vector< t_coder, t_dens, t_width >::set_sample_dens ( const uint32_t sdens)
inline

Definition at line 179 of file vlc_vector.hpp.

◆ size()

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
size_type sdsl::vlc_vector< t_coder, t_dens, t_width >::size ( ) const
inline

The number of elements in the vlc_vector.

Definition at line 107 of file vlc_vector.hpp.

Member Data Documentation

◆ m_z

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
bit_vector sdsl::vlc_vector< t_coder, t_dens, t_width >::m_z

Definition at line 72 of file vlc_vector.hpp.

◆ sample_dens

template<class t_coder = coder::elias_delta<>, uint32_t t_dens = 128, uint8_t t_width = 0>
const uint32_t sdsl::vlc_vector< t_coder, t_dens, t_width >::sample_dens = t_dens
static

Definition at line 71 of file vlc_vector.hpp.


The documentation for this class was generated from the following file: