tudocomp
– The TU Dortmund Compression Framework
tdc::int_vector::IntVector< T > Class Template Reference

A vector over arbitrary unsigned integer types. More...

#include <IntVector.hpp>

Inheritance diagram for tdc::int_vector::IntVector< T >:
tdc::ArrayDS tdc::ISAFromSA tdc::LCPFromPLCP tdc::PhiFromSA tdc::PLCPFromPhi tdc::SADivSufSort

Public Types

typedef IntVectorTrait< T >::value_type value_type
 
typedef IntVectorTrait< T >::reference reference
 
typedef IntVectorTrait< T >::const_reference const_reference
 
typedef IntVectorTrait< T >::pointer pointer
 
typedef IntVectorTrait< T >::const_pointer const_pointer
 
typedef IntVectorTrait< T >::iterator iterator
 
typedef IntVectorTrait< T >::const_iterator const_iterator
 
typedef IntVectorTrait< T >::reverse_iterator reverse_iterator
 
typedef IntVectorTrait< T >::const_reverse_iterator const_reverse_iterator
 
typedef IntVectorTrait< T >::difference_type difference_type
 
typedef IntVectorTrait< T >::size_type size_type
 
typedef IntVectorTrait< T >::internal_data_type internal_data_type
 The element type of the internal data buffer accessed with data() More...
 

Public Member Functions

 IntVector ()
 
 IntVector (size_type n)
 
 IntVector (size_type n, const value_type &val)
 
 IntVector (size_type n, const value_type &val, uint8_t width)
 
template<class InputIterator >
 IntVector (InputIterator first, InputIterator last)
 
 IntVector (const IntVector &other)
 
 IntVector (IntVector &&other)
 
 IntVector (std::initializer_list< value_type > il)
 
IntVectoroperator= (const IntVector &other)
 
IntVectoroperator= (IntVector &&other)
 
IntVectoroperator= (std::initializer_list< value_type > il)
 
iterator begin ()
 
iterator end ()
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
const_iterator begin () const
 
const_iterator end () const
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
size_type size () const
 
uint64_t bit_size () const
 
size_type max_size () const
 
uint8_t width () const
 
void width (uint8_t w)
 
void resize (size_type n)
 
void resize (size_type n, const value_type &val)
 
void resize (size_type n, const value_type &val, uint8_t w)
 
size_type capacity () const
 
uint64_t bit_capacity () const
 
bool empty () const
 
void reserve (size_type n)
 
void reserve (size_type n, uint8_t w)
 
void bit_reserve (uint64_t n)
 
void shrink_to_fit ()
 
reference operator[] (size_type n)
 
const_reference operator[] (size_type n) const
 
reference at (size_type n)
 
const_reference at (size_type n) const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
internal_data_typedata () noexcept
 
const internal_data_typedata () const noexcept
 
template<class InputIterator >
void assign (InputIterator first, InputIterator last)
 
void assign (size_type n, const value_type &val)
 
void assign (std::initializer_list< value_type > il)
 
void push_back (const value_type &val)
 
void push_back (value_type &&val)
 
void pop_back ()
 
iterator insert (const_iterator position, const value_type &val)
 
iterator insert (const_iterator position, size_type n, const value_type &val)
 
template<class InputIterator >
iterator insert (const_iterator position, InputIterator first, InputIterator last)
 
iterator insert (const_iterator position, value_type &&val)
 
iterator insert (const_iterator position, std::initializer_list< value_type > il)
 
iterator erase (const_iterator position)
 
iterator erase (const_iterator first, const_iterator last)
 
void swap (IntVector &other)
 
void clear ()
 
template<class... Args>
iterator emplace (const_iterator position, Args &&... args)
 
template<class... Args>
void emplace_back (Args &&... args)
 

Static Public Member Functions

static constexpr ElementStorageMode element_storage_mode ()
 

Friends

template<class U >
bool operator== (const IntVector< U > &lhs, const IntVector< U > &rhs)
 
template<class U >
bool operator!= (const IntVector< U > &lhs, const IntVector< U > &rhs)
 
template<class U >
bool operator< (const IntVector< U > &lhs, const IntVector< U > &rhs)
 
template<class U >
bool operator<= (const IntVector< U > &lhs, const IntVector< U > &rhs)
 
