|
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>
|
Workspace for Viterbi decoding on this trellis. More...
#include <graphs.hpp>
Public Member Functions | |
| Viterbi_Workspace (const Trellis &tr) | |
| Allocate metric arrays for tr. | |
| void | calculate_edge_costs (const Trellis &tr, const Vector< T > &r) |
| Set hard-decision edge costs from received word r. | |
| void | calculate_edge_costs (const Trellis &trellis, const Matrix< double > &llrs) |
| Set soft edge costs from symbol-level LLRs. | |
Public Attributes | |
| std::vector< cost_t > | path_costs_prev |
| Path costs from the previous layer. | |
| std::vector< cost_t > | path_costs_curr |
| Path costs for the current layer. | |
| std::vector< std::vector< const details::Edge< T > * > > | backptrs |
| Backpointer selected for each vertex and layer. | |
| std::vector< uint16_t > | tie_counts |
| Number of equal-cost paths seen for randomized tie-breaking. | |
| std::vector< std::vector< cost_t > > | edge_costs |
| Edge cost for each segment and edge index. | |
| std::optional< std::variant< Vector< T >, Matrix< double > > > | v |
| Optional received word (hard symbols or LLR matrix) shown in TikZ output. | |
Static Public Attributes | |
| static constexpr bool | is_soft = std::is_floating_point_v<cost_t> |
| True for floating-point soft metrics. | |
| static constexpr cost_t | init |
| Initial path cost used for unreachable vertices. | |
Workspace for Viterbi decoding on this trellis.
| cost_t | Integral type for hard-decision costs or floating-point type for soft costs |
Stores path metrics for two adjacent layers, edge costs, tie counts, and backpointers. Construct it from the trellis before calling the Viterbi routines in codes.hpp.
Definition at line 235 of file graphs.hpp.
|
explicit |
Allocate metric arrays for tr.
| tr | Trellis whose layer and edge sizes define the workspace |
Definition at line 553 of file graphs.hpp.
| void CECCO::Trellis< T >::Viterbi_Workspace< cost_t >::calculate_edge_costs | ( | const Trellis & | tr, |
| const Vector< T > & | r ) |
Set hard-decision edge costs from received word r.
| tr | Trellis whose edges define candidate symbols |
| r | Received word; length must equal the number of segments |
| std::invalid_argument | if r.get_n() != tr.E.size() |
With erasure support, erased received symbols give cost 0 on all outgoing labels.
Definition at line 568 of file graphs.hpp.
| void CECCO::Trellis< T >::Viterbi_Workspace< cost_t >::calculate_edge_costs | ( | const Trellis & | trellis, |
| const Matrix< double > & | llrs ) |
Set soft edge costs from symbol-level LLRs.
| trellis | Trellis whose edges define candidate symbols |
| llrs | Symbol-level LLR matrix with q−1 rows and one column per segment |
| std::invalid_argument | if the LLR matrix has the wrong number of rows or columns |
Edge costs are the symbol costs of CECCO::details::symbol_costs_from_llrs: cost 0 on 0-labelled edges and L_s(a) on edges labelled by symbol a.
Definition at line 585 of file graphs.hpp.
| std::vector<std::vector<const details::Edge<T>*> > CECCO::Trellis< T >::Viterbi_Workspace< cost_t >::backptrs |
Backpointer selected for each vertex and layer.
Definition at line 279 of file graphs.hpp.
| std::vector<std::vector<cost_t> > CECCO::Trellis< T >::Viterbi_Workspace< cost_t >::edge_costs |
Edge cost for each segment and edge index.
Definition at line 283 of file graphs.hpp.
|
staticconstexpr |
Initial path cost used for unreachable vertices.
Definition at line 239 of file graphs.hpp.
|
staticconstexpr |
True for floating-point soft metrics.
Definition at line 237 of file graphs.hpp.
| std::vector<cost_t> CECCO::Trellis< T >::Viterbi_Workspace< cost_t >::path_costs_curr |
Path costs for the current layer.
Definition at line 277 of file graphs.hpp.
| std::vector<cost_t> CECCO::Trellis< T >::Viterbi_Workspace< cost_t >::path_costs_prev |
Path costs from the previous layer.
Definition at line 275 of file graphs.hpp.
| std::vector<uint16_t> CECCO::Trellis< T >::Viterbi_Workspace< cost_t >::tie_counts |
Number of equal-cost paths seen for randomized tie-breaking.
Definition at line 281 of file graphs.hpp.
| std::optional<std::variant<Vector<T>, Matrix<double> > > CECCO::Trellis< T >::Viterbi_Workspace< cost_t >::v |
Optional received word (hard symbols or LLR matrix) shown in TikZ output.
Definition at line 285 of file graphs.hpp.