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 Class Reference

Log-Likelihood Ratio calculator for NRZ-over-AWGN soft demodulation. More...

#include <blocks.hpp>

Inheritance diagram for CECCO::LLRCalculator:
Inheritance graph

Public Member Functions

 LLRCalculator (const NRZMapper &nrz, const AWGN &transmission) noexcept
 Construct from a matching mapper and channel.
 LLRCalculator (const BI_AWGN &bi_awgn) noexcept
 Construct from a BI-AWGN channel (convenience).
double operator() (const std::complex< double > &in) noexcept
 Compute LLR of a received symbol.
Public Member Functions inherited from CECCO::details::BlockProcessor< T, std::complex< double >, double >
Vector< double > operator() (const Vector< std::complex< double > > &in)
 Apply the block element-wise to each vector entry.
Vector< double > operator() (Vector< std::complex< double > > &&in)
 Apply the block element-wise (rvalue input).
Matrix< double > operator() (const Matrix< std::complex< double > > &in)
 Apply the block element-wise to each matrix entry.
Matrix< double > operator() (Matrix< std::complex< double > > &&in)
 Apply the block element-wise (rvalue input).
double operator() (const U &)
 Catch-all for inputs whose element type differs from InputType.
Vector< double > operator() (const Vector< U > &)
Matrix< double > operator() (const Matrix< U > &)

Additional Inherited Members

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

Detailed Description

Log-Likelihood Ratio calculator for NRZ-over-AWGN soft demodulation.

Computes LLR(r) = b·(a − Re(r)) / σ² in nats, where (a, b) are the NRZ constellation parameters and σ² is the AWGN noise variance. Sign convention: positive LLR ⇒ bit 0, negative ⇒ bit 1; magnitude indicates reliability. Output suitable for belief propagation, LDPC, turbo, and other soft-decision decoders.

Construct from a matching NRZMapper + AWGN pair, or directly from a BI_AWGN. See the BI_AWGN class doc for an end-to-end chain example.

See also
CECCO::NRZDemapper for the hard-decision counterpart

Definition at line 802 of file blocks.hpp.

Constructor & Destructor Documentation

◆ LLRCalculator() [1/2]

CECCO::LLRCalculator::LLRCalculator ( const NRZMapper & nrz,
const AWGN & transmission )
inlinenoexcept

Construct from a matching mapper and channel.

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

Definition at line 812 of file blocks.hpp.

Here is the call graph for this function:

◆ LLRCalculator() [2/2]

CECCO::LLRCalculator::LLRCalculator ( const BI_AWGN & bi_awgn)
inlinenoexcept

Construct from a BI-AWGN channel (convenience).

Parameters
bi_awgnChannel providing (a, b) and σ

Definition at line 819 of file blocks.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ operator()()

double CECCO::LLRCalculator::operator() ( const std::complex< double > & in)
inlinenoexcept

Compute LLR of a received symbol.

Parameters
inReceived complex symbol
Returns
LLR = b·(a − Re(in)) / σ² in nats; positive ⇒ bit 0, negative ⇒ bit 1

Definition at line 829 of file blocks.hpp.


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