template<class U >
bool operator> (const IntVector< U > &lhs, const IntVector< U > &rhs)
 
template<class U >
bool operator>= (const IntVector< U > &lhs, const IntVector< U > &rhs)
 
template<class U >
void swap (IntVector< U > &lhs, IntVector< U > &rhs)
 

Detailed Description

template<class T>
class tdc::int_vector::IntVector< T >

A vector over arbitrary unsigned integer types.

The API behaves mostly identical to std::vector<T>.

Only divergences are the following specializations:

In both cases, the bits of each integer will be packed efficiently next to each other, as opposed to the padding introduced if stored in a std::vector.

In the dynamic_t case, the bit with of an integer can be changed at runtime, in all other cases the corresponding methods will throw.

Definition at line 175 of file IntVector.hpp.

Member Typedef Documentation

◆ const_iterator

template<class T>
typedef IntVectorTrait<T>::const_iterator tdc::int_vector::IntVector< T >::const_iterator

Definition at line 184 of file IntVector.hpp.

◆ const_pointer

template<class T>
typedef IntVectorTrait<T>::const_pointer tdc::int_vector::IntVector< T >::const_pointer

Definition at line 182 of file IntVector.hpp.

◆ const_reference

template<class T>
typedef IntVectorTrait<T>::const_reference tdc::int_vector::IntVector< T >::const_reference

Definition at line 180 of file IntVector.hpp.

◆ const_reverse_iterator

template<class T>
typedef IntVectorTrait<T>::const_reverse_iterator tdc::int_vector::IntVector< T >::const_reverse_iterator

Definition at line 186 of file IntVector.hpp.

◆ difference_type

template<class T>
typedef IntVectorTrait<T>::difference_type tdc::int_vector::IntVector< T >::difference_type

Definition at line 187 of file IntVector.hpp.

◆ internal_data_type

template<class T>
typedef IntVectorTrait<T>::internal_data_type tdc::int_vector::IntVector< T >::internal_data_type

The element type of the internal data buffer accessed with data()

Definition at line 191 of file IntVector.hpp.

◆ iterator

template<class T>
typedef IntVectorTrait<T>::iterator tdc::int_vector::IntVector< T >::iterator

Definition at line 183 of file IntVector.hpp.

◆ pointer

template<class T>
typedef IntVectorTrait<T>::pointer tdc::int_vector::IntVector< T >::pointer

Definition at line 181 of file IntVector.hpp.

◆ reference

template<class T>
typedef IntVectorTrait<T>::reference tdc::int_vector::IntVector< T >::reference

Definition at line 179 of file IntVector.hpp.

◆ reverse_iterator

template<class T>
typedef IntVectorTrait<T>::reverse_iterator tdc::int_vector::IntVector< T >::reverse_iterator

Definition at line 185 of file IntVector.hpp.

◆ size_type

template<class T>
typedef IntVectorTrait<T>::size_type tdc::int_vector::IntVector< T >::size_type

Definition at line 188 of file IntVector.hpp.

◆ value_type

template<class T>
typedef IntVectorTrait<T>::value_type tdc::int_vector::IntVector< T >::value_type

Definition at line 178 of file IntVector.hpp.

Constructor & Destructor Documentation

◆ IntVector() [1/8]

template<class T>
tdc::int_vector::IntVector< T >::IntVector ( )
inlineexplicit

Definition at line 200 of file IntVector.hpp.

◆ IntVector() [2/8]

template<class T>
tdc::int_vector::IntVector< T >::IntVector ( size_type  n)
inlineexplicit

Definition at line 203 of file IntVector.hpp.

◆ IntVector() [3/8]

template<class T>
tdc::int_vector::IntVector< T >::IntVector ( size_type  n,
const value_type val 
)
inline

Definition at line 204 of file IntVector.hpp.

◆ IntVector() [4/8]

template<class T>
tdc::int_vector::IntVector< T >::IntVector ( size_type  n,
const value_type val,
uint8_t  width 
)
inline

Definition at line 205 of file IntVector.hpp.

◆ IntVector() [5/8]

template<class T>
template<class InputIterator >
tdc::int_vector::IntVector< T >::IntVector ( InputIterator  first,
InputIterator  last 
)
inline

