Project
Loading...
Searching...
No Matches
o2::rans::internal::SparseVector< source_T, value_T > Class Template Reference

#include <SparseVector.h>

Public Types

using source_type = source_T
 
using value_type = value_T
 
using bucket_type = std::vector< value_type >
 
using container_type = std::vector< bucket_type >
 
using size_type = size_t
 
using difference_type = std::ptrdiff_t
 
using reference = value_type &
 
using const_reference = const value_type &
 
using pointer = value_type *
 
using const_pointer = const value_type *
 
using iterator = SparseVectorIterator< this_type >
 
using const_iterator = SparseVectorIterator< const this_type >
 

Public Member Functions

 SparseVector (const_reference neutralElement={})
 
 SparseVector (const SparseVector &other)
 
 SparseVector (SparseVector &&other)=default
 
SparseVectoroperator= (const SparseVector &other)
 
SparseVectoroperator= (SparseVector &&other)=default
 
 ~SparseVector ()=default
 
const_reference operator[] (source_type sourceSymbol) const
 
reference operator[] (source_type sourceSymbol)
 
const_reference at (source_type sourceSymbol) const
 
reference at (source_type sourceSymbol)
 
size_type size () const noexcept
 
bool empty () const noexcept
 
bucket_typedata () noexcept
 
const bucket_typedata () const noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
const_iterator begin () const noexcept
 
const_iterator end () const noexcept
 
iterator begin () noexcept
 
iterator end () noexcept
 
container_type release () &&noexcept
 
void swap (SparseVector &a, SparseVector &b)
 

Static Public Member Functions

static constexpr source_type getOffset () noexcept
 
static size_type getBucketSize () noexcept
 
static size_type getNBuckets () noexcept
 
static constexpr std::pair< uint32_t, uint32_t > splitIndex (source_type sourceSymbol) noexcept
 
static constexpr source_type joinIndex (std::uint32_t lutID, std::uint32_t bucketID) noexcept
 

Detailed Description

template<class source_T, class value_T>
class o2::rans::internal::SparseVector< source_T, value_T >

Definition at line 37 of file SparseVector.h.

Member Typedef Documentation

◆ bucket_type

template<class source_T , class value_T >
using o2::rans::internal::SparseVector< source_T, value_T >::bucket_type = std::vector<value_type>

Definition at line 44 of file SparseVector.h.

◆ const_iterator

template<class source_T , class value_T >
using o2::rans::internal::SparseVector< source_T, value_T >::const_iterator = SparseVectorIterator<const this_type>

Definition at line 53 of file SparseVector.h.

◆ const_pointer

template<class source_T , class value_T >
using o2::rans::internal::SparseVector< source_T, value_T >::const_pointer = const value_type*

Definition at line 51 of file SparseVector.h.

◆ const_reference

template<class source_T , class value_T >
using o2::rans::internal::SparseVector< source_T, value_T >::const_reference = const value_type&

Definition at line 49 of file SparseVector.h.

◆ container_type

template<class source_T , class value_T >
using o2::rans::internal::SparseVector< source_T, value_T >::container_type = std::vector<bucket_type>

Definition at line 45 of file SparseVector.h.

◆ difference_type

template<class source_T , class value_T >
using o2::rans::internal::SparseVector< source_T, value_T >::difference_type = std::ptrdiff_t

Definition at line 47 of file SparseVector.h.

◆ iterator

template<class source_T , class value_T >
using o2::rans::internal::SparseVector< source_T, value_T >::iterator = SparseVectorIterator<this_type>

Definition at line 52 of file SparseVector.h.

◆ pointer

template<class source_T , class value_T >
using o2::rans::internal::SparseVector< source_T, value_T >::pointer = value_type*

Definition at line 50 of file SparseVector.h.

◆ reference

template<class source_T , class value_T >
using o2::rans::internal::SparseVector< source_T, value_T >::reference = value_type&

Definition at line 48 of file SparseVector.h.

◆ size_type

template<class source_T , class value_T >
using o2::rans::internal::SparseVector< source_T, value_T >::size_type = size_t

Definition at line 46 of file SparseVector.h.

◆ source_type

template<class source_T , class value_T >
using o2::rans::internal::SparseVector< source_T, value_T >::source_type = source_T

Definition at line 42 of file SparseVector.h.

◆ value_type

template<class source_T , class value_T >
using o2::rans::internal::SparseVector< source_T, value_T >::value_type = value_T

Definition at line 43 of file SparseVector.h.

Constructor & Destructor Documentation

◆ SparseVector() [1/3]

template<class source_T , class value_T >
o2::rans::internal::SparseVector< source_T, value_T >::SparseVector ( const_reference  neutralElement = {})
inlineexplicit

Definition at line 62 of file SparseVector.h.

◆ SparseVector() [2/3]

template<class source_T , class value_T >
o2::rans::internal::SparseVector< source_T, value_T >::SparseVector ( const SparseVector< source_T, value_T > &  other)
inline

Definition at line 67 of file SparseVector.h.

◆ SparseVector() [3/3]

template<class source_T , class value_T >
o2::rans::internal::SparseVector< source_T, value_T >::SparseVector ( SparseVector< source_T, value_T > &&  other)
default

◆ ~SparseVector()

template<class source_T , class value_T >
o2::rans::internal::SparseVector< source_T, value_T >::~SparseVector ( )
default

Member Function Documentation

