DCCL v4
dccl::arith::Model Class Reference

Public Types

enum  ModelState { ENCODER, DECODER }
 
typedef uint32 freq_type
 
using symbol_type = int
 
using value_type = double
 

Public Member Functions

 Model (protobuf::ArithmeticModel user)
 
symbol_type value_to_symbol (value_type value) const
 
value_type symbol_to_value (symbol_type symbol) const
 
symbol_type total_symbols ()
 
const protobuf::ArithmeticModeluser_model () const
 
symbol_type max_symbol () const
 
freq_type total_freq (ModelState state) const
 
void update_model (symbol_type symbol, ModelState state)
 
std::pair< freq_type, freq_type > symbol_to_cumulative_freq (symbol_type symbol, ModelState state) const
 
std::pair< symbol_type, symbol_type > cumulative_freq_to_symbol (std::pair< freq_type, freq_type > c_freq_pair, ModelState state) const
 

Static Public Attributes

static constexpr symbol_type OUT_OF_RANGE_SYMBOL = -1
 
static constexpr symbol_type EOF_SYMBOL = -2
 
static constexpr symbol_type MIN_SYMBOL = EOF_SYMBOL
 
static constexpr int CODE_VALUE_BITS = 32
 
static constexpr int FREQUENCY_BITS = CODE_VALUE_BITS - 2
 
static constexpr freq_type MAX_FREQUENCY = (1 << FREQUENCY_BITS) - 1
 
static std::map< std::string, std::map< std::string, Bitset > > last_bits_map
 

Friends

class ModelManager
 

Detailed Description

Definition at line 60 of file field_codec_arithmetic.h.


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