Definition at line 210 of file IntVector.hpp.

◆ IntVector() [6/8]

template<class T>
tdc::int_vector::IntVector< T >::IntVector ( const IntVector< T > &  other)
inline

Definition at line 213 of file IntVector.hpp.

◆ IntVector() [7/8]

template<class T>
tdc::int_vector::IntVector< T >::IntVector ( IntVector< T > &&  other)
inline

Definition at line 216 of file IntVector.hpp.

◆ IntVector() [8/8]

template<class T>
tdc::int_vector::IntVector< T >::IntVector ( std::initializer_list< value_type il)
inline

Definition at line 219 of file IntVector.hpp.

Member Function Documentation

◆ assign() [1/3]

template<class T>
template<class InputIterator >
void tdc::int_vector::IntVector< T >::assign ( InputIterator  first,
InputIterator  last 
)
inline

Definition at line 414 of file IntVector.hpp.

◆ assign() [2/3]

template<class T>
void tdc::int_vector::IntVector< T >::assign ( size_type  n,
const value_type val 
)
inline

Definition at line 418 of file IntVector.hpp.

◆ assign() [3/3]

template<class T>
void tdc::int_vector::IntVector< T >::assign ( std::initializer_list< value_type il)
inline

Definition at line 422 of file IntVector.hpp.

◆ at() [1/2]

template<class T>
reference tdc::int_vector::IntVector< T >::at ( size_type  n)
inline

Definition at line 381 of file IntVector.hpp.

◆ at() [2/2]

template<class T>
const_reference tdc::int_vector::IntVector< T >::at ( size_type  n) const
inline

Definition at line 385 of file IntVector.hpp.

◆ back() [1/2]

template<class T>
reference tdc::int_vector::IntVector< T >::back ( )
inline

Definition at line 397 of file IntVector.hpp.

◆ back() [2/2]

template<class T>
const_reference tdc::int_vector::IntVector< T >::back ( ) const
inline

Definition at line 401 of file IntVector.hpp.

◆ begin() [1/2]

template<class T>
iterator tdc::int_vector::IntVector< T >::begin ( )
inline

Definition at line 236 of file IntVector.hpp.

◆ begin() [2/2]

template<class T>
const_iterator tdc::int_vector::IntVector< T >::begin ( ) const
inline

Definition at line 252 of file IntVector.hpp.

◆ bit_capacity()

template<class T>
uint64_t tdc::int_vector::IntVector< T >::bit_capacity ( ) const
inline

Definition at line 349 of file IntVector.hpp.

◆ bit_reserve()

template<class T>
void tdc::int_vector::IntVector< T >::bit_reserve ( uint64_t  n)
inline

Definition at line 365 of file IntVector.hpp.

◆ bit_size()

template<class T>
uint64_t tdc::int_vector::IntVector< T >::bit_size ( ) const
inline

Definition at line 288 of file IntVector.hpp.

◆ capacity()

template<class T>
size_type tdc::int_vector::IntVector< T >::capacity ( ) const
inline

Definition at line 345 of file IntVector.hpp.

◆ cbegin()

template<class T>
const_iterator tdc::int_vector::IntVector< T >::cbegin ( ) const
inline

Definition at line 268 of file IntVector.hpp.

◆ cend()

template<class T>
const_iterator tdc::int_vector::IntVector< T >::cend ( ) const
inline

Definition at line 272 of file IntVector.hpp.

◆ clear()

template<class T>
void tdc::int_vector::IntVector< T >::clear ( )
inline

Definition at line 471 of file IntVector.hpp.

◆ crbegin()

template<class T>
const_reverse_iterator tdc::int_vector::IntVector< T >::crbegin ( ) const
inline

Definition at line 276 of file IntVector.hpp.

◆ crend()

template<class T>
const_reverse_iterator tdc::int_vector::IntVector< T >::crend ( ) const
inline

Definition at line 280 of file IntVector.hpp.

◆ data() [1/2]

template<class T>
internal_data_type* tdc::int_vector::IntVector< T >::data ( )
inlinenoexcept

Definition at line 405 of file IntVector.hpp.

◆ data() [2/2]

template<class T>
const internal_data_type* tdc::int_vector::IntVector< T >::data ( ) const
inlinenoexcept