◆ at() [1/2]

template<class source_T , class value_T >
reference o2::rans::internal::SparseVector< source_T, value_T >::at ( source_type  sourceSymbol)
inline

Definition at line 120 of file SparseVector.h.

◆ at() [2/2]

template<class source_T , class value_T >
const_reference o2::rans::internal::SparseVector< source_T, value_T >::at ( source_type  sourceSymbol) const
inline

Definition at line 109 of file SparseVector.h.

◆ begin() [1/2]

template<class source_T , class value_T >
const_iterator o2::rans::internal::SparseVector< source_T, value_T >::begin ( ) const
inlinenoexcept

Definition at line 136 of file SparseVector.h.

◆ begin() [2/2]

template<class source_T , class value_T >
iterator o2::rans::internal::SparseVector< source_T, value_T >::begin ( )
inlinenoexcept

Definition at line 140 of file SparseVector.h.

◆ cbegin()

template<class source_T , class value_T >
const_iterator o2::rans::internal::SparseVector< source_T, value_T >::cbegin ( ) const
inlinenoexcept

Definition at line 132 of file SparseVector.h.

◆ cend()

template<class source_T , class value_T >
const_iterator o2::rans::internal::SparseVector< source_T, value_T >::cend ( ) const
inlinenoexcept

Definition at line 134 of file SparseVector.h.

◆ data() [1/2]

template<class source_T , class value_T >
const bucket_type * o2::rans::internal::SparseVector< source_T, value_T >::data ( ) const
inlinenoexcept

Definition at line 130 of file SparseVector.h.

◆ data() [2/2]

template<class source_T , class value_T >
bucket_type * o2::rans::internal::SparseVector< source_T, value_T >::data ( )
inlinenoexcept

Definition at line 128 of file SparseVector.h.

◆ empty()

template<class source_T , class value_T >
bool o2::rans::internal::SparseVector< source_T, value_T >::empty ( ) const
inlinenoexcept

Definition at line 124 of file SparseVector.h.

◆ end() [1/2]

template<class source_T , class value_T >
const_iterator o2::rans::internal::SparseVector< source_T, value_T >::end ( ) const
inlinenoexcept

Definition at line 138 of file SparseVector.h.

◆ end() [2/2]

template<class source_T , class value_T >
iterator o2::rans::internal::SparseVector< source_T, value_T >::end ( )
inlinenoexcept

Definition at line 142 of file SparseVector.h.

◆ getBucketSize()

template<class source_T , class value_T >
static size_type o2::rans::internal::SparseVector< source_T, value_T >::getBucketSize ( )
inlinestaticnoexcept

Definition at line 146 of file SparseVector.h.

◆ getNBuckets()

template<class source_T , class value_T >
static size_type o2::rans::internal::SparseVector< source_T, value_T >::getNBuckets ( )
inlinestaticnoexcept

Definition at line 148 of file SparseVector.h.

◆ getOffset()

template<class source_T , class value_T >
static constexpr source_type o2::rans::internal::SparseVector< source_T, value_T >::getOffset ( )
inlinestaticconstexprnoexcept

Definition at line 126 of file SparseVector.h.

◆ joinIndex()

template<class source_T , class value_T >
static constexpr source_type o2::rans::internal::SparseVector< source_T, value_T >::joinIndex ( std::uint32_t  lutID,
std::uint32_t  bucketID 
)
inlinestaticconstexprnoexcept

Definition at line 166 of file SparseVector.h.

◆ operator=() [1/2]

template<class source_T , class value_T >
SparseVector & o2::rans::internal::SparseVector< source_T, value_T >::operator= ( const SparseVector< source_T, value_T > &  other)
inline

Definition at line 81 of file SparseVector.h.

◆ operator=() [2/2]

template<class source_T , class value_T >
SparseVector & o2::rans::internal::SparseVector< source_T, value_T >::operator= ( SparseVector< source_T, value_T > &&  other)
default

◆ operator[]() [1/2]

template<class source_T , class value_T >
reference o2::rans::internal::SparseVector< source_T, value_T >::operator[] ( source_type  sourceSymbol)
inline

Definition at line 97 of file SparseVector.h.

◆ operator[]() [2/2]

template<class source_T , class value_T >
const_reference o2::rans::internal::SparseVector< source_T, value_T >::operator[] ( source_type  sourceSymbol) const
inline

Definition at line 91 of file SparseVector.h.

◆ release()

template<class source_T , class value_T >
container_type o2::rans::internal::SparseVector< source_T, value_T >::release ( ) &&
inlinenoexcept

Definition at line 144 of file SparseVector.h.

◆ size()

template<class source_T , class value_T >
size_type o2::rans::internal::SparseVector< source_T, value_T >::size ( ) const
inlinenoexcept

Definition at line 122 of file SparseVector.h.

◆ splitIndex()

template<class source_T , class value_T >
static constexpr std::pair< uint32_t, uint32_t > o2::rans::internal::SparseVector< source_T, value_T >::splitIndex ( source_type  sourceSymbol)
inlinestaticconstexprnoexcept

Definition at line 150 of file SparseVector.h.

◆ swap()

template<class source_T , class value_T >
void o2::rans::internal::SparseVector< source_T, value_T >::swap ( SparseVector< source_T, value_T > &  a,
SparseVector< source_T, value_T > &  b 
)
inline

Definition at line 174 of file SparseVector.h.


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