Project
Loading...
Searching...
No Matches
o2::data_compression::ProbabilityModel< Alphabet, WeightType > Class Template Reference

#include <dc_primitives.h>

Public Types

using alphabet_type = Alphabet
 
using value_type = typename Alphabet::value_type
 
using weight_type = WeightType
 
using TableType = std::map< value_type, WeightType >
 

Public Member Functions

 ProbabilityModel ()
 
 ~ProbabilityModel ()=default
 
constexpr const chargetName () const
 
int addWeight (value_type value, weight_type weight=_default1)
 
int initWeight (Alphabet &alphabet, WeightType weight=_default1)
 
WeightType normalize ()
 
const WeightType & operator[] (value_type v) const
 
TableType::const_iterator begin () const
 
TableType::const_iterator end () const
 
TableType::iterator begin ()
 
TableType::iterator end ()
 
void print () const
 

Static Public Attributes

static const value_type _default0 = 0
 
static const value_type _default1 = _default0 + 1
 

Detailed Description

template<class Alphabet, typename WeightType = double>
class o2::data_compression::ProbabilityModel< Alphabet, WeightType >

Definition at line 358 of file dc_primitives.h.

Member Typedef Documentation

◆ alphabet_type

template<class Alphabet , typename WeightType = double>
using o2::data_compression::ProbabilityModel< Alphabet, WeightType >::alphabet_type = Alphabet

Definition at line 361 of file dc_primitives.h.

◆ TableType

template<class Alphabet , typename WeightType = double>
using o2::data_compression::ProbabilityModel< Alphabet, WeightType >::TableType = std::map<value_type, WeightType>

Definition at line 364 of file dc_primitives.h.

◆ value_type

template<class Alphabet , typename WeightType = double>
using o2::data_compression::ProbabilityModel< Alphabet, WeightType >::value_type = typename Alphabet::value_type

Definition at line 362 of file dc_primitives.h.

◆ weight_type

template<class Alphabet , typename WeightType = double>
using o2::data_compression::ProbabilityModel< Alphabet, WeightType >::weight_type = WeightType

Definition at line 363 of file dc_primitives.h.

Constructor & Destructor Documentation

◆ ProbabilityModel()

template<class Alphabet , typename WeightType = double>
o2::data_compression::ProbabilityModel< Alphabet, WeightType >::ProbabilityModel ( )
inline

Definition at line 370 of file dc_primitives.h.

◆ ~ProbabilityModel()

template<class Alphabet , typename WeightType = double>
o2::data_compression::ProbabilityModel< Alphabet, WeightType >::~ProbabilityModel ( )
default

Member Function Documentation

◆ addWeight()

template<class Alphabet , typename WeightType = double>
int o2::data_compression::ProbabilityModel< Alphabet, WeightType >::addWeight ( value_type  value,
weight_type  weight = _default1 
)
inline

Definition at line 379 of file dc_primitives.h.

◆ begin() [1/2]

template<class Alphabet , typename WeightType = double>
TableType::iterator o2::data_compression::ProbabilityModel< Alphabet, WeightType >::begin ( )
inline

Definition at line 426 of file dc_primitives.h.

◆ begin() [2/2]

template<class Alphabet , typename WeightType = double>
TableType::const_iterator o2::data_compression::ProbabilityModel< Alphabet, WeightType >::begin ( ) const
inline

Definition at line 422 of file dc_primitives.h.

◆ end() [1/2]

template<class Alphabet , typename WeightType = double>
TableType::iterator o2::data_compression::ProbabilityModel< Alphabet, WeightType >::end ( )
inline

Definition at line 428 of file dc_primitives.h.

◆ end() [2/2]

template<class Alphabet , typename WeightType = double>
TableType::const_iterator o2::data_compression::ProbabilityModel< Alphabet, WeightType >::end ( ) const
inline

Definition at line 424 of file dc_primitives.h.

◆ getName()

template<class Alphabet , typename WeightType = double>
constexpr const char * o2::data_compression::ProbabilityModel< Alphabet, WeightType >::getName ( ) const
inlineconstexpr

Definition at line 373 of file dc_primitives.h.

◆ initWeight()

template<class Alphabet , typename WeightType = double>
int o2::data_compression::ProbabilityModel< Alphabet, WeightType >::initWeight ( Alphabet &  alphabet,
WeightType  weight = _default1 
)
inline

Definition at line 386 of file dc_primitives.h.

◆ normalize()

template<class Alphabet , typename WeightType = double>
WeightType o2::data_compression::ProbabilityModel< Alphabet, WeightType >::normalize ( )
inline

Definition at line 396 of file dc_primitives.h.

◆ operator[]()

template<class Alphabet , typename WeightType = double>
const WeightType & o2::data_compression::ProbabilityModel< Alphabet, WeightType >::operator[] ( value_type  v) const
inline

Definition at line 412 of file dc_primitives.h.

◆ print()

template<class Alphabet , typename WeightType = double>
void o2::data_compression::ProbabilityModel< Alphabet, WeightType >::print ( ) const
inline

Definition at line 430 of file dc_primitives.h.

Member Data Documentation

◆ _default0

template<class Alphabet , typename WeightType = double>
const value_type o2::data_compression::ProbabilityModel< Alphabet, WeightType >::_default0 = 0
static

Definition at line 367 of file dc_primitives.h.

◆ _default1

template<class Alphabet , typename WeightType = double>
const value_type o2::data_compression::ProbabilityModel< Alphabet, WeightType >::_default1 = _default0 + 1
static

Definition at line 368 of file dc_primitives.h.


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