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

Non-Return-to-Zero (NRZ) mapper for binary modulation. More...

#include <blocks.hpp>

Inheritance diagram for CECCO::NRZMapper:
Inheritance graph

Public Member Functions

constexpr NRZMapper (double a, double b) noexcept
 Construct with constellation parameters.
constexpr std::complex< double > operator() (const Fp< 2 > &in) noexcept
 Map a bit to its constellation point.
Constellation Parameters
constexpr double get_Eb () const noexcept
 Energy per bit Eb = a² + b²/4.
constexpr double get_a () const noexcept
 DC offset parameter a.
constexpr double get_b () const noexcept
 Constellation distance parameter b.
Public Member Functions inherited from CECCO::details::BlockProcessor< T, Fp< 2 >, std::complex< double > >
Vector< std::complex< double > > operator() (const Vector< Fp< 2 > > &in)
 Apply the block element-wise to each vector entry.
Vector< std::complex< double > > operator() (Vector< Fp< 2 > > &&in)
 Apply the block element-wise (rvalue input).
Matrix< std::complex< double > > operator() (const Matrix< Fp< 2 > > &in)
 Apply the block element-wise to each matrix entry.
Matrix< std::complex< double > > operator() (Matrix< Fp< 2 > > &&in)
 Apply the block element-wise (rvalue input).
std::complex< double > operator() (const U &)
 Catch-all for inputs whose element type differs from InputType.
Vector< std::complex< double > > operator() (const Vector< U > &)
Matrix< std::complex< double > > operator() (const Matrix< U > &)

Additional Inherited Members

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

Detailed Description

Non-Return-to-Zero (NRZ) mapper for binary modulation.

Maps 𝔽_2 symbols to real constellation points (a − b/2, 0) and (a + b/2, 0), where a is the DC offset and b is the constellation distance. Energy per bit is Eb = a² + b²/4 (unit symbol duration assumed).

Typical configurations: BPSK (a = 0, b = 2, constellation {−1, +1}, Eb = 1) and OOK (a = 1, b = 2, constellation {0, +2}, Eb = 2).

NRZMapper ook(1.0, 2.0);
Vector<Fp<2>> bits = {0, 1, 0, 1};
Vector<std::complex<double>> signal = bits >> ook; // (0, 2, 0, 2)
constexpr NRZMapper(double a, double b) noexcept
Construct with constellation parameters.
Definition blocks.hpp:472
Vector v = (v₀, v₁, …, vₙ₋₁) over a CECCO::ComponentType.
Definition vectors.hpp:115
See also
CECCO::BPSKMapper, CECCO::AWGN, CECCO::NRZDemapper

Definition at line 462 of file blocks.hpp.

Constructor & Destructor Documentation

◆ NRZMapper()

CECCO::NRZMapper::NRZMapper ( double a,
double b )
inlineconstexprnoexcept

Construct with constellation parameters.

Parameters
aDC offset (real-axis shift)
bConstellation distance (separation between symbols)

Definition at line 472 of file blocks.hpp.

Here is the caller graph for this function:

Member Function Documentation

◆ get_a()

double CECCO::NRZMapper::get_a ( ) const
inlineconstexprnoexcept

DC offset parameter a.

Definition at line 482 of file blocks.hpp.

Here is the caller graph for this function:

◆ get_b()

double CECCO::NRZMapper::get_b ( ) const
inlineconstexprnoexcept

Constellation distance parameter b.

Definition at line 485 of file blocks.hpp.

Here is the caller graph for this function:

◆ get_Eb()

double CECCO::NRZMapper::get_Eb ( ) const
inlineconstexprnoexcept

Energy per bit Eb = a² + b²/4.

Definition at line 479 of file blocks.hpp.

Here is the caller graph for this function:

◆ operator()()

std::complex< double > CECCO::NRZMapper::operator() ( const Fp< 2 > & in)
inlineconstexprnoexcept

Map a bit to its constellation point.

Parameters
inBinary input
Returns
(a − b/2, 0) for input 0; (a + b/2, 0) for input 1

Definition at line 494 of file blocks.hpp.


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