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 Discrete Memoryless Erasure Channel (SDMEC) over any finite field 𝔽_q. 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.
operator() (const T &in)
 Process one symbol.
double get_pe () const noexcept
 Observed symbol error probability pe.
double get_px () const noexcept
 Observed symbol erasure probability px.
double get_capacity () const noexcept
 Shannon capacity in bits per symbol.
long double get_Bhattacharyya_param () const
 Bhattacharyya parameter γ = 2·√(pe·(1 − pe)).
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 Discrete Memoryless Erasure Channel (SDMEC) over any finite field 𝔽_q.

Template Parameters
TFinite field type for channel input/output symbols

q-ary symmetric channel with independent error and erasure processes. Each transmitted symbol is changed to a uniformly random different value with observed probability pe, marked erased (overwriting any error) with observed probability px, and otherwise passed through unchanged.

For px = 0 this reduces to the traditional symmetric channel (use CECCO::SDMC, or CECCO::BSC for q = 2). For pe = 0 it is the erasure channel (use CECCO::BEC for q = 2). Erasure support requires the CECCO_ERASURE_SUPPORT macro at compile time.

Capacity (bits/symbol): C = (1 − px) · [ log₂(q) + (1 − p̃)·log₂(1 − p̃) + p̃·log₂(p̃) − p̃·log₂(q − 1) ], where p̃ = pe / (1 − px) is the conditional error probability.

using F4 = Ext<Fp<2>, {1, 1, 1}>;
SDMEC<F4> channel(0.05, 0.1); // 5% errors, 10% erasures
Vector<F4> r = Vector<F4>(20).randomize() >> channel;
double C = channel.get_capacity();
Extension field 𝔽_{q^m} ≅ B[x]/(f(x)), constructed from a base field and an irreducible monic modulus...
Definition fields.hpp:2221
Symmetric Discrete Memoryless Erasure Channel (SDMEC) over any finite field 𝔽_q.
Definition blocks.hpp:222
Vector v = (v₀, v₁, …, vₙ₋₁) over a CECCO::ComponentType.
Definition vectors.hpp:115
Vector & randomize() noexcept
Replace components with random values appropriate for T.
Definition vectors.hpp:1013
See also
CECCO::SDMC, CECCO::BSC, CECCO::BEC, CECCO::BAC

Definition at line 222 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 284 of file blocks.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ get_Bhattacharyya_param()

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

Bhattacharyya parameter γ = 2·√(pe·(1 − pe)).

Exceptions
std::logic_errorif px ≠ 0 (γ is undefined for channels with erasures)
Note
Defined only for binary channels (q = 2).

Definition at line 265 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 327 of file blocks.hpp.

◆ get_pe()

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

Observed symbol error probability pe.

Definition at line 245 of file blocks.hpp.

◆ get_px()

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

Observed symbol erasure probability px.

Definition at line 248 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 303 of file blocks.hpp.

Here is the call graph for this function:

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