|
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>
|
Contains implementation details not to be exposed to the user. Functions and classes here may change without notice. More...
Classes | |
| class | BlockProcessor |
| CRTP base providing element-wise, vector, and matrix operator() overloads. More... | |
| struct | degree_over_prime |
| Total extension degree of T over its prime field. More... | |
| struct | degree_over_prime< Fp< p > > |
| struct | degree_over_prime< Ext< B, modulus, mode > > |
| struct | degree_over_prime< Iso< MAIN, OTHERS... > > |
| struct | is_subfield_of |
| Construction-based subfield test: SUBFIELD reachable by descending SUPERFIELD's tower. More... | |
| struct | is_subfield_of< Fp< p >, Fp< p > > |
| struct | is_subfield_of< Ext< B, modulus, mode >, SUB > |
| struct | is_subfield_of< Ext< B, modulus, mode >, Ext< B, modulus, mode > > |
| struct | is_subfield_of< Ext< B_SUP, modulus_SUP, mode_SUP >, Ext< B_SUB, modulus_SUB, mode_SUB > > |
| struct | is_subfield_of< Iso< MAIN, OTHERS... >, SUB > |
| struct | is_subfield_of< Iso< MAIN, OTHERS... >, Iso< MAIN, OTHERS... > > |
| struct | is_subfield_of< Iso< SUP_MAIN, SUP_OTHERS... >, Iso< SUB_MAIN, SUB_OTHERS... > > |
| struct | type_list |
| Compile-time type list utility for subfield calculations. More... | |
| struct | contains |
| Check if a type exists in a type_list. More... | |
| struct | contains< T, type_list< Types... > > |
| struct | union_type_lists |
| Union of two type_lists (removes duplicates). More... | |
| struct | union_type_lists< type_list< Types1... >, type_list< Types2... > > |
| struct | intersect_type_lists |
| Intersection of two type_lists. More... | |
| struct | intersect_type_lists< type_list< Types1... >, type_list< Types2... > > |
| struct | largest_field_in_list |
| Find the largest field (by get_size()) in a type_list. More... | |
| struct | largest_field_in_list< type_list< T > > |
| struct | largest_field_in_list< type_list< T1, T2, Rest... > > |
| struct | collect_subfields |
| All subfields of F (including F itself), as a type_list. More... | |
| struct | collect_subfields< Fp< p > > |
| struct | collect_subfields< Ext< B, modulus, mode > > |
| struct | union_all_subfields |
| struct | union_all_subfields<> |
| struct | union_all_subfields< T > |
| struct | union_all_subfields< T1, T2, Rest... > |
| struct | collect_subfields< Iso< MAIN, OTHERS... > > |
| struct | largest_common_subfield |
| Largest field that appears as a subfield of both F and G. More... | |
| struct | iso_info |
| Detect whether T is an Iso and expose its components. More... | |
| struct | iso_info< Iso< MAIN, OTHERS... > > |
| Specialization of iso_info for Iso<MAIN, OTHERS...>. More... | |
| class | NonCopyable |
| Mixin that deletes the copy operations and defaults the move operations. More... | |
| class | Base |
| Tag base for the CRTP-protection idiom. More... | |
| class | Field |
| CRTP base documenting the interface every field type must provide. More... | |
| struct | Lut1D |
| 1D lookup table for unary field operations (negation, inversion, order) More... | |
| struct | Lut2D |
| 2D lookup table for commutative binary operations, optionally compressed More... | |
| struct | Lut2Dcoeff |
| Lookup table mapping each extension-field label to its base-field coefficient vector. More... | |
| struct | LutHolderNoProvider |
| Holds a LUT generated by F() (no dependencies); selects compile-time or lazy storage. More... | |
| struct | LutHolderNoProvider< LutType, F, LutMode::CompileTime > |
| CompileTime specialisation: table is a constexpr static member. More... | |
| struct | LutHolderNoProvider< LutType, F, LutMode::RunTime > |
| RunTime specialisation: thread-safe lazy initialisation on first access. More... | |
| struct | LutHolder |
| Holds a LUT generated by F(P); P provides a dependency table. More... | |
| struct | LutHolder< LutType, ProviderLutType, P, F, LutMode::CompileTime > |
| CompileTime specialisation: table baked into the binary. More... | |
| struct | LutHolder< LutType, ProviderLutType, P, F, LutMode::RunTime > |
| RunTime specialisation: thread-safe lazy initialisation, dependency resolved on first access. More... | |
| struct | IsomorphismPair |
| Shared static storage of the forward and reverse maps for the isomorphism A โ B. More... | |
| struct | CacheEntry |
| Cache entry specification. More... | |
| class | Cache |
| Heterogeneous cache indexed by entry ID. More... | |
| class | OnceCache |
| Thread-safe single-value cache. More... | |
| struct | Vertex |
| Vertex in one trellis layer. More... | |
| struct | Edge |
| Edge between two adjacent trellis layers. More... | |
| struct | FiniteFieldHasher |
Typedefs | |
| template<typename T, typename ElementType> | |
| using | SameTypeProcessor = BlockProcessor<T, ElementType, ElementType> |
| CRTP base for blocks where input and output element types coincide. | |
| template<typename T> | |
| using | 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 | DecoderProcessor = BlockProcessor<T, std::complex<double>, Fp<2>> |
| CRTP base for blocks mapping complex symbols back to bits (hard demod). | |
| template<typename T> | |
| using | LLRProcessor = BlockProcessor<T, std::complex<double>, double> |
| CRTP base for blocks producing log-likelihood ratios from complex symbols. | |
| template<typename List1, typename List2> | |
| using | union_type_lists_t = typename union_type_lists<List1, List2>::type |
| template<typename List1, typename List2> | |
| using | intersect_type_lists_t = typename intersect_type_lists<List1, List2>::type |
| template<typename List> | |
| using | largest_field_in_list_t = typename largest_field_in_list<List>::type |
| template<typename F> | |
| using | collect_subfields_t = typename collect_subfields<F>::type |
| template<typename F, typename G> | |
| using | largest_common_subfield_t = typename largest_common_subfield<F, G>::type |
Enumerations | |
| enum | matrix_type_t : uint8_t { Generic , Zero , Diagonal , Identity , Vandermonde , Toeplitz } |
| Matrix structural type tag for optimization (internal). More... | |
Functions | |
| template<FiniteFieldType T> | |
| InfInt | A (size_t n, size_t d, InfInt w) |
| template<FieldType T> | |
| Matrix< T > | LDC_G (const Matrix< T > &G_U, const Matrix< T > &G_V) |
| bool | validate (const std::vector< size_t > &v, std::size_t n) |
| template<typename... Types> | |
| constexpr bool | pairwise_distinct () |
| True iff all types in the pack are pairwise distinct. | |
| template<uint16_t q, uint8_t m, size_t SIZE> | |
| static size_t constexpr | integer_from_coeffs (const std::array< size_t, SIZE > &coeffs) noexcept |
| Encode polynomial coefficients (low-to-high) as a base-q integer label. | |
| template<typename LabelType, LabelType FieldSize> | |
| constexpr auto | compute_multiplicative_orders (const Lut2D< LabelType, FieldSize > &mul_lut) |
| Build the table of multiplicative orders for all elements of ๐ฝ_Q. | |
| template<typename LabelType, LabelType FieldSize> requires (is_prime<LabelType>(FieldSize)) | |
| constexpr auto | compute_multiplicative_inverses_direct () |
| Build multiplicative-inverse table for ๐ฝ_p via extended Euclidean algorithm. | |
| template<typename LabelType, LabelType FieldSize> | |
| constexpr auto | compute_multiplicative_inverses_search (const Lut2D< LabelType, FieldSize > &mul_lut) |
| Build multiplicative-inverse table by searching the multiplication LUT. | |
| template<typename LabelType, LabelType FieldSize> requires (is_prime<LabelType>(FieldSize)) | |
| constexpr auto | compute_additive_inverses_direct () |
| Build additive-inverse (negation) table for ๐ฝ_p. | |
| template<typename LabelType, LabelType FieldSize> | |
| constexpr auto | compute_additive_inverses_search (const Lut2D< LabelType, FieldSize > &add_lut) |
| Build additive-inverse table by searching the addition LUT. | |
| template<typename LabelType, LabelType FieldSize> requires (is_prime<LabelType>(FieldSize)) | |
| constexpr auto | compute_modular_addition_table () |
| Build the addition table for ๐ฝ_p: lut_add(a, b) = (a + b) mod p. | |
| template<typename F> | |
| constexpr F::label_t | compute_primitive_root () |
| Smallest primitive root of F* by direct power enumeration. | |
| template<typename LabelType, LabelType FieldSize, typename LutCoeffType, uint8_t ExtensionDegree, typename BaseFieldType> | |
| constexpr auto | compute_polynomial_addition_table (const LutCoeffType &lut_coeff) |
| Build the addition table for ๐ฝ_{q^m} via coefficient-wise base-field addition. | |
| template<typename FieldType> | |
| size_t | calculate_multiplicative_order (const FieldType &element) |
Multiplicative order of element by repeated multiplication. | |
| template<typename LabelType, LabelType FieldSize> | |
| constexpr LabelType | find_generator (const Lut1D< LabelType, FieldSize > &lut_mul_ord) |
| First element with multiplicative order Q โ 1 (a generator of ๐ฝ_Q*). | |
| template<typename LabelType, LabelType FieldSize> requires (is_prime<LabelType>(FieldSize)) | |
| constexpr auto | compute_modular_multiplication_table () |
| Build the multiplication table for ๐ฝ_p: lut_mul(a, b) = (a ยท b) mod p. | |
| template<typename LabelType, LabelType FieldSize, typename LutCoeffType, uint8_t ExtensionDegree, typename BaseFieldType, auto Modulus> | |
| constexpr auto | compute_polynomial_multiplication_table (const LutCoeffType &lut_coeff) |
| Build the multiplication table for ๐ฝ_{q^m}: polynomial multiply, then reduce mod f(x). | |
| constexpr double | floor_constexpr (double x) |
| Constexpr floor function. | |
| std::string | basename (const char *path) |
Variables | |
| const int | index = std::ios_base::xalloc() |
| template<FiniteFieldType T> | |
| constexpr size_t | degree_over_prime_v = degree_over_prime<T>::value |
| template<FiniteFieldType SUPER, FiniteFieldType SUB> | |
| constexpr bool | is_subfield_of_v = is_subfield_of<SUPER, SUB>::value |
| template<typename T, typename List> | |
| constexpr bool | contains_v = contains<T, List>::value |
| template<typename T, typename... Types> | |
| constexpr bool | is_distinct_from_all = (!std::is_same_v<T, Types> && ...) |
| True iff T is not the same as any of Types.... | |
| template<typename LutType, LutType(*)() F> | |
| constexpr LutType | LutHolderNoProvider< LutType, F, LutMode::CompileTime >::lut |
| template<typename LutType, typename ProviderLutType, const ProviderLutType &(*)() P, LutType(*)(const ProviderLutType &(*)()) F> | |
| constexpr LutType | LutHolder< LutType, ProviderLutType, P, F, LutMode::CompileTime >::lut |
| static const uint8_t | colormap [64][3] |
Contains implementation details not to be exposed to the user. Functions and classes here may change without notice.
| using CECCO::details::collect_subfields_t = typename collect_subfields<F>::type |
Definition at line 595 of file field_concepts_traits.hpp.
| using CECCO::details::DecoderProcessor = BlockProcessor<T, std::complex<double>, Fp<2>> |
CRTP base for blocks mapping complex symbols back to bits (hard demod).
Definition at line 187 of file blocks.hpp.
| 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).
Definition at line 183 of file blocks.hpp.
| using CECCO::details::intersect_type_lists_t = typename intersect_type_lists<List1, List2>::type |
Definition at line 507 of file field_concepts_traits.hpp.
| using CECCO::details::largest_common_subfield_t = typename largest_common_subfield<F, G>::type |
Definition at line 648 of file field_concepts_traits.hpp.
| using CECCO::details::largest_field_in_list_t = typename largest_field_in_list<List>::type |
Definition at line 531 of file field_concepts_traits.hpp.
| using CECCO::details::LLRProcessor = BlockProcessor<T, std::complex<double>, double> |
CRTP base for blocks producing log-likelihood ratios from complex symbols.
Definition at line 191 of file blocks.hpp.
| using CECCO::details::SameTypeProcessor = BlockProcessor<T, ElementType, ElementType> |
CRTP base for blocks where input and output element types coincide.
Definition at line 179 of file blocks.hpp.
| using CECCO::details::union_type_lists_t = typename union_type_lists<List1, List2>::type |
Definition at line 473 of file field_concepts_traits.hpp.
| enum CECCO::details::matrix_type_t : uint8_t |
Matrix structural type tag for optimization (internal).
Maintained automatically by Matrix<T> operations; mutations that break a structure demote the tag to Generic. Specialized algorithms dispatch on this tag to avoid full O(mn) traversals when possible.
Definition at line 88 of file matrices.hpp.
|
inline |
Definition at line 589 of file helpers.hpp.
| size_t CECCO::details::calculate_multiplicative_order | ( | const FieldType & | element | ) |
Multiplicative order of element by repeated multiplication.
| std::invalid_argument | if element is zero |
Single-element runtime path; batch precomputation lives in compute_multiplicative_orders. Order always divides Q โ 1.
Definition at line 1048 of file fields.hpp.
|
constexpr |
Build additive-inverse (negation) table for ๐ฝ_p.
Direct formula: โ0 = 0, โa = p โ a otherwise. Prime-field path; extension fields use compute_additive_inverses_search.
Definition at line 940 of file fields.hpp.
|
constexpr |
Build additive-inverse table by searching the addition LUT.
Used for extension fields. Symmetry a + b = 0 โ b + a = 0 fills two entries per match.
Definition at line 953 of file fields.hpp.
|
constexpr |
Build the addition table for ๐ฝ_p: lut_add(a, b) = (a + b) mod p.
Stores the upper triangle only (commutativity). Extension-field analogue: compute_polynomial_addition_table.
Definition at line 974 of file fields.hpp.
|
constexpr |
Build the multiplication table for ๐ฝ_p: lut_mul(a, b) = (a ยท b) mod p.
Stores the upper triangle only (commutativity). Extension-field analogue: compute_polynomial_multiplication_table.
Definition at line 1078 of file fields.hpp.
|
constexpr |
Build multiplicative-inverse table for ๐ฝ_p via extended Euclidean algorithm.
Sentinel: lut_inv[0] == 0. Prime-field path; for extension fields use compute_multiplicative_inverses_search.
Definition at line 896 of file fields.hpp.
|
constexpr |
Build multiplicative-inverse table by searching the multiplication LUT.
Used for extension fields, where extended Euclidean over the prime is not applicable. Exploits the symmetry a ยท b = 1 โ b ยท a = 1 to fill two entries per match.
Definition at line 917 of file fields.hpp.
|
constexpr |
Build the table of multiplicative orders for all elements of ๐ฝ_Q.
Each entry is the smallest k > 0 with a^k == 1; element 0 carries the sentinel order 0. All orders divide Q โ 1.
Definition at line 872 of file fields.hpp.
|
constexpr |
Build the addition table for ๐ฝ_{q^m} via coefficient-wise base-field addition.
Each element is a polynomial over ๐ฝ_q; addition reduces to base-field addition on the coefficient vectors taken from lut_coeff.
Definition at line 1017 of file fields.hpp.
|
constexpr |
Build the multiplication table for ๐ฝ_{q^m}: polynomial multiply, then reduce mod f(x).
f(x) = Modulus must be monic and irreducible over ๐ฝ_q. Reducibility is detected during table construction (a non-zero label that maps to 0 is impossible in a field) and surfaces as std::invalid_argument.
| std::invalid_argument | if Modulus is not irreducible over the base field |
Definition at line 1102 of file fields.hpp.
|
constexpr |
Smallest primitive root of F* by direct power enumeration.
For each candidate g โ {2, โฆ, pโ1} walks g, gยฒ, โฆ, g^{pโ2}; g is primitive iff none of those equals 1. Evaluated at compile time via F's constexpr operator*=.
Definition at line 991 of file fields.hpp.
|
constexpr |
First element with multiplicative order Q โ 1 (a generator of ๐ฝ_Q*).
Definition at line 1066 of file fields.hpp.
|
constexpr |
Constexpr floor function.
| x | Floating-point value |
Alternative to std::floor for constant evaluation.
Definition at line 362 of file helpers.hpp.

|
staticconstexprnoexcept |
Encode polynomial coefficients (low-to-high) as a base-q integer label.
| q | Base field size |
| m | Extension degree (number of coefficients used) |
| SIZE | Length of coeffs (must be โฅ m) |
Definition at line 786 of file fields.hpp.
|
constexpr |
True iff all types in the pack are pairwise distinct.
| Types | Parameter pack |
Used by CECCO::Iso to reject duplicate representations.
Definition at line 686 of file field_concepts_traits.hpp.
| bool CECCO::details::validate | ( | const std::vector< size_t > & | v, |
| std::size_t | n ) |
|
static |
Definition at line 601 of file helpers.hpp.
|
constexpr |
Definition at line 439 of file field_concepts_traits.hpp.
|
inlineconstexpr |
Definition at line 280 of file field_concepts_traits.hpp.
|
inline |
|
constexpr |
True iff T is not the same as any of Types....
Definition at line 675 of file field_concepts_traits.hpp.
|
constexpr |
Definition at line 315 of file field_concepts_traits.hpp.
|
constexpr |
Definition at line 1251 of file fields.hpp.
|
constexpr |
Definition at line 1209 of file fields.hpp.