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
blocks.hpp File Reference

Communication system blocks library. More...

#include <numbers>
#include "fields.hpp"
#include "vectors.hpp"
Include dependency graph for blocks.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CECCO::details::BlockProcessor< T, InputType, OutputType >
 CRTP base providing element-wise, vector, and matrix operator() overloads. More...
class  CECCO::SDMEC< T >
 Symmetric Discrete Memoryless Erasure Channel (SDMEC) over any finite field š”½_q. More...
class  CECCO::SDMC< T >
 Symmetric Discrete Memoryless Channel — errors only, no erasures. More...
class  CECCO::BEC
 Binary Erasure Channel — symbols are received correctly or marked erased. More...
class  CECCO::BAC
 Binary Asymmetric Channel (Z-channel) — 0 is preserved; 1 flips to 0 with probability p. More...
class  CECCO::NRZMapper
 Non-Return-to-Zero (NRZ) mapper for binary modulation. More...
class  CECCO::BPSKMapper
 Binary Phase Shift Keying mapper — NRZMapper with a = 0, b = 2. More...
class  CECCO::AWGN
 Additive White Gaussian Noise channel for complex-valued symbols. More...
class  CECCO::BI_AWGN
 Binary-Input AWGN — fused NRZMapper + AWGN block. More...
class  CECCO::NRZDemapper
 Non-Return-to-Zero (NRZ) hard-decision demapper. More...
class  CECCO::BPSKDemapper
 BPSK hard-decision demapper — NRZDemapper with threshold 0. More...
class  CECCO::LLRCalculator
 Log-Likelihood Ratio calculator for NRZ-over-AWGN soft demodulation. More...
class  CECCO::DEMUX< E, S >
 Field demultiplexer — expand š”½_E elements into š”½_S coefficient vectors/matrices. More...
class  CECCO::MUX< S, E >
 Field multiplexer — reconstruct š”½_E elements from š”½_S coefficients. More...

Namespaces

namespace  CECCO
 Provides a framework for error correcting codes.
namespace  CECCO::details
 Contains implementation details not to be exposed to the user. Functions and classes here may change without notice.

Typedefs

template<typename T, typename ElementType>
using CECCO::details::SameTypeProcessor = BlockProcessor<T, ElementType, ElementType>
 CRTP base for blocks where input and output element types coincide.
template<typename T>
using CECCO::details::EncoderProcessor = BlockProcessor<T, Fp<2>, std::complex<double>>
 CRTP base for blocks mapping bits to complex symbols (e.g. NRZ/BPSK modulation).
template<typename T>
using CECCO::details::DecoderProcessor = BlockProcessor<T, std::complex<double>, Fp<2>>
 CRTP base for blocks mapping complex symbols back to bits (hard demod).
template<typename T>
using CECCO::details::LLRProcessor = BlockProcessor<T, std::complex<double>, double>
 CRTP base for blocks producing log-likelihood ratios from complex symbols.
using CECCO::BSC = SDMC<Fp<2>>
 Binary Symmetric Channel — type alias for SDMC<Fp<2>>.

Functions

template<class LHS, class RHS>
decltype(auto) CECCO::operator>> (LHS &&lhs, RHS &&rhs)
 Function-call chaining: x >> f ≔ f(x).
template<class LHS, class RHS>
RHS & CECCO::operator>> (LHS &&lhs, RHS &dst)
 Assignment chaining: x >> dst ≔ dst = x; return dst.

Detailed Description

Communication system blocks library.

Author
Christian Senger senge.nosp@m.r@in.nosp@m.ue.un.nosp@m.i-st.nosp@m.uttga.nosp@m.rt.d.nosp@m.e
Version
2.2.5
Date
2026

Licensed for noncommercial use only, including academic teaching, research, and personal non-profit purposes. Commercial use is prohibited without a separate commercial license. See the LICENSE file in the repository root for full terms and how to request a commercial license.

Description

Channel models, modulation/demodulation, and field multiplexing blocks for error-control coding experiments. Provided blocks:

  • Channels: SDMEC (errors-and-erasures over any š”½_q), SDMC, BSC, BEC, BAC, AWGN, BI-AWGN.
  • Modulation: NRZ and BPSK with configurable constellation.
  • Demodulation: hard-decision (NRZDemapper, BPSKDemapper) and soft-decision (LLRCalculator).
  • Field multiplexing: DEMUX/MUX between an extension field and a subfield.
  • Chaining: operator>> for left-to-right block composition.

All blocks expose element-wise, vector, and matrix overloads via the CECCO::details::BlockProcessor CRTP base; see its documentation for the canonical chain example.

See also
CECCO::details::BlockProcessor — CRTP foundation and chain example
CECCO::SubfieldOf, CECCO::ExtensionOf — concepts behind DEMUX/MUX

Definition in file blocks.hpp.