Definition at line 409 of file IntVector.hpp.

◆ element_storage_mode()

template<class T>
static constexpr ElementStorageMode tdc::int_vector::IntVector< T >::element_storage_mode ( )
inlinestatic

Definition at line 193 of file IntVector.hpp.

◆ emplace()

template<class T>
template<class... Args>
iterator tdc::int_vector::IntVector< T >::emplace ( const_iterator  position,
Args &&...  args 
)
inline

Definition at line 476 of file IntVector.hpp.

◆ emplace_back()

template<class T>
template<class... Args>
void tdc::int_vector::IntVector< T >::emplace_back ( Args &&...  args)
inline

Definition at line 481 of file IntVector.hpp.

◆ empty()

template<class T>
bool tdc::int_vector::IntVector< T >::empty ( ) const
inline

Definition at line 353 of file IntVector.hpp.

◆ end() [1/2]

template<class T>
iterator tdc::int_vector::IntVector< T >::end ( )
inline

Definition at line 240 of file IntVector.hpp.

◆ end() [2/2]

template<class T>
const_iterator tdc::int_vector::IntVector< T >::end ( ) const
inline

Definition at line 256 of file IntVector.hpp.

◆ erase() [1/2]

template<class T>
iterator tdc::int_vector::IntVector< T >::erase ( const_iterator  position)
inline

Definition at line 459 of file IntVector.hpp.

◆ erase() [2/2]

template<class T>
iterator tdc::int_vector::IntVector< T >::erase ( const_iterator  first,
const_iterator  last 
)
inline

Definition at line 463 of file IntVector.hpp.

◆ front() [1/2]

template<class T>
reference tdc::int_vector::IntVector< T >::front ( )
inline

Definition at line 389 of file IntVector.hpp.

◆ front() [2/2]

template<class T>
const_reference tdc::int_vector::IntVector< T >::front ( ) const
inline

Definition at line 393 of file IntVector.hpp.

◆ insert() [1/5]

template<class T>
iterator tdc::int_vector::IntVector< T >::insert ( const_iterator  position,
const value_type val 
)
inline

Definition at line 438 of file IntVector.hpp.

◆ insert() [2/5]

template<class T>
iterator tdc::int_vector::IntVector< T >::insert ( const_iterator  position,
size_type  n,
const value_type val 
)
inline

Definition at line 442 of file IntVector.hpp.

◆ insert() [3/5]

template<class T>
template<class InputIterator >
iterator tdc::int_vector::IntVector< T >::insert ( const_iterator  position,
InputIterator  first,
InputIterator  last 
)
inline

Definition at line 447 of file IntVector.hpp.

◆ insert() [4/5]

template<class T>
iterator tdc::int_vector::IntVector< T >::insert ( const_iterator  position,
value_type &&  val 
)
inline

Definition at line 451 of file IntVector.hpp.

◆ insert() [5/5]

template<class T>
iterator tdc::int_vector::IntVector< T >::insert ( const_iterator  position,
std::initializer_list< value_type il 
)
inline

Definition at line 455 of file IntVector.hpp.

◆ max_size()

template<class T>
size_type tdc::int_vector::IntVector< T >::max_size ( ) const
inline

Definition at line 292 of file IntVector.hpp.

◆ operator=() [1/3]

template<class T>
IntVector& tdc::int_vector::IntVector< T >::operator= ( const IntVector< T > &  other)
inline

Definition at line 221 of file IntVector.hpp.

◆ operator=() [2/3]

template<class T>
IntVector& tdc::int_vector::IntVector< T >::operator= ( IntVector< T > &&  other)
inline

Definition at line 226 of file IntVector.hpp.

◆ operator=() [3/3]

template<class T>
IntVector& tdc::int_vector::IntVector< T >::operator= ( std::initializer_list< value_type il)
inline

Definition at line 231 of file IntVector.hpp.

◆ operator[]() [1/2]

template<class T>
reference tdc::int_vector::IntVector< T >::operator[] ( size_type  n)
inline

Definition at line 373 of file IntVector.hpp.

◆ operator[]() [2/2]

template<class T>
const_reference tdc::int_vector::IntVector< T >::operator[] ( size_type  n) const
inline

Definition at line 377 of file IntVector.hpp.

