C(++)ECCO
C++ Error Control COding: a header-only library for ECC simulations and experiments, modeling complete coding systems across arbitrary finite fields and complex inter-field relationships - Christian Senger <senger@inue.uni-stuttgart.de>
Loading...
Searching...
No Matches
CECCO::LLRCalculator< T > Class Template Reference

Compute symbol-level log-likelihood ratios. More...

#include <blocks.hpp>

Inheritance diagram for CECCO::LLRCalculator< T >:
Inheritance graph

Public Member Functions

 LLRCalculator (const NRZMapper &nrz, const AWGN &transmission) noexcept
 Construct a BI-AWGN calculator from a matching mapper and channel.
 LLRCalculator (const BI_AWGN &bi_awgn) noexcept
 Construct a BI-AWGN calculator from a BI-AWGN channel (convenience).
 LLRCalculator (const SDMEC< T > &channel) noexcept
 Construct an SDMEC calculator from a discrete channel.
double operator() (const std::complex< double > &in)
 Compute the LLR of a received complex symbol (BI-AWGN model).
Vector< double > operator() (const Vector< std::complex< double > > &in)
 Compute LLRs for a received complex word (BI-AWGN model).
Matrix< double > operator() (const Matrix< std::complex< double > > &in)
 Compute the symbol-level LLR matrix of a received binary image (BI-AWGN model).
Vector< double > operator() (const T &r)
 Compute symbol LLRs for one received field symbol (SDMEC model).
Matrix< double > operator() (const Vector< T > &r)
 Compute the symbol-LLR matrix of a received word (SDMEC model).

Detailed Description

template<FiniteFieldType T = Fp<2>>
class CECCO::LLRCalculator< T >

Compute symbol-level log-likelihood ratios.

Template Parameters
TCode-symbol field

Produces a (q โˆ’ 1) ร— n matrix whose entry (a โˆ’ 1, j) is ln(P(r_j | 0) / P(r_j | a)). Positive values favor zero; magnitude is reliability.

Supports prime-field SDMEC observations and binary-image BI-AWGN observations. BI-AWGN requires characteristic two and combines the independent bit LLRs of each extension-field symbol.

Definition at line 811 of file blocks.hpp.

Constructor & Destructor Documentation

◆ LLRCalculator() [1/3]

template<FiniteFieldType T = Fp<2>>
CECCO::LLRCalculator< T >::LLRCalculator ( const NRZMapper & nrz,
const AWGN & transmission )
inlinenoexcept

Construct a BI-AWGN calculator from a matching mapper and channel.

Parameters
nrzSource mapper providing (a, b)
transmissionChannel providing variance

Definition at line 818 of file blocks.hpp.

◆ LLRCalculator() [2/3]

template<FiniteFieldType T = Fp<2>>
CECCO::LLRCalculator< T >::LLRCalculator ( const BI_AWGN & bi_awgn)
inlinenoexcept

Construct a BI-AWGN calculator from a BI-AWGN channel (convenience).

Parameters
bi_awgnChannel providing (a, b) and variance

Definition at line 831 of file blocks.hpp.

◆ LLRCalculator() [3/3]

template<FiniteFieldType T = Fp<2>>
CECCO::LLRCalculator< T >::LLRCalculator ( const SDMEC< T > & channel)
inlinenoexcept

Construct an SDMEC calculator from a discrete channel.

Parameters
channelSymmetric discrete memoryless erasure channel providing pe and px

Definition at line 844 of file blocks.hpp.

Member Function Documentation

◆ operator()() [1/5]

template<FiniteFieldType T = Fp<2>>
Matrix< double > CECCO::LLRCalculator< T >::operator() ( const Matrix< std::complex< double > > & in)
inline

Compute the symbol-level LLR matrix of a received binary image (BI-AWGN model).

Parameters
inReceived complex matrix; the [T:๐”ฝ_2]-row binary image of the code word, column j holding the bits of symbol j in as_vector()/CECCO::DEMUX order
Returns
(qโˆ’1) ร— n matrix; entry (aโˆ’1, j) = ln(P(r_j|0)/P(r_j|a)) for symbol a = 1, โ€ฆ, qโˆ’1
Exceptions
std::logic_errorif this calculator was constructed from an SDMEC
std::invalid_argumentif the input does not have [T:๐”ฝ_2] rows

The bits of a symbol are transmitted over independent channel uses, so a symbol LLR is the sum of the bit LLRs selected by its nonzero coordinates. For a binary code (T = ๐”ฝ_2) this is one LLR per symbol.

Definition at line 885 of file blocks.hpp.

◆ operator()() [2/5]

template<FiniteFieldType T = Fp<2>>
double CECCO::LLRCalculator< T >::operator() ( const std::complex< double > & in)
inline

Compute the LLR of a received complex symbol (BI-AWGN model).

Parameters
inReceived complex symbol
Returns
LLR = bยท(a โˆ’ Re(in)) / ฯƒยฒ in nats; positive โ‡’ bit 0, negative โ‡’ bit 1
Exceptions
std::logic_errorif this calculator was constructed from an SDMEC

Definition at line 854 of file blocks.hpp.

◆ operator()() [3/5]

template<FiniteFieldType T = Fp<2>>
Vector< double > CECCO::LLRCalculator< T >::operator() ( const T & r)
inline

Compute symbol LLRs for one received field symbol (SDMEC model).

Parameters
rReceived ๐”ฝ_p symbol, possibly erased
Returns
Vector with entry aโˆ’1 equal to ln(P(r|0)/P(r|a))
Exceptions
std::logic_errorif this calculator was constructed from a BI-AWGN channel

Definition at line 918 of file blocks.hpp.

◆ operator()() [4/5]

template<FiniteFieldType T = Fp<2>>
Vector< double > CECCO::LLRCalculator< T >::operator() ( const Vector< std::complex< double > > & in)
inline

Compute LLRs for a received complex word (BI-AWGN model).

Parameters
inReceived complex word
Returns
Vector of binary LLRs
Exceptions
std::logic_errorif this calculator was constructed from an SDMEC

Definition at line 867 of file blocks.hpp.

◆ operator()() [5/5]

template<FiniteFieldType T = Fp<2>>
Matrix< double > CECCO::LLRCalculator< T >::operator() ( const Vector< T > & r)
inline

Compute the symbol-LLR matrix of a received word (SDMEC model).

Parameters
rReceived word of ๐”ฝ_p symbols, possibly erased
Returns
(pโˆ’1) ร— n matrix; entry (aโˆ’1, j) = ln(P(r_j|0)/P(r_j|a))
Exceptions
std::logic_errorif this calculator was constructed from a BI-AWGN channel

Definition at line 947 of file blocks.hpp.


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