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::Trellis< T >::BCJR_Workspace Struct Reference

Workspace for binary BCJR forward-backward decoding. More...

#include <trellises.hpp>

Public Member Functions

 BCJR_Workspace (const Trellis &tr)
 Allocate metric arrays for tr.
void calculate_edge_costs (const Trellis &tr, const Vector< double > &llrs)
 Set BCJR edge costs from binary LLRs.

Public Attributes

std::vector< std::vector< double > > alpha
 Forward metrics by layer and vertex id.
std::vector< std::vector< double > > beta
 Backward metrics by layer and vertex id.
std::vector< std::vector< double > > edge_costs
 Edge cost for each segment and edge index.
std::optional< std::variant< Vector< T >, Vector< double > > > v
 Optional received vector shown in TikZ output.

Static Public Attributes

static constexpr bool is_soft = true
 BCJR uses floating-point soft metrics.

Detailed Description

template<FieldType T>
struct CECCO::Trellis< T >::BCJR_Workspace

Workspace for binary BCJR forward-backward decoding.

Stores α and β metrics by layer and edge costs by segment. It is used by LinearCode<Fp<2>>::dec_BCJR.

Definition at line 240 of file trellises.hpp.

Constructor & Destructor Documentation

◆ BCJR_Workspace()

template<FieldType T>
CECCO::Trellis< T >::BCJR_Workspace::BCJR_Workspace ( const Trellis & tr)
explicit

Allocate metric arrays for tr.

Parameters
trTrellis whose layer and edge sizes define the workspace

Definition at line 494 of file trellises.hpp.

Member Function Documentation

◆ calculate_edge_costs()

template<FieldType T>
requires std::is_same_v<T, Fp<2>>
void CECCO::Trellis< T >::BCJR_Workspace::calculate_edge_costs ( const Trellis & tr,
const Vector< double > & llrs )

Set BCJR edge costs from binary LLRs.

Parameters
trBinary trellis whose edges define candidate bits
llrsLog-likelihood ratios; length must equal the number of segments
Exceptions
std::invalid_argumentif llrs.get_n() != tr.E.size()

Definition at line 506 of file trellises.hpp.

Member Data Documentation

◆ alpha

template<FieldType T>
std::vector<std::vector<double> > CECCO::Trellis< T >::BCJR_Workspace::alpha

Forward metrics by layer and vertex id.

Definition at line 262 of file trellises.hpp.

◆ beta

template<FieldType T>
std::vector<std::vector<double> > CECCO::Trellis< T >::BCJR_Workspace::beta

Backward metrics by layer and vertex id.

Definition at line 264 of file trellises.hpp.

◆ edge_costs

template<FieldType T>
std::vector<std::vector<double> > CECCO::Trellis< T >::BCJR_Workspace::edge_costs

Edge cost for each segment and edge index.

Definition at line 266 of file trellises.hpp.

◆ is_soft

template<FieldType T>
bool CECCO::Trellis< T >::BCJR_Workspace::is_soft = true
staticconstexpr

BCJR uses floating-point soft metrics.

Definition at line 242 of file trellises.hpp.

◆ v

template<FieldType T>
std::optional<std::variant<Vector<T>, Vector<double> > > CECCO::Trellis< T >::BCJR_Workspace::v

Optional received vector shown in TikZ output.

Definition at line 268 of file trellises.hpp.


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