◆ pop_back()

template<class T>
void tdc::int_vector::IntVector< T >::pop_back ( )
inline

Definition at line 434 of file IntVector.hpp.

◆ push_back() [1/2]

template<class T>
void tdc::int_vector::IntVector< T >::push_back ( const value_type val)
inline

Definition at line 426 of file IntVector.hpp.

◆ push_back() [2/2]

template<class T>
void tdc::int_vector::IntVector< T >::push_back ( value_type &&  val)
inline

Definition at line 430 of file IntVector.hpp.

◆ rbegin() [1/2]

template<class T>
reverse_iterator tdc::int_vector::IntVector< T >::rbegin ( )
inline

Definition at line 244 of file IntVector.hpp.

◆ rbegin() [2/2]

template<class T>
const_reverse_iterator tdc::int_vector::IntVector< T >::rbegin ( ) const
inline

Definition at line 260 of file IntVector.hpp.

◆ rend() [1/2]

template<class T>
reverse_iterator tdc::int_vector::IntVector< T >::rend ( )
inline

Definition at line 248 of file IntVector.hpp.

◆ rend() [2/2]

template<class T>
const_reverse_iterator tdc::int_vector::IntVector< T >::rend ( ) const
inline

Definition at line 264 of file IntVector.hpp.

◆ reserve() [1/2]

template<class T>
void tdc::int_vector::IntVector< T >::reserve ( size_type  n)
inline

Definition at line 357 of file IntVector.hpp.

◆ reserve() [2/2]

template<class T>
void tdc::int_vector::IntVector< T >::reserve ( size_type  n,
uint8_t  w 
)
inline

Definition at line 361 of file IntVector.hpp.

◆ resize() [1/3]

template<class T>
void tdc::int_vector::IntVector< T >::resize ( size_type  n)
inline

Definition at line 327 of file IntVector.hpp.

◆ resize() [2/3]

template<class T>
void tdc::int_vector::IntVector< T >::resize ( size_type  n,
const value_type val 
)
inline

Definition at line 333 of file IntVector.hpp.

◆ resize() [3/3]

template<class T>
void tdc::int_vector::IntVector< T >::resize ( size_type  n,
const value_type val,
uint8_t  w 
)
inline

Definition at line 339 of file IntVector.hpp.

◆ shrink_to_fit()

template<class T>
void tdc::int_vector::IntVector< T >::shrink_to_fit ( )
inline

Definition at line 369 of file IntVector.hpp.

◆ size()

template<class T>
size_type tdc::int_vector::IntVector< T >::size ( ) const
inline

Definition at line 284 of file IntVector.hpp.

◆ swap()

template<class T>
void tdc::int_vector::IntVector< T >::swap ( IntVector< T > &  other)
inline

Definition at line 467 of file IntVector.hpp.

◆ width() [1/2]

template<class T>
uint8_t tdc::int_vector::IntVector< T >::width ( ) const
inline

Definition at line 296 of file IntVector.hpp.

◆ width() [2/2]

template<class T>
void tdc::int_vector::IntVector< T >::width ( uint8_t  w)
inline

Definition at line 300 of file IntVector.hpp.

Friends And Related Function Documentation

◆ operator!=

template<class T>
template<class U >
bool operator!= ( const IntVector< U > &  lhs,
const IntVector< U > &  rhs 
)
friend

◆ operator<

template<class T>
template<class U >
bool operator< ( const IntVector< U > &  lhs,
const IntVector< U > &  rhs 
)
friend

◆ operator<=

template<class T>
template<class U >
bool operator<= ( const IntVector< U > &  lhs,
const IntVector< U > &  rhs 
)
friend

◆ operator==

template<class T>
template<class U >
bool operator== ( const IntVector< U > &  lhs,
const IntVector< U > &  rhs 
)
friend

◆ operator>

template<class T>
template<class U >
bool operator> ( const IntVector< U > &  lhs,
const IntVector< U > &  rhs 
)
friend

◆ operator>=

template<class T>
template<class U >
bool operator>= ( const IntVector< U > &  lhs,
const IntVector< U > &  rhs 
)
friend

◆ swap

template<class T>
template<class U >
void swap ( IntVector< U > &  lhs,
IntVector< U > &  rhs 
)
friend

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