Project
Loading...
Searching...
No Matches
o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V > Class Template Reference

#include <Encoder.h>

Public Types

using symbolTable_type = symbolTable_T
 
using symbol_type = typename symbolTable_T::value_type
 
using coder_type = encoder_T
 
using source_type = typename symbolTable_type::source_type
 
using stream_type = typename coder_type::stream_type
 
using size_type = std::size_t
 
using difference_type = std::ptrdiff_t
 

Public Member Functions

 Encoder ()=default
 
template<typename renormedSymbolTable_T >
 Encoder (const renormedSymbolTable_T &renormedFrequencyTable)
 
const symbolTable_typegetSymbolTable () const noexcept
 
template<typename stream_IT , typename source_IT , typename literals_IT = std::nullptr_t, std::enable_if_t< utils::isCompatibleIter_v< typename symbolTable_T::source_type, source_IT >, bool > = true>
decltype(auto) process (source_IT inputBegin, source_IT inputEnd, stream_IT outputBegin, literals_IT literalsBegin=nullptr) const
 
template<typename literals_IT = std::nullptr_t>
decltype(auto) process (gsl::span< const source_type > inputStream, gsl::span< stream_type > outputStream, literals_IT literalsBegin=nullptr) const
 

Static Public Member Functions

static constexpr size_type getNStreams () noexcept
 

Static Public Attributes

static constexpr size_type NStreams = nStreams_V
 

Protected Attributes

symbolTable_type mSymbolTable {}
 

Static Protected Attributes

static constexpr size_type NCoderStreams = coder_type::getNstreams()
 
static constexpr size_type NCoders = NStreams / NCoderStreams
 

Detailed Description

template<class encoder_T, class symbolTable_T, std::size_t nStreams_V>
class o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V >

Definition at line 50 of file Encoder.h.

Member Typedef Documentation

◆ coder_type

template<class encoder_T , class symbolTable_T , std::size_t nStreams_V>
using o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V >::coder_type = encoder_T

Definition at line 55 of file Encoder.h.

◆ difference_type

template<class encoder_T , class symbolTable_T , std::size_t nStreams_V>
using o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V >::difference_type = std::ptrdiff_t

Definition at line 59 of file Encoder.h.

◆ size_type

template<class encoder_T , class symbolTable_T , std::size_t nStreams_V>
using o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V >::size_type = std::size_t

Definition at line 58 of file Encoder.h.

◆ source_type

template<class encoder_T , class symbolTable_T , std::size_t nStreams_V>
using o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V >::source_type = typename symbolTable_type::source_type

Definition at line 56 of file Encoder.h.

◆ stream_type

template<class encoder_T , class symbolTable_T , std::size_t nStreams_V>
using o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V >::stream_type = typename coder_type::stream_type

Definition at line 57 of file Encoder.h.

◆ symbol_type

template<class encoder_T , class symbolTable_T , std::size_t nStreams_V>
using o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V >::symbol_type = typename symbolTable_T::value_type

Definition at line 54 of file Encoder.h.

◆ symbolTable_type

template<class encoder_T , class symbolTable_T , std::size_t nStreams_V>
using o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V >::symbolTable_type = symbolTable_T

Definition at line 53 of file Encoder.h.

Constructor & Destructor Documentation

◆ Encoder() [1/2]

template<class encoder_T , class symbolTable_T , std::size_t nStreams_V>
o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V >::Encoder ( )
default

◆ Encoder() [2/2]

template<class encoder_T , class symbolTable_T , std::size_t nStreams_V>
template<typename renormedSymbolTable_T >
o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V >::Encoder ( const renormedSymbolTable_T &  renormedFrequencyTable)
inline

Definition at line 66 of file Encoder.h.

Member Function Documentation

◆ getNStreams()

template<class encoder_T , class symbolTable_T , std::size_t nStreams_V>
static constexpr size_type o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V >::getNStreams ( )
inlinestaticconstexprnoexcept

Definition at line 80 of file Encoder.h.

◆ getSymbolTable()

template<class encoder_T , class symbolTable_T , std::size_t nStreams_V>
const symbolTable_type & o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V >::getSymbolTable ( ) const
inlinenoexcept

Definition at line 78 of file Encoder.h.

◆ process() [1/2]

template<class encoder_T , class symbolTable_T , std::size_t nStreams_V>
template<typename literals_IT = std::nullptr_t>
decltype(auto) o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V >::process ( gsl::span< const source_type inputStream,
gsl::span< stream_type outputStream,
literals_IT  literalsBegin = nullptr 
) const
inline

Definition at line 86 of file Encoder.h.

◆ process() [2/2]

template<class encoder_T , class symbolTable_T , std::size_t nStreams_V>
template<typename stream_IT , typename source_IT , typename literals_IT , std::enable_if_t< utils::isCompatibleIter_v< typename symbolTable_T::source_type, source_IT >, bool > >
decltype(auto) o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V >::process ( source_IT  inputBegin,
source_IT  inputEnd,
stream_IT  outputBegin,
literals_IT  literalsBegin = nullptr 
) const

Definition at line 105 of file Encoder.h.

Member Data Documentation

◆ mSymbolTable

template<class encoder_T , class symbolTable_T , std::size_t nStreams_V>
symbolTable_type o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V >::mSymbolTable {}
protected

Definition at line 92 of file Encoder.h.

◆ NCoders

template<class encoder_T , class symbolTable_T , std::size_t nStreams_V>
constexpr size_type o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V >::NCoders = NStreams / NCoderStreams
staticconstexprprotected

Definition at line 95 of file Encoder.h.

◆ NCoderStreams

template<class encoder_T , class symbolTable_T , std::size_t nStreams_V>
constexpr size_type o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V >::NCoderStreams = coder_type::getNstreams()
staticconstexprprotected

Definition at line 94 of file Encoder.h.

◆ NStreams

template<class encoder_T , class symbolTable_T , std::size_t nStreams_V>
constexpr size_type o2::rans::Encoder< encoder_T, symbolTable_T, nStreams_V >::NStreams = nStreams_V
staticconstexpr

Definition at line 61 of file Encoder.h.


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