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::SDMEC< T > Class Template Reference

Symmetric errors-and-erasures channel over a finite field. More...

#include <blocks.hpp>

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

Public Member Functions

 SDMEC (double pe, double px=0.0)
 Construct with error probability pe and erasure probability px.
T operator() (const T &in)
 Process one symbol.
double get_pe () const noexcept
 Symbol error probability pe (erroneous and not erased).
double get_px () const noexcept
 Symbol erasure probability px.
double get_capacity () const noexcept
 Shannon capacity in bits per symbol.
long double get_Bhattacharyya_param () const noexcept
 Pairwise Bhattacharyya parameter.
Public Member Functions inherited from CECCO::details::BlockProcessor< T, ElementType, ElementType >
Vector< ElementType > operator() (const Vector< ElementType > &in)
 Apply the block element-wise to each vector entry.
Vector< ElementType > operator() (Vector< ElementType > &&in)
 Apply the block element-wise (rvalue input).
Matrix< ElementType > operator() (const Matrix< ElementType > &in)
 Apply the block element-wise to each matrix entry.
Matrix< ElementType > operator() (Matrix< ElementType > &&in)
 Apply the block element-wise (rvalue input).
ElementType operator() (const U &)
 Catch-all for inputs whose element type differs from InputType.
Vector< ElementType > operator() (const Vector< U > &)
Matrix< ElementType > operator() (const Matrix< U > &)

Additional Inherited Members

Protected Member Functions inherited from CECCO::details::BlockProcessor< T, ElementType, ElementType >
const T & derived () const noexcept
T & derived () noexcept

Detailed Description

template<FieldType T>
class CECCO::SDMEC< T >

Symmetric errors-and-erasures channel over a finite field.

Template Parameters
TFinite field of the transmitted symbols

Independently replaces a symbol by a uniformly selected different symbol with probability pe, then marks it erased with probability px; erasure takes precedence over error.

For px == 0 this is an CECCO::SDMC; over 𝔽₂, pe == 0 gives an CECCO::BEC. Erasures require CECCO_ERASURE_SUPPORT.

The capacity is C = (1 − px)[log₂(q) + (1 − p̃)log₂(1 − p̃) + p̃log₂(p̃) − p̃log₂(q − 1)], where p̃ = pe / (1 − px).

Definition at line 205 of file blocks.hpp.

Constructor & Destructor Documentation

◆ SDMEC()

template<FieldType T>
CECCO::SDMEC< T >::SDMEC ( double pe,
double px = 0.0 )

Construct with error probability pe and erasure probability px.

Parameters
peSymbol error probability ∈ [0, 1]
pxSymbol erasure probability ∈ [0, 1 − pe]; default 0
Exceptions
std::out_of_rangeif pe ∉ [0, 1] or px ∉ [0, 1 − pe]
std::invalid_argumentif px ≠ 0 and CECCO_ERASURE_SUPPORT is not defined

Definition at line 274 of file blocks.hpp.

Member Function Documentation

◆ get_Bhattacharyya_param()

template<FieldType T>
long double CECCO::SDMEC< T >::get_Bhattacharyya_param ( ) const
inlinenoexcept

Pairwise Bhattacharyya parameter.

Uses γ = px + 2·√((1 − pe − px)·pe/(q − 1)) + (q − 2)·pe/(q − 1), with q = |T| and pe the probability of an erroneous, non-erased output.

Returns
Common pairwise Bhattacharyya parameter γ for distinct input symbols

Definition at line 249 of file blocks.hpp.

◆ get_capacity()

template<FieldType T>
requires (FiniteFieldType<T>)
double CECCO::SDMEC< T >::get_capacity ( ) const
noexcept

Shannon capacity in bits per symbol.

Returns
C = (1 − px) · [log₂(q) + (1 − p̃)·log₂(1 − p̃) + p̃·log₂(p̃) − p̃·log₂(q − 1)], where p̃ = pe / (1 − px). Edge cases pe ∈ {0, 1} use lim_{x→0} x·log₂(x) = 0.

Definition at line 328 of file blocks.hpp.

◆ get_pe()

template<FieldType T>
double CECCO::SDMEC< T >::get_pe ( ) const
inlinenoexcept

Symbol error probability pe (erroneous and not erased).

Definition at line 228 of file blocks.hpp.

◆ get_px()

template<FieldType T>
double CECCO::SDMEC< T >::get_px ( ) const
inlinenoexcept

Symbol erasure probability px.

Definition at line 231 of file blocks.hpp.

◆ operator()()

template<FieldType T>
T CECCO::SDMEC< T >::operator() ( const T & in)

Process one symbol.

Parameters
inInput symbol
Returns
Output symbol (possibly erased when CECCO_ERASURE_SUPPORT is defined)

Definition at line 298 of file blocks.hpp.


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