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 Namespace Reference

Provides a framework for error correcting codes. More...

Namespaces

namespace  details
 Contains implementation details not to be exposed to the user. Functions and classes here may change without notice.

Classes

class  SDMEC
 Symmetric errors-and-erasures channel over a finite field. More...
class  SDMC
 Symmetric Discrete Memoryless Channel: errors only, no erasures. More...
class  BEC
 Binary Erasure Channel: symbols are received correctly or marked erased. More...
class  BAC
 Binary Asymmetric Channel (Z-channel): 0 is preserved; 1 flips to 0 with probability p. More...
class  NRZMapper
 Non-Return-to-Zero (NRZ) mapper for binary modulation. More...
class  BPSKMapper
 Binary Phase Shift Keying mapper: NRZMapper with a = 0, b = 2. More...
class  AWGN
 Additive White Gaussian Noise channel for complex-valued symbols. More...
class  BI_AWGN
 Binary-Input AWGN: fused NRZMapper + AWGN block. More...
class  NRZDemapper
 Non-Return-to-Zero (NRZ) hard-decision demapper. More...
class  BPSKDemapper
 BPSK hard-decision demapper: NRZDemapper with threshold 0. More...
class  LLRCalculator
 Compute symbol-level log-likelihood ratios. More...
class  DEMUX
 Expand extension-field elements into subfield coordinates. More...
class  MUX
 Field multiplexer: reconstruct 𝔽_E elements from 𝔽_S coefficients. More...
class  Code
class  EmptyCode
class  LinearCode
class  UniverseCode
class  ZeroCode
class  SimplexCode
class  SingleParityCheckCode
class  ExtendedCode
class  CodewordIterator
class  decoding_failure
class  HammingCode
class  RepetitionCode
class  GolayCode
class  GRSCode
class  RSCode
class  CordaroWagnerCode
class  ConvolutionalCode
class  LDCCode
class  RMCode
class  SubfieldSubcode
class  AlternantCode
class  BCHCode
class  GoppaCode
class  AugmentedCode
class  Enc
class  Dec
class  Dec_list
class  ListProcessor
class  Encinv
class  Rationals
 Field of rational numbers ℚ = { p/q : p, q ∈ ℤ, q ≠ 0 } with selectable precision. More...
class  Polynomial
 Univariate polynomial p(x) = a₀ + a₁x + … + aₙxⁿ over a CECCO::CoefficientType. More...
class  Fp
 Prime field 𝔽_p ≅ ℤ/pℤ More...
class  Ext
 Extension field 𝔽_{q^m} ≅ B[x]/(f(x)), constructed from a base field and an irreducible monic modulus polynomial. More...
class  Iso
 Single logical field unifying several pairwise-isomorphic representations. More...
class  Vector
 Vector v = (v₀, v₁, …, vₙ₋₁) over a CECCO::ComponentType. More...
class  Matrix
 Dense m × n matrix over a CECCO::ComponentType. More...
class  Embedding
 Functor representing the field embedding φ: SUBFIELD → SUPERFIELD, with reverse lookup. More...
class  Isomorphism
 Functor representing the field isomorphism φ: A → B between two same-size finite fields. More...
struct  Trellis
 Layered trellis with field-labelled edges. More...
struct  TannerGraph
 Tanner graph of a parity-check matrix. More...
class  RNG
 Thread-local random number generator with shared seeding policy. More...
class  SierpinskiTriangle
 Sierpinski triangle (Pascal's triangle modulo p). More...

Concepts

concept  FieldType
 Concept for field types: full algebraic interface.
concept  FiniteFieldType
 Refines FieldType for finite fields 𝔽_{p^m}.
concept  SignedIntType
 Standard signed integers or InfInt for arbitrary precision.
concept  CoefficientType
 Admissible coefficient type for CECCO::Polynomial (scalar-like types).
concept  PolynomialType
 T is a Polynomial<C> over some CoefficientType C.
concept  ReliablyComparableType
 Types whose operator== reflects mathematical equality.
concept  ComponentType
 Admissible component type for CECCO::Vector and CECCO::Matrix.
concept  BelongsTo
 T is identical to at least one of Types....
concept  Isomorphic
 A and B are finite fields of the same size (and thus isomorphic).
concept  SubfieldOf
 SUBFIELD ⊆ SUPERFIELD as constructed in this library (Iso paths included).
concept  ExtensionOf
 Inverse of SubfieldOf: ExtensionOf<S, E> iff SubfieldOf<E, S>.

Typedefs

using BSC = SDMC<Fp<2>>
 Binary Symmetric Channel: type alias for SDMC<Fp<2>>.
template<class B>
using base_t = std::remove_cvref_t<B>
template<class C>
using field_t = typename base_t<C>::FIELD
template<uint16_t p, uint8_t m = 1>
using label_t = typename std::conditional_t<sqm(p, m) < 255, uint8_t, uint16_t>

Enumerations

enum class  method_t {
  BD , standard_array , BD_standard_array , boosted_BD_standard_array ,
  ML , ML_soft , Viterbi , Viterbi_soft ,
  BCJR , ssMAP , BP , recursive ,
  Meggitt , WBA , WBA_optimized , BMA ,
  OSD , LC_OSD , WBA_EE , BMA_EE ,
  BD_EE , ML_EE , Viterbi_EE , recursive_EE ,
  GMD
}
enum class  list_method_t {
  Viterbi , Viterbi_soft , SA , SA_optimized ,
  GSA , GSA_optimized , KVA
}
enum class  list_processing_t { pick_first , pick_random }
enum class  termination_t { zero_terminated , tailbitten }
enum class  LutMode { CompileTime , RunTime }
 LUT generation mode for field operations. More...

Functions

 LLRCalculator (const NRZMapper &, const AWGN &) -> LLRCalculator< Fp< 2 > >
 LLRCalculator (const BI_AWGN &) -> LLRCalculator< Fp< 2 > >
template<FiniteFieldType T>
 LLRCalculator (const SDMEC< T > &) -> LLRCalculator< T >
template<class LHS, class RHS>
decltype(auto) operator>> (LHS &&lhs, RHS &&rhs)
 Function-call chaining: x >> f ≡ f(x).
template<class LHS, class RHS>
RHS & operator>> (LHS &&lhs, RHS &dst)
 Assignment chaining: x >> dst ≡ dst = x; return dst.
template<FiniteFieldType T>
long double HammingUpperBound (size_t n, size_t dmin)
template<FiniteFieldType T>
long double JohnsonUpperBound (size_t n, size_t dmin)
template<FiniteFieldType T>
long double PlotkinUpperBound (size_t n, size_t dmin)
template<FiniteFieldType T>
long double EliasUpperBound (size_t n, size_t dmin)
size_t SingletonUpperBound (size_t n, size_t dmin)
template<FiniteFieldType T>
size_t GriesmerUpperBound (size_t n, size_t dmin)
template<FiniteFieldType T>
long double UpperBound (size_t n, size_t dmin)
template<FiniteFieldType T>
size_t GilbertVarshamovLowerBound (size_t n, size_t dmin)
template<FiniteFieldType T>
size_t BurstUpperBound (size_t n, size_t ell)
constexpr size_t ReigerBurstUpperBound (size_t n, size_t ell)
template<FiniteFieldType T>
Polynomial< InfInt > MacWilliamsIdentity (const Polynomial< InfInt > &A, size_t n, size_t k)
std::ostream & showbasic (std::ostream &os)
std::ostream & showmost (std::ostream &os)
std::ostream & showall (std::ostream &os)
std::ostream & showspecial (std::ostream &os)
template<class B>
 SubfieldSubcode (const B &) -> SubfieldSubcode< B >
template<class B>
 SubfieldSubcode (B &&) -> SubfieldSubcode< B >
template<FieldType T>
auto dual (const LinearCode< T > &C)
template<class B>
auto extend (B &&base, size_t i, const Vector< field_t< B > > &v)
template<class B>
auto extend (B &&base)
template<FieldType T, class B>
B unextend (const ExtendedCode< T, B > &C)
template<class B>
auto augment (B &&base, size_t j, const Vector< field_t< B > > &w)
template<FieldType T, class B>
B unaugment (const AugmentedCode< T, B > &C)
template<class B>
auto lengthen (B &&base, size_t j, const Vector< field_t< B > > &w, size_t i, const Vector< field_t< B > > &v)
template<class B>
auto lengthen (B &&base, size_t j, const Vector< field_t< B > > &w)
template<FieldType T, class D>
auto unlengthen (const ExtendedCode< T, AugmentedCode< T, D > > &C)
template<FieldType T>
LinearCode< T > puncture (const LinearCode< T > &C, const std::vector< size_t > &v)
template<FieldType T>
EmptyCode< T > puncture (const EmptyCode< T > &, const std::vector< size_t > &)
template<class C>
auto puncture (C &&code, size_t i)
template<FieldType T>
LinearCode< T > expurgate (const LinearCode< T > &C, const std::vector< size_t > &v)
template<FieldType T>
EmptyCode< T > expurgate (const EmptyCode< T > &, const std::vector< size_t > &)
template<class C>
auto expurgate (C &&code, size_t j)
template<class B>
auto shorten (B &&base, size_t j, size_t i)
template<FieldType L, FieldType R>
bool operator== (const LinearCode< L > &lhs, const LinearCode< R > &rhs)
template<FieldType L, FieldType R>
bool operator!= (const LinearCode< L > &lhs, const LinearCode< R > &rhs)
template<FieldType L, FieldType R>
bool identical (const LinearCode< L > &lhs, const LinearCode< R > &rhs)
template<FieldType L, FieldType R>
bool equivalent (const LinearCode< L > &lhs, const LinearCode< R > &rhs)
template<FieldType T>
std::ostream & operator<< (std::ostream &os, const Code< T > &rhs)
template<SignedIntType T>
std::ostream & operator<< (std::ostream &os, const Rationals< T > &e)
 Print as "numerator/denominator" (or just "numerator" when denominator is 1).
template<uint16_t p>
std::ostream & operator<< (std::ostream &os, const Fp< p > &e)
 Print as the integer label (or ERASURE_MARKER if erased).
template<FiniteFieldType B, MOD modulus, LutMode mode>
std::ostream & operator<< (std::ostream &os, const Ext< B, modulus, mode > &e)
 Print as the integer label (or ERASURE_MARKER if erased).
template<FieldType T>
std::ostream & operator<< (std::ostream &os, const Trellis< T > &Tr)
std::mt19937 & gen ()
 Current thread's random number generator.
template<class T>
std::vector< size_t > find_maxima (const std::vector< T > &v)
 Indices of all maximum elements.
template<class T>
constexpr bool is_prime (T a) noexcept
 Primality test by trial division.
template<class T>
constexpr T GCD (T a, T b, T *s=nullptr, T *t=nullptr)
 Greatest common divisor and optional Bézout coefficients.
template<uint16_t p, class T>
constexpr T modinv (T a)
 Multiplicative inverse modulo a prime.
template<class T>
T fac (T a)
 Factorial a!
template<class T>
T bin (const T &n, T k)
 Binomial coefficient C(n,k).
template<>
InfInt bin (const InfInt &n, InfInt k)
 Binomial coefficient specialization for InfInt.
long double log2 (const InfInt &v)
 Base-2 logarithm of a positive InfInt of arbitrary magnitude.
long double to_long_double (const InfInt &v)
 Conversion of an InfInt of arbitrary magnitude to long double.
template<class T>
constexpr T sqm (T b, int e)
 Exponentiation by square-and-multiply.
template<class T>
constexpr T daa (T b, int m)
 Scalar multiplication by double-and-add.
template<ComponentType T>
constexpr Matrix< T > ZeroMatrix (size_t m, size_t n)
 m × n matrix of zeros (tag details::Zero)
template<ComponentType T>
constexpr Matrix< T > IdentityMatrix (size_t m)
 m × m identity matrix I_m
template<ComponentType T>
constexpr Matrix< T > DiagonalMatrix (const Vector< T > &v)
 Diagonal matrix with diagonal v (strongest tag of details::Zero, details::Identity, details::Diagonal).
template<ComponentType T>
constexpr Matrix< T > ToeplitzMatrix (const Vector< T > &v, size_t m, size_t n)
 m × n Toeplitz matrix from its diagonal entries
template<ReliablyComparableType T>
constexpr Matrix< T > VandermondeMatrix (const Vector< T > &v, size_t m)
 Vandermonde matrix V_{i, j} = v[j]^i.
template<ComponentType T>
std::ostream & operator<< (std::ostream &os, const Matrix< T > &rhs)
 Pretty-print the matrix with column alignment and bracket borders.
template<ComponentType T>
constexpr Matrix< T > operator+ (const Matrix< T > &lhs, const Matrix< T > &rhs)
template<ComponentType T>
constexpr Matrix< T > operator+ (Matrix< T > &&lhs, const Matrix< T > &rhs)
template<ComponentType T>
constexpr Matrix< T > operator+ (const Matrix< T > &lhs, Matrix< T > &&rhs)
template<ComponentType T>
constexpr Matrix< T > operator+ (Matrix< T > &&lhs, Matrix< T > &&rhs)
template<ComponentType T>
constexpr Matrix< T > operator- (const Matrix< T > &lhs, const Matrix< T > &rhs)
template<ComponentType T>
constexpr Matrix< T > operator- (Matrix< T > &&lhs, const Matrix< T > &rhs)
template<ComponentType T>
constexpr Matrix< T > operator- (const Matrix< T > &lhs, Matrix< T > &&rhs)
template<ComponentType T>
constexpr Matrix< T > operator- (Matrix< T > &&lhs, Matrix< T > &&rhs)
template<ComponentType T>
constexpr Matrix< T > operator* (const Matrix< T > &lhs, const Matrix< T > &rhs)
template<ComponentType T>
constexpr Matrix< T > operator* (Matrix< T > &&lhs, const Matrix< T > &rhs)
template<ComponentType T>
constexpr Vector< T > operator* (const Vector< T > &lhs, const Matrix< T > &rhs)
template<ComponentType T>
constexpr Vector< T > operator* (Vector< T > &&lhs, const Matrix< T > &rhs)
template<ComponentType T>
constexpr Matrix< T > operator* (const Matrix< T > &lhs, const T &rhs)
template<ComponentType T>
constexpr Matrix< T > operator* (Matrix< T > &&lhs, const T &rhs)
template<ComponentType T>
constexpr Matrix< T > operator* (const T &lhs, const Matrix< T > &rhs)
template<ComponentType T>
constexpr Matrix< T > operator* (const T &lhs, Matrix< T > &&rhs)
template<CoefficientType T>
constexpr Matrix< T > operator/ (const Matrix< T > &lhs, const T &rhs)
template<CoefficientType T>
constexpr Matrix< T > operator/ (Matrix< T > &&lhs, const T &rhs)
template<CoefficientType T>
Matrix< T > randomize (const Matrix< T > &M)
template<CoefficientType T>
Matrix< T > randomize (Matrix< T > &&M)
template<ReliablyComparableType T>
constexpr size_t wH (const Matrix< T > &M)
template<ReliablyComparableType T>
size_t dH (const Matrix< T > &lhs, const Matrix< T > &rhs)
 Hamming distance dₕ(lhs, rhs) = wₕ(lhs − rhs).
template<ReliablyComparableType T>
size_t dH (Matrix< T > &&lhs, const Matrix< T > &rhs)
template<ReliablyComparableType T>
size_t dH (const Matrix< T > &lhs, Matrix< T > &&rhs)
template<ReliablyComparableType T>
size_t dH (Matrix< T > &&lhs, Matrix< T > &&rhs)
template<ComponentType T>
Matrix< T > set_component (const Matrix< T > &M, size_t i, size_t j, const T &c)
template<ComponentType T>
Matrix< T > set_component (Matrix< T > &&M, size_t i, size_t j, const T &c)
template<ComponentType T>
Matrix< T > get_submatrix (const Matrix< T > &M, size_t i, size_t j, size_t h, size_t w)
template<ComponentType T>
Matrix< T > set_submatrix (const Matrix< T > &M, size_t i, size_t j, const Matrix< T > &N)
template<ComponentType T>
Matrix< T > set_submatrix (Matrix< T > &&M, size_t i, size_t j, const Matrix< T > &N)
template<ComponentType T>
Matrix< T > horizontal_join (const Matrix< T > &lhs, const Matrix< T > &rhs)
template<ComponentType T>
Matrix< T > horizontal_join (Matrix< T > &&lhs, const Matrix< T > &rhs)
template<ComponentType T>
Matrix< T > horizontal_join (Matrix< T > &&lhs, Matrix< T > &&rhs)
template<ComponentType T>
Matrix< T > vertical_join (const Matrix< T > &lhs, const Matrix< T > &rhs)
template<ComponentType T>
Matrix< T > vertical_join (Matrix< T > &&lhs, const Matrix< T > &rhs)
template<ComponentType T>
Matrix< T > vertical_join (Matrix< T > &&lhs, Matrix< T > &&rhs)
template<ComponentType T>
Matrix< T > diagonal_join (const Matrix< T > &lhs, const Matrix< T > &rhs)
template<ComponentType T>
Matrix< T > diagonal_join (Matrix< T > &&lhs, const Matrix< T > &rhs)
template<ComponentType T>
Matrix< T > diagonal_join (Matrix< T > &&lhs, Matrix< T > &&rhs)
template<ComponentType T>
Matrix< T > Kronecker_product (const Matrix< T > &lhs, const Matrix< T > &rhs)
template<ComponentType T>
Matrix< T > Kronecker_product (Matrix< T > &&lhs, const Matrix< T > &rhs)
template<ComponentType T>
Matrix< T > Kronecker_product (Matrix< T > &&lhs, Matrix< T > &&rhs)
template<ComponentType T>
Matrix< T > swap_rows (const Matrix< T > &M, size_t i, size_t j)
template<ComponentType T>
Matrix< T > swap_columns (const Matrix< T > &M, size_t i, size_t j)
template<ComponentType T>
Matrix< T > swap_rows (Matrix< T > &&M, size_t i, size_t j)
template<ComponentType T>
Matrix< T > swap_columns (Matrix< T > &&M, size_t i, size_t j)
template<ComponentType T>
Matrix< T > scale_row (const Matrix< T > &M, const T &s, size_t i)
template<ComponentType T>
Matrix< T > scale_column (const Matrix< T > &M, const T &s, size_t i)
template<ComponentType T>
Matrix< T > scale_row (Matrix< T > &&M, const T &s, size_t i)
template<ComponentType T>
Matrix< T > scale_column (Matrix< T > &&M, const T &s, size_t i)
template<ComponentType T>
Matrix< T > add_scaled_row (const Matrix< T > &M, const T &s, size_t i, size_t j)
template<ComponentType T>
Matrix< T > add_scaled_column (const Matrix< T > &M, const T &s, size_t i, size_t j)
template<ComponentType T>
Matrix< T > add_scaled_row (Matrix< T > &&M, const T &s, size_t i, size_t j)
template<ComponentType T>
Matrix< T > add_scaled_column (Matrix< T > &&M, const T &s, size_t i, size_t j)
template<ComponentType T>
Matrix< T > add_row (const Matrix< T > &M, size_t i, size_t j)
template<ComponentType T>
Matrix< T > add_column (const Matrix< T > &M, size_t i, size_t j)
template<ComponentType T>
Matrix< T > add_row (Matrix< T > &&M, size_t i, size_t j)
template<ComponentType T>
Matrix< T > add_column (Matrix< T > &&M, size_t i, size_t j)
template<ComponentType T>
constexpr Matrix< T > delete_columns (const Matrix< T > &lhs, const std::vector< size_t > &v)
template<ComponentType T>
constexpr Matrix< T > delete_columns (Matrix< T > &&lhs, const std::vector< size_t > &v)
template<ComponentType T>
constexpr Matrix< T > delete_column (const Matrix< T > &lhs, size_t i)
template<ComponentType T>
constexpr Matrix< T > delete_column (Matrix< T > &&lhs, size_t i)
template<ComponentType T>
constexpr Matrix< T > delete_rows (const Matrix< T > &lhs, const std::vector< size_t > &v)
template<ComponentType T>
constexpr Matrix< T > delete_rows (Matrix< T > &&lhs, const std::vector< size_t > &v)
template<ComponentType T>
constexpr Matrix< T > delete_row (const Matrix< T > &lhs, size_t i)
template<ComponentType T>
constexpr Matrix< T > delete_row (Matrix< T > &&lhs, size_t i)
template<ComponentType T>
constexpr Matrix< T > erase_component (const Matrix< T > &lhs, size_t i, size_t j)
template<ComponentType T>
constexpr Matrix< T > erase_component (Matrix< T > &&lhs, size_t i, size_t j)
template<ComponentType T>
constexpr Matrix< T > unerase_component (const Matrix< T > &lhs, size_t i, size_t j)
template<ComponentType T>
constexpr Matrix< T > unerase_component (Matrix< T > &&lhs, size_t i, size_t j)
template<ComponentType T>
constexpr Matrix< T > erase_columns (const Matrix< T > &lhs, const std::vector< size_t > &v)
template<ComponentType T>
constexpr Matrix< T > erase_columns (Matrix< T > &&lhs, const std::vector< size_t > &v)
template<ComponentType T>
constexpr Matrix< T > erase_column (const Matrix< T > &lhs, size_t i)
template<ComponentType T>
constexpr Matrix< T > erase_column (Matrix< T > &&lhs, size_t i)
template<ComponentType T>
constexpr Matrix< T > unerase_columns (const Matrix< T > &lhs, const std::vector< size_t > &v)
template<ComponentType T>
constexpr Matrix< T > unerase_columns (Matrix< T > &&lhs, const std::vector< size_t > &v)
template<ComponentType T>
constexpr Matrix< T > unerase_column (const Matrix< T > &lhs, size_t i)
template<ComponentType T>
constexpr Matrix< T > unerase_column (Matrix< T > &&lhs, size_t i)
template<ComponentType T>
constexpr Matrix< T > erase_rows (const Matrix< T > &lhs, const std::vector< size_t > &v)
template<ComponentType T>
constexpr Matrix< T > erase_rows (Matrix< T > &&lhs, const std::vector< size_t > &v)
template<ComponentType T>
constexpr Matrix< T > erase_row (const Matrix< T > &lhs, size_t i)
template<ComponentType T>
constexpr Matrix< T > erase_row (Matrix< T > &&lhs, size_t i)
template<ComponentType T>
constexpr Matrix< T > unerase_rows (const Matrix< T > &lhs, const std::vector< size_t > &v)
template<ComponentType T>
constexpr Matrix< T > unerase_rows (Matrix< T > &&lhs, const std::vector< size_t > &v)
template<ComponentType T>
constexpr Matrix< T > unerase_row (const Matrix< T > &lhs, size_t i)
template<ComponentType T>
constexpr Matrix< T > unerase_row (Matrix< T > &&lhs, size_t i)
template<ComponentType T>
Matrix< T > reverse_rows (const Matrix< T > &M)
template<ComponentType T>
Matrix< T > reverse_rows (Matrix< T > &&M)
template<ComponentType T>
Matrix< T > reverse_columns (const Matrix< T > &M)
template<ComponentType T>
Matrix< T > reverse_columns (Matrix< T > &&M)
template<ComponentType T>
constexpr Matrix< T > fill (const Matrix< T > &m, const T &value)
template<ComponentType T>
constexpr Matrix< T > fill (Matrix< T > &&m, const T &value)
template<ComponentType T>
constexpr Matrix< T > transpose (const Matrix< T > &M)
template<ComponentType T>
constexpr Matrix< T > transpose (Matrix< T > &&M)
template<FieldType T>
Matrix< T > rref (const Matrix< T > &M)
template<FieldType T>
Matrix< T > rref (Matrix< T > &&M)
template<FieldType T>
Matrix< T > inverse (const Matrix< T > &M)
template<FieldType T>
Matrix< T > inverse (Matrix< T > &&M)
template<ReliablyComparableType T>
constexpr bool operator== (const Matrix< T > &lhs, const Matrix< T > &rhs)
 Equality of two matrices.
template<ReliablyComparableType T>
constexpr bool operator!= (const Matrix< T > &lhs, const Matrix< T > &rhs)
 Negation of operator==.
template<ComponentType T>
Matrix< T > PermutationMatrix (const std::vector< size_t > &perm)
 Permutation matrix P with P_{i, perm[i]} = 1.
template<ComponentType T>
constexpr Matrix< T > ExchangeMatrix (size_t m)
 m × m exchange matrix (ones on the anti-diagonal)
template<ComponentType T>
constexpr Matrix< T > HankelMatrix (const Vector< T > &v, size_t m, size_t n)
 m × n Hankel matrix from its anti-diagonal entries
template<ComponentType T>
constexpr Matrix< T > UpperShiftMatrix (size_t m)
 m × m upper shift matrix (ones on the superdiagonal)
template<ComponentType T>
constexpr Matrix< T > LowerShiftMatrix (size_t m)
 m × m lower shift matrix (ones on the subdiagonal); transpose of UpperShiftMatrix
template<CoefficientType T>
constexpr Matrix< T > CompanionMatrix (const Polynomial< T > &poly)
 Companion matrix of a monic polynomial p(x) = x^n + a_{n−1} x^{n−1} + … + a_0.
template<CoefficientType T>
std::ostream & operator<< (std::ostream &os, const Polynomial< T > &rhs)
template<CoefficientType T>
const Polynomial< T > & ZeroPolynomial ()
 Constant polynomial 0 (cached).
template<CoefficientType T>
constexpr Polynomial< T > operator+ (const Polynomial< T > &lhs, const Polynomial< T > &rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator+ (Polynomial< T > &&lhs, const Polynomial< T > &rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator+ (const Polynomial< T > &lhs, Polynomial< T > &&rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator+ (Polynomial< T > &&lhs, Polynomial< T > &&rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator- (const Polynomial< T > &lhs, const Polynomial< T > &rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator- (Polynomial< T > &&lhs, const Polynomial< T > &rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator- (const Polynomial< T > &lhs, Polynomial< T > &&rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator- (Polynomial< T > &&lhs, Polynomial< T > &&rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator* (const Polynomial< T > &lhs, const Polynomial< T > &rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator* (Polynomial< T > &&lhs, const Polynomial< T > &rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator* (const Polynomial< T > &lhs, Polynomial< T > &&rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator* (Polynomial< T > &&lhs, Polynomial< T > &&rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator/ (const Polynomial< T > &lhs, const Polynomial< T > &rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator/ (Polynomial< T > &&lhs, const Polynomial< T > &rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator% (const Polynomial< T > &lhs, const Polynomial< T > &rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator% (Polynomial< T > &&lhs, const Polynomial< T > &rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator* (const Polynomial< T > &lhs, const T &rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator* (Polynomial< T > &&lhs, const T &rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator* (const T &lhs, const Polynomial< T > &rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator* (const T &lhs, Polynomial< T > &&rhs)
template<FieldType T>
constexpr Polynomial< T > operator/ (const Polynomial< T > &lhs, const T &rhs)
template<FieldType T>
constexpr Polynomial< T > operator/ (Polynomial< T > &&lhs, const T &rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator* (const Polynomial< T > &lhs, size_t n)
template<CoefficientType T>
constexpr Polynomial< T > operator* (Polynomial< T > &&lhs, size_t n)
template<CoefficientType T>
constexpr Polynomial< T > operator* (size_t n, const Polynomial< T > &rhs)
template<CoefficientType T>
constexpr Polynomial< T > operator* (size_t n, Polynomial< T > &&rhs)
template<CoefficientType T>
std::pair< Polynomial< T >, Polynomial< T > > poly_long_div (const Polynomial< T > &lhs, const Polynomial< T > &rhs)
template<CoefficientType T>
std::pair< Polynomial< T >, Polynomial< T > > poly_long_div (Polynomial< T > &&lhs, const Polynomial< T > &rhs)
template<CoefficientType T>
requires FieldType<T>
constexpr Polynomial< T > derivative (const Polynomial< T > &poly, size_t s)
template<CoefficientType T>
requires FieldType<T>
constexpr Polynomial< T > derivative (Polynomial< T > &&poly, size_t s)
template<CoefficientType T>
requires FieldType<T>
constexpr Polynomial< T > Hasse_derivative (const Polynomial< T > &poly, size_t s)
template<CoefficientType T>
requires FieldType<T>
constexpr Polynomial< T > Hasse_derivative (Polynomial< T > &&poly, size_t s)
template<CoefficientType T>
constexpr Polynomial< T > reciprocal (const Polynomial< T > &poly)
template<CoefficientType T>
constexpr Polynomial< T > reciprocal (Polynomial< T > &&poly)
template<CoefficientType T>
requires ReliablyComparableType<T>
constexpr Polynomial< T > shift_up (const Polynomial< T > &poly, size_t s)
template<CoefficientType T>
requires ReliablyComparableType<T>
constexpr Polynomial< T > shift_up (Polynomial< T > &&poly, size_t s)
template<CoefficientType T>
constexpr Polynomial< T > shift_down (const Polynomial< T > &poly, size_t s)
template<CoefficientType T>
constexpr Polynomial< T > shift_down (Polynomial< T > &&poly, size_t s)
template<CoefficientType T>
requires FieldType<T>
constexpr Polynomial< T > normalize (const Polynomial< T > &poly)
template<CoefficientType T>
requires FieldType<T>
constexpr Polynomial< T > normalize (Polynomial< T > &&poly)
template<ReliablyComparableType T>
constexpr bool operator== (const Polynomial< T > &lhs, const Polynomial< T > &rhs)
template<ReliablyComparableType T>
constexpr bool operator!= (const Polynomial< T > &lhs, const Polynomial< T > &rhs)
template<CoefficientType T>
constexpr Polynomial< T > Monomial (size_t i, const T &a=T(1))
 Monomial a · xⁱ
template<CoefficientType T>
const Polynomial< T > & OnePolynomial ()
 Constant polynomial 1 (cached).
template<CoefficientType T>
requires FieldType<T>
Polynomial< T > GCD (Polynomial< T > a, Polynomial< T > b, Polynomial< T > *s_ptr=nullptr, Polynomial< T > *t_ptr=nullptr)
 Greatest common divisor of two polynomials via the (extended) Euclidean algorithm.
template<CoefficientType T>
requires FieldType<T>
Polynomial< T > GCD (const std::vector< Polynomial< T > > &polys)
 Greatest common divisor of a list of polynomials, computed iteratively.
template<CoefficientType T>
requires FieldType<T>
Polynomial< T > LCM (const Polynomial< T > &a, const Polynomial< T > &b)
 Least common multiple lcm(a, b) = (a · b) / gcd(a, b).
template<CoefficientType T>
requires FieldType<T>
Polynomial< T > LCM (const std::vector< Polynomial< T > > &polys)
 Least common multiple of a list of polynomials, computed iteratively.
template<CoefficientType T>
constexpr Polynomial< T > operator^ (const Polynomial< T > &base, int exponent)
 Polynomial exponentiation by square-and-multiply.
template<uint16_t p, size_t m>
constexpr Vector< Fp< p > > ConwayCoefficients ()
 Coefficient vector [a₀, a₁, …, aₘ] of the Conway polynomial for 𝔽_{p^m}.
template<uint16_t p, size_t m>
constexpr Polynomial< Fp< p > > ConwayPolynomial ()
 Conway polynomial for 𝔽_{p^m} as a Polynomial<Fp<p>>.
template<FiniteFieldType T>
Polynomial< T > find_irreducible (size_t degree)
 Sample a random monic irreducible polynomial of degree degree over T.
template<ComponentType T>
T inner_product (const Vector< T > &lhs, const Vector< T > &rhs)
 Inner product ⟨lhs, rhs⟩ = Σᵢ lhs[i] · rhs[i].
template<ComponentType T>
Vector< T > Schur_product (const Vector< T > &lhs, const Vector< T > &rhs)
 Schur (component-wise) product.
template<ComponentType T>
Vector< T > unit_vector (size_t length, size_t i)
 Length-length vector with T(1) at index i and zeros elsewhere.
template<ComponentType T>
std::ostream & operator<< (std::ostream &os, const Vector< T > &rhs)
 Stream output as ( c₀, c₁, …, cₙ₋₁ ).
template<CoefficientType T>
 Vector (const Polynomial< T > &) -> Vector< T >
 Deduction guide: a vector constructed from a polynomial deduces the coefficient type.
template<ComponentType T>
Vector< T > delete_component (const Vector< T > &lhs, size_t i)
template<ComponentType T>
Vector< T > delete_component (Vector< T > &&lhs, size_t i)
template<ComponentType T>
constexpr Vector< T > operator+ (const Vector< T > &lhs, const Vector< T > &rhs)
template<ComponentType T>
constexpr Vector< T > operator+ (Vector< T > &&lhs, const Vector< T > &rhs)
template<ComponentType T>
constexpr Vector< T > operator+ (const Vector< T > &lhs, Vector< T > &&rhs)
template<ComponentType T>
constexpr Vector< T > operator+ (Vector< T > &&lhs, Vector< T > &&rhs)
template<ComponentType T>
constexpr Vector< T > operator- (const Vector< T > &lhs, const Vector< T > &rhs)
template<ComponentType T>
constexpr Vector< T > operator- (Vector< T > &&lhs, const Vector< T > &rhs)
template<ComponentType T>
constexpr Vector< T > operator- (const Vector< T > &lhs, Vector< T > &&rhs)
template<ComponentType T>
constexpr Vector< T > operator- (Vector< T > &&lhs, Vector< T > &&rhs)
template<ComponentType T>
constexpr Vector< T > operator* (const Vector< T > &lhs, const T &rhs)
template<ComponentType T>
constexpr Vector< T > operator* (Vector< T > &&lhs, const T &rhs)
template<ComponentType T>
constexpr Vector< T > operator* (const T &lhs, const Vector< T > &rhs)
template<ComponentType T>
constexpr Vector< T > operator* (const T &lhs, Vector< T > &&rhs)
template<CoefficientType T>
constexpr Vector< T > operator/ (const Vector< T > &lhs, const T &rhs)
template<CoefficientType T>
constexpr Vector< T > operator/ (Vector< T > &&lhs, const T &rhs)
template<CoefficientType T>
Vector< T > convolve (const Vector< T > &v, const Vector< T > &w)
 Discrete linear convolution (= coefficients of Polynomial(v) * Polynomial(w)); the result always has length v.get_n() + w.get_n() - 1.
template<CoefficientType T>
Vector< T > randomize (const Vector< T > &v)
template<CoefficientType T>
Vector< T > randomize (Vector< T > &&v)
template<ComponentType T>
Vector< T > set_component (const Vector< T > &v, size_t i, const T &c)
template<ComponentType T>
Vector< T > set_component (Vector< T > &&v, size_t i, const T &c)
template<ComponentType T>
constexpr Vector< T > get_subvector (const Vector< T > &v, size_t start, size_t end)
template<ComponentType T>
constexpr Vector< T > get_subvector (Vector< T > &&v, size_t start, size_t end)
template<ComponentType T>
constexpr Vector< T > set_subvector (Vector< T > v, size_t start, const Vector< T > &w)
template<ComponentType T>
constexpr Vector< T > set_subvector (Vector< T > &&v, size_t start, const Vector< T > &w)
template<ComponentType T>
constexpr Vector< T > concatenate (const Vector< T > &lhs, const Vector< T > &rhs)
template<ComponentType T>
constexpr Vector< T > concatenate (Vector< T > &&lhs, const Vector< T > &rhs)
template<ComponentType T>
constexpr Vector< T > concatenate (const Vector< T > &lhs, Vector< T > &&rhs)
template<ComponentType T>
constexpr Vector< T > concatenate (Vector< T > &&lhs, Vector< T > &&rhs)
template<ComponentType T>
Vector< T > delete_components (const Vector< T > &lhs, const std::vector< size_t > &v)
template<ComponentType T>
Vector< T > delete_components (Vector< T > &&lhs, const std::vector< size_t > &v)
template<ComponentType T>
Vector< T > erase_components (const Vector< T > &lhs, const std::vector< size_t > &v)
template<ComponentType T>
Vector< T > erase_components (Vector< T > &&lhs, const std::vector< size_t > &v)
template<ComponentType T>
Vector< T > erase_component (const Vector< T > &lhs, size_t i)
template<ComponentType T>
Vector< T > erase_component (Vector< T > &&lhs, size_t i)
template<ComponentType T>
Vector< T > unerase_components (const Vector< T > &lhs, const std::vector< size_t > &v)
template<ComponentType T>
Vector< T > unerase_components (Vector< T > &&lhs, const std::vector< size_t > &v)
template<ComponentType T>
Vector< T > unerase_component (const Vector< T > &lhs, size_t i)
template<ComponentType T>
Vector< T > unerase_component (Vector< T > &&lhs, size_t i)
template<ComponentType T>
constexpr Vector< T > pad_front (const Vector< T > &v, size_t n)
template<ComponentType T>
constexpr Vector< T > pad_front (Vector< T > &&v, size_t n)
template<ComponentType T>
constexpr Vector< T > pad_back (const Vector< T > &v, size_t n)
template<ComponentType T>
constexpr Vector< T > pad_back (Vector< T > &&v, size_t n)
template<ComponentType T>
constexpr Vector< T > rotate_left (const Vector< T > &v, size_t i)
template<ComponentType T>
constexpr Vector< T > rotate_left (Vector< T > &&v, size_t i)
template<ComponentType T>
constexpr Vector< T > rotate_right (const Vector< T > &v, size_t i)
template<ComponentType T>
constexpr Vector< T > rotate_right (Vector< T > &&v, size_t i)
template<ComponentType T>
constexpr Vector< T > reverse (const Vector< T > &v)
template<ComponentType T>
constexpr Vector< T > reverse (Vector< T > &&v)
template<ComponentType T>
constexpr Vector< T > fill (const Vector< T > &v, const T &value)
template<ComponentType T>
constexpr Vector< T > fill (Vector< T > &&v, const T &value)
template<ReliablyComparableType T>
constexpr bool operator== (const Vector< T > &lhs, const Vector< T > &rhs)
template<ReliablyComparableType T>
constexpr bool operator!= (const Vector< T > &lhs, const Vector< T > &rhs)
Field Arithmetic Operators

Free CRTP operators (+, −, *, /, ^) for any CECCO::FieldType

Each operator constructs a result by calling T's compound assignment, with rvalue overloads that move from a temporary instead of copying. Scalar multiplication takes the integer on either side. Division throws std::invalid_argument if the right operand is zero. operator^ exponentiates by square-and-multiply via CECCO::sqm.

Warning
operator^ does not follow C++ precedence for ^: in b * a ^ p the parser evaluates (b * a) ^ p. Parenthesise as b * (a ^ p), or call CECCO::sqm directly.
template<FieldType T>
constexpr T operator+ (const T &lhs, const T &rhs)
template<FieldType T>
constexpr T operator+ (T &&lhs, const T &rhs)
template<FieldType T>
constexpr T operator+ (const T &lhs, T &&rhs)
template<FieldType T>
constexpr T operator+ (T &&lhs, T &&rhs)
template<FieldType T>
constexpr T operator- (const T &lhs, const T &rhs)
template<FieldType T>
constexpr T operator- (T &&lhs, const T &rhs)
template<FieldType T>
constexpr T operator- (const T &lhs, T &&rhs)
template<FieldType T>
constexpr T operator- (T &&lhs, T &&rhs)
template<FieldType T>
constexpr T operator* (const T &lhs, const T &rhs)
template<FieldType T>
constexpr T operator* (T &&lhs, const T &rhs)
template<FieldType T>
constexpr T operator* (const T &lhs, T &&rhs)
template<FieldType T>
constexpr T operator* (T &&lhs, T &&rhs)
template<FieldType T>
constexpr T operator* (const T &lhs, int rhs)
template<FieldType T>
constexpr T operator* (int lhs, const T &rhs)
template<FieldType T>
constexpr T operator* (T &&lhs, int rhs)
template<FieldType T>
constexpr T operator* (int lhs, T &&rhs)
template<FieldType T>
T operator/ (const T &lhs, const T &rhs)
template<FieldType T>
T operator/ (T &&lhs, const T &rhs)
template<FieldType T>
constexpr T operator^ (const T &base, int exponent)
template<FieldType T>
constexpr T operator^ (T &&base, int exponent)
Error control coding-related functions
double dE (const Vector< std::complex< double > > &lhs, const Vector< std::complex< double > > &rhs)
 Euclidean distance ‖lhs − rhs‖₂ = √(Σᵢ |lhs[i] − rhs[i]|²) for complex vectors.
template<ReliablyComparableType T>
constexpr size_t wH (const Vector< T > &v)
 Hamming weight; see Vector::wH for semantics.
template<ReliablyComparableType T>
std::vector< size_t > supp (const Vector< T > &v)
 Support; see Vector::supp for semantics.
template<ReliablyComparableType T>
size_t dH (const Vector< T > &lhs, const Vector< T > &rhs)
 Hamming distance dₕ(lhs, rhs) = wₕ(lhs − rhs).
template<ReliablyComparableType T>
size_t dH (Vector< T > &&lhs, const Vector< T > &rhs)
template<ReliablyComparableType T>
size_t dH (const Vector< T > &lhs, Vector< T > &&rhs)
template<ReliablyComparableType T>
size_t dH (Vector< T > &&lhs, Vector< T > &&rhs)
template<ReliablyComparableType T>
constexpr size_t burst_length (const Vector< T > &v)
 Burst length; see Vector::burst_length for semantics.
template<ReliablyComparableType T>
constexpr size_t cyclic_burst_length (const Vector< T > &v)
 Cyclic burst length; see Vector::cyclic_burst_length for semantics.

Variables

constexpr std::string_view ERASURE_MARKER = "X"

Detailed Description

Provides a framework for error correcting codes.

Typedef Documentation

◆ base_t

template<class B>
using CECCO::base_t = std::remove_cvref_t<B>

Definition at line 6975 of file codes.hpp.

◆ BSC

using CECCO::BSC = SDMC<Fp<2>>

Binary Symmetric Channel: type alias for SDMC<Fp<2>>.

Bits are flipped with probability pe.

See also
CECCO::SDMC, CECCO::BEC

Definition at line 366 of file blocks.hpp.

◆ field_t

template<class C>
using CECCO::field_t = typename base_t<C>::FIELD

Definition at line 6978 of file codes.hpp.

◆ label_t

template<uint16_t p, uint8_t m = 1>
using CECCO::label_t = typename std::conditional_t<sqm(p, m) < 255, uint8_t, uint16_t>

Definition at line 779 of file fields.hpp.

Enumeration Type Documentation

◆ list_method_t

enum class CECCO::list_method_t
strong
Enumerator
Viterbi 
Viterbi_soft 
SA 
SA_optimized 
GSA 
GSA_optimized 
KVA 

Definition at line 451 of file codes.hpp.

◆ list_processing_t

enum class CECCO::list_processing_t
strong
Enumerator
pick_first 
pick_random 

Definition at line 453 of file codes.hpp.

◆ LutMode

enum class CECCO::LutMode
strong

LUT generation mode for field operations.

Enumerator
CompileTime 

Generate LUTs at compile-time using constexpr (default).

RunTime 

Generate LUTs at runtime using lazy initialization.

Definition at line 55 of file field_concepts_traits.hpp.

◆ method_t

enum class CECCO::method_t
strong
Enumerator
BD 
standard_array 
BD_standard_array 
boosted_BD_standard_array 
ML 
ML_soft 
Viterbi 
Viterbi_soft 
BCJR 
ssMAP 
BP 
recursive 
Meggitt 
WBA 
WBA_optimized 
BMA 
OSD 
LC_OSD 
WBA_EE 
BMA_EE 
BD_EE 
ML_EE 
Viterbi_EE 
recursive_EE 
GMD 

Definition at line 421 of file codes.hpp.

◆ termination_t

enum class CECCO::termination_t
strong
Enumerator
zero_terminated 
tailbitten 

Definition at line 5387 of file codes.hpp.

Function Documentation

◆ add_column() [1/2]

template<ComponentType T>
Matrix< T > CECCO::add_column ( const Matrix< T > & M,
size_t i,
size_t j )

Definition at line 3390 of file matrices.hpp.

◆ add_column() [2/2]

template<ComponentType T>
Matrix< T > CECCO::add_column ( Matrix< T > && M,
size_t i,
size_t j )

Definition at line 3404 of file matrices.hpp.

◆ add_row() [1/2]

template<ComponentType T>
Matrix< T > CECCO::add_row ( const Matrix< T > & M,
size_t i,
size_t j )

Definition at line 3383 of file matrices.hpp.

◆ add_row() [2/2]

template<ComponentType T>
Matrix< T > CECCO::add_row ( Matrix< T > && M,
size_t i,
size_t j )

Definition at line 3397 of file matrices.hpp.

◆ add_scaled_column() [1/2]

template<ComponentType T>
Matrix< T > CECCO::add_scaled_column ( const Matrix< T > & M,
const T & s,
size_t i,
size_t j )

Definition at line 3362 of file matrices.hpp.

◆ add_scaled_column() [2/2]

template<ComponentType T>
Matrix< T > CECCO::add_scaled_column ( Matrix< T > && M,
const T & s,
size_t i,
size_t j )

Definition at line 3376 of file matrices.hpp.

◆ add_scaled_row() [1/2]

template<ComponentType T>
Matrix< T > CECCO::add_scaled_row ( const Matrix< T > & M,
const T & s,
size_t i,
size_t j )

Definition at line 3355 of file matrices.hpp.

◆ add_scaled_row() [2/2]

template<ComponentType T>
Matrix< T > CECCO::add_scaled_row ( Matrix< T > && M,
const T & s,
size_t i,
size_t j )

Definition at line 3369 of file matrices.hpp.

◆ augment()

template<class B>
auto CECCO::augment ( B && base,
size_t j,
const Vector< field_t< B > > & w )

Definition at line 7002 of file codes.hpp.

◆ bin() [1/2]

template<>
InfInt CECCO::bin ( const InfInt & n,
InfInt k )
inline

Binomial coefficient specialization for InfInt.

Parameters
nTotal number of items
kNumber of items to choose
Returns
C(n,k) as an InfInt

Builds numerator and denominator separately, then performs one division.

Definition at line 281 of file helpers.hpp.

Here is the call graph for this function:

◆ bin() [2/2]

template<class T>
T CECCO::bin ( const T & n,
T k )

Binomial coefficient C(n,k).

Template Parameters
TInteger type
Parameters
nTotal number of items
kNumber of items to choose
Returns
C(n,k) = n! / (k! * (n-k)!)

Uses the multiplicative formula and the symmetry C(n,k) = C(n,n-k).

Definition at line 263 of file helpers.hpp.

◆ burst_length()

template<ReliablyComparableType T>
size_t CECCO::burst_length ( const Vector< T > & v)
constexpr

Burst length; see Vector::burst_length for semantics.

Definition at line 1713 of file vectors.hpp.

◆ BurstUpperBound()

template<FiniteFieldType T>
size_t CECCO::BurstUpperBound ( size_t n,
size_t ell )

Definition at line 216 of file code_bounds.hpp.

◆ CompanionMatrix()

template<CoefficientType T>
Matrix< T > CECCO::CompanionMatrix ( const Polynomial< T > & poly)
constexpr

Companion matrix of a monic polynomial p(x) = x^n + a_{n−1} x^{n−1} + … + a_0.

Parameters
polyMonic polynomial of degree n
Returns
n × n matrix whose characteristic polynomial is poly

Built from a lower shift matrix; the last column holds the negated coefficients of poly.

Exceptions
std::invalid_argumentif poly is not monic

Definition at line 4050 of file matrices.hpp.

◆ concatenate() [1/4]

template<ComponentType T>
Vector< T > CECCO::concatenate ( const Vector< T > & lhs,
const Vector< T > & rhs )
constexpr

Definition at line 1397 of file vectors.hpp.

◆ concatenate() [2/4]

template<ComponentType T>
Vector< T > CECCO::concatenate ( const Vector< T > & lhs,
Vector< T > && rhs )
constexpr

Definition at line 1411 of file vectors.hpp.

◆ concatenate() [3/4]

template<ComponentType T>
Vector< T > CECCO::concatenate ( Vector< T > && lhs,
const Vector< T > & rhs )
constexpr

Definition at line 1404 of file vectors.hpp.

◆ concatenate() [4/4]

template<ComponentType T>
Vector< T > CECCO::concatenate ( Vector< T > && lhs,
Vector< T > && rhs )
constexpr

Definition at line 1418 of file vectors.hpp.

◆ convolve()

template<CoefficientType T>
Vector< T > CECCO::convolve ( const Vector< T > & v,
const Vector< T > & w )

Discrete linear convolution (= coefficients of Polynomial(v) * Polynomial(w)); the result always has length v.get_n() + w.get_n() - 1.

Exceptions
std::invalid_argumentif either input is empty

Definition at line 1341 of file vectors.hpp.

◆ ConwayCoefficients()

template<uint16_t p, size_t m>
Vector< Fp< p > > CECCO::ConwayCoefficients ( )
constexpr

Coefficient vector [a₀, a₁, …, aₘ] of the Conway polynomial for 𝔽_{p^m}.

Template Parameters
pPrime characteristic
mExtension degree
Returns
Coefficients low-to-high; empty vector if the (p, m) pair is not in the built-in table

The built-in table covers all primes ≤ 97 and degrees ≤ ~13 (more for small p).

Definition at line 1517 of file polynomials.hpp.

◆ ConwayPolynomial()

template<uint16_t p, size_t m>
Polynomial< Fp< p > > CECCO::ConwayPolynomial ( )
constexpr

Conway polynomial for 𝔽_{p^m} as a Polynomial<Fp<p>>.

Wraps ConwayCoefficients.

Exceptions
std::logic_errorif (p, m) is not tabulated

Definition at line 1710 of file polynomials.hpp.

◆ cyclic_burst_length()

template<ReliablyComparableType T>
size_t CECCO::cyclic_burst_length ( const Vector< T > & v)
constexpr

Cyclic burst length; see Vector::cyclic_burst_length for semantics.

Definition at line 1719 of file vectors.hpp.

◆ daa()

template<class T>
T CECCO::daa ( T b,
int m )
constexpr

Scalar multiplication by double-and-add.

Template Parameters
TType supporting addition and unary minus
Parameters
bMultiplicand
mInteger multiplier
Returns
b * m

For negative multipliers, computes (-b) * |m|.

Note
Returns T(0) for m = 0.

Definition at line 435 of file helpers.hpp.

◆ dE()

double CECCO::dE ( const Vector< std::complex< double > > & lhs,
const Vector< std::complex< double > > & rhs )
inline

Euclidean distance ‖lhs − rhs‖₂ = √(Σᵢ |lhs[i] − rhs[i]|²) for complex vectors.

Exceptions
std::invalid_argumentif lengths differ

Definition at line 1727 of file vectors.hpp.

◆ delete_column() [1/2]

template<ComponentType T>
Matrix< T > CECCO::delete_column ( const Matrix< T > & lhs,
size_t i )
constexpr

Definition at line 3425 of file matrices.hpp.

◆ delete_column() [2/2]

template<ComponentType T>
Matrix< T > CECCO::delete_column ( Matrix< T > && lhs,
size_t i )
constexpr

Definition at line 3432 of file matrices.hpp.

◆ delete_columns() [1/2]

template<ComponentType T>
Matrix< T > CECCO::delete_columns ( const Matrix< T > & lhs,
const std::vector< size_t > & v )
constexpr

Definition at line 3411 of file matrices.hpp.

◆ delete_columns() [2/2]

template<ComponentType T>
Matrix< T > CECCO::delete_columns ( Matrix< T > && lhs,
const std::vector< size_t > & v )
constexpr

Definition at line 3418 of file matrices.hpp.

◆ delete_component() [1/2]

template<ComponentType T>
Vector< T > CECCO::delete_component ( const Vector< T > & lhs,
size_t i )

Definition at line 840 of file vectors.hpp.

◆ delete_component() [2/2]

template<ComponentType T>
Vector< T > CECCO::delete_component ( Vector< T > && lhs,
size_t i )

Definition at line 847 of file vectors.hpp.

◆ delete_components() [1/2]

template<ComponentType T>
Vector< T > CECCO::delete_components ( const Vector< T > & lhs,
const std::vector< size_t > & v )

Definition at line 1425 of file vectors.hpp.

◆ delete_components() [2/2]

template<ComponentType T>
Vector< T > CECCO::delete_components ( Vector< T > && lhs,
const std::vector< size_t > & v )

Definition at line 1432 of file vectors.hpp.

◆ delete_row() [1/2]

template<ComponentType T>
Matrix< T > CECCO::delete_row ( const Matrix< T > & lhs,
size_t i )
constexpr

Definition at line 3453 of file matrices.hpp.

◆ delete_row() [2/2]

template<ComponentType T>
Matrix< T > CECCO::delete_row ( Matrix< T > && lhs,
size_t i )
constexpr

Definition at line 3460 of file matrices.hpp.

◆ delete_rows() [1/2]

template<ComponentType T>
Matrix< T > CECCO::delete_rows ( const Matrix< T > & lhs,
const std::vector< size_t > & v )
constexpr

Definition at line 3439 of file matrices.hpp.

◆ delete_rows() [2/2]

template<ComponentType T>
Matrix< T > CECCO::delete_rows ( Matrix< T > && lhs,
const std::vector< size_t > & v )
constexpr

Definition at line 3446 of file matrices.hpp.

◆ derivative() [1/2]

template<CoefficientType T>
requires FieldType<T>
Polynomial< T > CECCO::derivative ( const Polynomial< T > & poly,
size_t s )
constexpr

Definition at line 1214 of file polynomials.hpp.

◆ derivative() [2/2]

template<CoefficientType T>
requires FieldType<T>
Polynomial< T > CECCO::derivative ( Polynomial< T > && poly,
size_t s )
constexpr

Definition at line 1223 of file polynomials.hpp.

◆ dH() [1/8]

template<ReliablyComparableType T>
size_t CECCO::dH ( const Matrix< T > & lhs,
const Matrix< T > & rhs )

Hamming distance dₕ(lhs, rhs) = wₕ(lhs − rhs).

Number of matrix components in which lhs and rhs differ. Under CECCO_ERASURE_SUPPORT, positions where either side is erased are not counted.

Exceptions
std::invalid_argumentif dimensions differ

Definition at line 3145 of file matrices.hpp.

◆ dH() [2/8]

template<ReliablyComparableType T>
size_t CECCO::dH ( const Matrix< T > & lhs,
Matrix< T > && rhs )

Definition at line 3164 of file matrices.hpp.

◆ dH() [3/8]

template<ReliablyComparableType T>
size_t CECCO::dH ( const Vector< T > & lhs,
const Vector< T > & rhs )

Hamming distance dₕ(lhs, rhs) = wₕ(lhs − rhs).

Number of positions in which lhs and rhs differ. Under CECCO_ERASURE_SUPPORT, positions where either side is erased are not counted (subtraction propagates the erasure marker, and wH skips erased components).

Exceptions
std::invalid_argumentif lengths differ

Definition at line 1676 of file vectors.hpp.

◆ dH() [4/8]

template<ReliablyComparableType T>
size_t CECCO::dH ( const Vector< T > & lhs,
Vector< T > && rhs )

Definition at line 1695 of file vectors.hpp.

◆ dH() [5/8]

template<ReliablyComparableType T>
size_t CECCO::dH ( Matrix< T > && lhs,
const Matrix< T > & rhs )

Definition at line 3155 of file matrices.hpp.

◆ dH() [6/8]

template<ReliablyComparableType T>
size_t CECCO::dH ( Matrix< T > && lhs,
Matrix< T > && rhs )

Definition at line 3173 of file matrices.hpp.

◆ dH() [7/8]

template<ReliablyComparableType T>
size_t CECCO::dH ( Vector< T > && lhs,
const Vector< T > & rhs )

Definition at line 1686 of file vectors.hpp.

◆ dH() [8/8]

template<ReliablyComparableType T>
size_t CECCO::dH ( Vector< T > && lhs,
Vector< T > && rhs )

Definition at line 1703 of file vectors.hpp.

◆ diagonal_join() [1/3]

template<ComponentType T>
Matrix< T > CECCO::diagonal_join ( const Matrix< T > & lhs,
const Matrix< T > & rhs )

Definition at line 3257 of file matrices.hpp.

◆ diagonal_join() [2/3]

template<ComponentType T>
Matrix< T > CECCO::diagonal_join ( Matrix< T > && lhs,
const Matrix< T > & rhs )

Definition at line 3264 of file matrices.hpp.

◆ diagonal_join() [3/3]

template<ComponentType T>
Matrix< T > CECCO::diagonal_join ( Matrix< T > && lhs,
Matrix< T > && rhs )

Definition at line 3271 of file matrices.hpp.

◆ DiagonalMatrix()

template<ComponentType T>
Matrix< T > CECCO::DiagonalMatrix ( const Vector< T > & v)
constexpr

Diagonal matrix with diagonal v (strongest tag of details::Zero, details::Identity, details::Diagonal).

Parameters
vVector of diagonal entries; the result is v.length() × v.length()
Returns
Diagonal matrix with v[i] on position (i, i), zeros elsewhere

Definition at line 3895 of file matrices.hpp.

◆ dual()

template<FieldType T>
auto CECCO::dual ( const LinearCode< T > & C)

Definition at line 6957 of file codes.hpp.

◆ EliasUpperBound()

template<FiniteFieldType T>
long double CECCO::EliasUpperBound ( size_t n,
size_t dmin )

Definition at line 120 of file code_bounds.hpp.

Here is the call graph for this function:

◆ equivalent()

template<FieldType L, FieldType R>
bool CECCO::equivalent ( const LinearCode< L > & lhs,
const LinearCode< R > & rhs )

Definition at line 7116 of file codes.hpp.

◆ erase_column() [1/2]

template<ComponentType T>
Matrix< T > CECCO::erase_column ( const Matrix< T > & lhs,
size_t i )
constexpr

Definition at line 3511 of file matrices.hpp.

◆ erase_column() [2/2]

template<ComponentType T>
Matrix< T > CECCO::erase_column ( Matrix< T > && lhs,
size_t i )
constexpr

Definition at line 3518 of file matrices.hpp.

◆ erase_columns() [1/2]

template<ComponentType T>
Matrix< T > CECCO::erase_columns ( const Matrix< T > & lhs,
const std::vector< size_t > & v )
constexpr

Definition at line 3497 of file matrices.hpp.

◆ erase_columns() [2/2]

template<ComponentType T>
Matrix< T > CECCO::erase_columns ( Matrix< T > && lhs,
const std::vector< size_t > & v )
constexpr

Definition at line 3504 of file matrices.hpp.

◆ erase_component() [1/4]

template<ComponentType T>
Matrix< T > CECCO::erase_component ( const Matrix< T > & lhs,
size_t i,
size_t j )
constexpr

Definition at line 3469 of file matrices.hpp.

◆ erase_component() [2/4]

template<ComponentType T>
Vector< T > CECCO::erase_component ( const Vector< T > & lhs,
size_t i )

Definition at line 1455 of file vectors.hpp.

◆ erase_component() [3/4]

template<ComponentType T>
Matrix< T > CECCO::erase_component ( Matrix< T > && lhs,
size_t i,
size_t j )
constexpr

Definition at line 3476 of file matrices.hpp.

◆ erase_component() [4/4]

template<ComponentType T>
Vector< T > CECCO::erase_component ( Vector< T > && lhs,
size_t i )

Definition at line 1462 of file vectors.hpp.

◆ erase_components() [1/2]

template<ComponentType T>
Vector< T > CECCO::erase_components ( const Vector< T > & lhs,
const std::vector< size_t > & v )

Definition at line 1441 of file vectors.hpp.

◆ erase_components() [2/2]

template<ComponentType T>
Vector< T > CECCO::erase_components ( Vector< T > && lhs,
const std::vector< size_t > & v )

Definition at line 1448 of file vectors.hpp.

◆ erase_row() [1/2]

template<ComponentType T>
Matrix< T > CECCO::erase_row ( const Matrix< T > & lhs,
size_t i )
constexpr

Definition at line 3567 of file matrices.hpp.

◆ erase_row() [2/2]

template<ComponentType T>
Matrix< T > CECCO::erase_row ( Matrix< T > && lhs,
size_t i )
constexpr

Definition at line 3574 of file matrices.hpp.

◆ erase_rows() [1/2]

template<ComponentType T>
Matrix< T > CECCO::erase_rows ( const Matrix< T > & lhs,
const std::vector< size_t > & v )
constexpr

Definition at line 3553 of file matrices.hpp.

◆ erase_rows() [2/2]

template<ComponentType T>
Matrix< T > CECCO::erase_rows ( Matrix< T > && lhs,
const std::vector< size_t > & v )
constexpr

Definition at line 3560 of file matrices.hpp.

◆ ExchangeMatrix()

template<ComponentType T>
Matrix< T > CECCO::ExchangeMatrix ( size_t m)
constexpr

m × m exchange matrix (ones on the anti-diagonal)

Parameters
mSide length
Returns
Matrix with E_{i, j} = 1 iff i + j = m − 1

Definition at line 3881 of file matrices.hpp.

◆ expurgate() [1/3]

template<class C>
auto CECCO::expurgate ( C && code,
size_t j )

Definition at line 7091 of file codes.hpp.

◆ expurgate() [2/3]

template<FieldType T>
EmptyCode< T > CECCO::expurgate ( const EmptyCode< T > & ,
const std::vector< size_t > &  )

Definition at line 7085 of file codes.hpp.

◆ expurgate() [3/3]

template<FieldType T>
LinearCode< T > CECCO::expurgate ( const LinearCode< T > & C,
const std::vector< size_t > & v )

Definition at line 7071 of file codes.hpp.

◆ extend() [1/2]

template<class B>
auto CECCO::extend ( B && base)

Definition at line 6988 of file codes.hpp.

◆ extend() [2/2]

template<class B>
auto CECCO::extend ( B && base,
size_t i,
const Vector< field_t< B > > & v )

Definition at line 6981 of file codes.hpp.

◆ fac()

template<class T>
T CECCO::fac ( T a)

Factorial a!

Template Parameters
TInteger type
Parameters
aNon-negative integer
Returns
a! = a * (a-1) * ... * 2 * 1

Definition at line 244 of file helpers.hpp.

◆ fill() [1/4]

template<ComponentType T>
Matrix< T > CECCO::fill ( const Matrix< T > & m,
const T & value )
constexpr

Definition at line 3639 of file matrices.hpp.

◆ fill() [2/4]

template<ComponentType T>
Vector< T > CECCO::fill ( const Vector< T > & v,
const T & value )
constexpr

Definition at line 1569 of file vectors.hpp.

◆ fill() [3/4]

template<ComponentType T>
Matrix< T > CECCO::fill ( Matrix< T > && m,
const T & value )
constexpr

Definition at line 3646 of file matrices.hpp.

◆ fill() [4/4]

template<ComponentType T>
Vector< T > CECCO::fill ( Vector< T > && v,
const T & value )
constexpr

Definition at line 1576 of file vectors.hpp.

◆ find_irreducible()

template<FiniteFieldType T>
Polynomial< T > CECCO::find_irreducible ( size_t degree)

Sample a random monic irreducible polynomial of degree degree over T.

Tries random polynomials until Polynomial::is_irreducible accepts one. Runtime is bounded in expectation by the density of irreducibles, but unbounded in the worst case; suitable as a modulus for CECCO::Ext.

Definition at line 1726 of file polynomials.hpp.

◆ find_maxima()

template<class T>
std::vector< size_t > CECCO::find_maxima ( const std::vector< T > & v)

Indices of all maximum elements.

Template Parameters
TElement type (must support operator< for comparison)
Parameters
vInput vector
Returns
Indices i with v[i] == max(v); empty if v is empty

Uses two passes over v.

Definition at line 148 of file helpers.hpp.

◆ GCD() [1/3]

template<CoefficientType T>
requires FieldType<T>
Polynomial< T > CECCO::GCD ( const std::vector< Polynomial< T > > & polys)

Greatest common divisor of a list of polynomials, computed iteratively.

Returns
gcd(p₁, p₂, …, pₙ)
Exceptions
std::invalid_argumentif polys is empty

Definition at line 1447 of file polynomials.hpp.

◆ GCD() [2/3]

template<CoefficientType T>
requires FieldType<T>
Polynomial< T > CECCO::GCD ( Polynomial< T > a,
Polynomial< T > b,
Polynomial< T > * s_ptr = nullptr,
Polynomial< T > * t_ptr = nullptr )

Greatest common divisor of two polynomials via the (extended) Euclidean algorithm.

Parameters
aFirst polynomial
bSecond polynomial
s_ptrOptional out-pointer for the Bézout coefficient of a
t_ptrOptional out-pointer for the Bézout coefficient of b
Returns
gcd(a, b); if both s_ptr and t_ptr are non-null, additionally gcd(a, b) = s·a + t·b

Operands are reordered internally so that the higher-degree one drives the recursion.

Definition at line 1407 of file polynomials.hpp.

◆ GCD() [3/3]

template<class T>
T CECCO::GCD ( T a,
T b,
T * s = nullptr,
T * t = nullptr )
constexpr

Greatest common divisor and optional Bézout coefficients.

Template Parameters
TSigned integral type
Parameters
aFirst integer
bSecond integer
sPointer to store Bézout coefficient for a (optional)
tPointer to store Bézout coefficient for b (optional)
Returns
Greatest common divisor of a and b

If s and t are non-null, stores coefficients satisfying a*s + b*t = gcd(a,b).

Definition at line 188 of file helpers.hpp.

◆ gen()

std::mt19937 & CECCO::gen ( )
inline

Current thread's random number generator.

Returns
Reference to thread-local random number generator

Equivalent to RNG::get.

Definition at line 137 of file helpers.hpp.

Here is the call graph for this function:

◆ get_submatrix()

template<ComponentType T>
Matrix< T > CECCO::get_submatrix ( const Matrix< T > & M,
size_t i,
size_t j,
size_t h,
size_t w )

Definition at line 3196 of file matrices.hpp.

◆ get_subvector() [1/2]

template<ComponentType T>
Vector< T > CECCO::get_subvector ( const Vector< T > & v,
size_t start,
size_t end )
constexpr

Definition at line 1377 of file vectors.hpp.

◆ get_subvector() [2/2]

template<ComponentType T>
Vector< T > CECCO::get_subvector ( Vector< T > && v,
size_t start,
size_t end )
constexpr

Definition at line 1382 of file vectors.hpp.

◆ GilbertVarshamovLowerBound()

template<FiniteFieldType T>
size_t CECCO::GilbertVarshamovLowerBound ( size_t n,
size_t dmin )

Definition at line 200 of file code_bounds.hpp.

Here is the call graph for this function:

◆ GriesmerUpperBound()

template<FiniteFieldType T>
size_t CECCO::GriesmerUpperBound ( size_t n,
size_t dmin )

Definition at line 151 of file code_bounds.hpp.

◆ HammingUpperBound()

template<FiniteFieldType T>
long double CECCO::HammingUpperBound ( size_t n,
size_t dmin )

Definition at line 35 of file code_bounds.hpp.

Here is the call graph for this function:

◆ HankelMatrix()

template<ComponentType T>
Matrix< T > CECCO::HankelMatrix ( const Vector< T > & v,
size_t m,
size_t n )
constexpr

m × n Hankel matrix from its anti-diagonal entries

Parameters
vAnti-diagonal values; length m + n − 1
mNumber of rows
nNumber of columns
Returns
Hankel matrix; each ascending anti-diagonal is constant

Constructed by reversing the columns of ToeplitzMatrix(reverse(v), m, n).

Exceptions
std::invalid_argumentif v.length() != m + n - 1

Definition at line 3973 of file matrices.hpp.

◆ Hasse_derivative() [1/2]

template<CoefficientType T>
requires FieldType<T>
Polynomial< T > CECCO::Hasse_derivative ( const Polynomial< T > & poly,
size_t s )
constexpr

Definition at line 1232 of file polynomials.hpp.

◆ Hasse_derivative() [2/2]

template<CoefficientType T>
requires FieldType<T>
Polynomial< T > CECCO::Hasse_derivative ( Polynomial< T > && poly,
size_t s )
constexpr

Definition at line 1241 of file polynomials.hpp.

◆ horizontal_join() [1/3]

template<ComponentType T>
Matrix< T > CECCO::horizontal_join ( const Matrix< T > & lhs,
const Matrix< T > & rhs )

Definition at line 3215 of file matrices.hpp.

◆ horizontal_join() [2/3]

template<ComponentType T>
Matrix< T > CECCO::horizontal_join ( Matrix< T > && lhs,
const Matrix< T > & rhs )

Definition at line 3222 of file matrices.hpp.

◆ horizontal_join() [3/3]

template<ComponentType T>
Matrix< T > CECCO::horizontal_join ( Matrix< T > && lhs,
Matrix< T > && rhs )

Definition at line 3229 of file matrices.hpp.

◆ identical()

template<FieldType L, FieldType R>
bool CECCO::identical ( const LinearCode< L > & lhs,
const LinearCode< R > & rhs )

Definition at line 7111 of file codes.hpp.

◆ IdentityMatrix()

template<ComponentType T>
Matrix< T > CECCO::IdentityMatrix ( size_t m)
constexpr

m × m identity matrix I_m

Parameters
mSide length
Returns
Newly constructed identity matrix; for m = 0 the tag is details::Zero

Definition at line 3838 of file matrices.hpp.

◆ inner_product()

template<ComponentType T>
T CECCO::inner_product ( const Vector< T > & lhs,
const Vector< T > & rhs )

Inner product ⟨lhs, rhs⟩ = Σᵢ lhs[i] · rhs[i].

For complex inputs this is the standard product (not the conjugate inner product).

Exceptions
std::invalid_argumentif lengths differ

Definition at line 1590 of file vectors.hpp.

◆ inverse() [1/2]

template<FieldType T>
Matrix< T > CECCO::inverse ( const Matrix< T > & M)

Definition at line 3681 of file matrices.hpp.

◆ inverse() [2/2]

template<FieldType T>
Matrix< T > CECCO::inverse ( Matrix< T > && M)

Definition at line 3688 of file matrices.hpp.

◆ is_prime()

template<class T>
bool CECCO::is_prime ( T a)
constexprnoexcept

Primality test by trial division.

Template Parameters
TUnsigned integer type
Parameters
aNumber to test for primality
Returns
true if a is prime, false otherwise

Tests odd divisors up to √a. Returns false for a ≤ 1 and even a > 2.

Definition at line 167 of file helpers.hpp.

◆ JohnsonUpperBound()

template<FiniteFieldType T>
long double CECCO::JohnsonUpperBound ( size_t n,
size_t dmin )

Definition at line 71 of file code_bounds.hpp.

Here is the call graph for this function:

◆ Kronecker_product() [1/3]

template<ComponentType T>
Matrix< T > CECCO::Kronecker_product ( const Matrix< T > & lhs,
const Matrix< T > & rhs )

Definition at line 3278 of file matrices.hpp.

◆ Kronecker_product() [2/3]

template<ComponentType T>
Matrix< T > CECCO::Kronecker_product ( Matrix< T > && lhs,
const Matrix< T > & rhs )

Definition at line 3285 of file matrices.hpp.

◆ Kronecker_product() [3/3]

template<ComponentType T>
Matrix< T > CECCO::Kronecker_product ( Matrix< T > && lhs,
Matrix< T > && rhs )

Definition at line 3292 of file matrices.hpp.

◆ LCM() [1/2]

template<CoefficientType T>
requires FieldType<T>
Polynomial< T > CECCO::LCM ( const Polynomial< T > & a,
const Polynomial< T > & b )

Least common multiple lcm(a, b) = (a · b) / gcd(a, b).

Definition at line 1463 of file polynomials.hpp.

◆ LCM() [2/2]

template<CoefficientType T>
requires FieldType<T>
Polynomial< T > CECCO::LCM ( const std::vector< Polynomial< T > > & polys)

Least common multiple of a list of polynomials, computed iteratively.

Returns
lcm(p₁, p₂, …, pₙ)
Exceptions
std::invalid_argumentif polys is empty

Definition at line 1476 of file polynomials.hpp.

◆ lengthen() [1/2]

template<class B>
auto CECCO::lengthen ( B && base,
size_t j,
const Vector< field_t< B > > & w )

Definition at line 7023 of file codes.hpp.

◆ lengthen() [2/2]

template<class B>
auto CECCO::lengthen ( B && base,
size_t j,
const Vector< field_t< B > > & w,
size_t i,
const Vector< field_t< B > > & v )

Definition at line 7016 of file codes.hpp.

◆ LLRCalculator() [1/3]

CECCO::LLRCalculator ( const BI_AWGN & ) -> LLRCalculator< Fp< 2 > >

◆ LLRCalculator() [2/3]

CECCO::LLRCalculator ( const NRZMapper & ,
const AWGN &  ) -> LLRCalculator< Fp< 2 > >

◆ LLRCalculator() [3/3]

template<FiniteFieldType T>
CECCO::LLRCalculator ( const SDMEC< T > & ) -> LLRCalculator< T >

◆ log2()

long double CECCO::log2 ( const InfInt & v)
inline

Base-2 logarithm of a positive InfInt of arbitrary magnitude.

Parameters
vPositive integer
Returns
log2(v) as long double
Exceptions
std::invalid_argumentif v <= 0

Evaluates the leading decimal digits and shifts by the remaining length, avoiding any conversion of v to a builtin integer type (which would overflow beyond 2^64).

Definition at line 304 of file helpers.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LowerShiftMatrix()

template<ComponentType T>
Matrix< T > CECCO::LowerShiftMatrix ( size_t m)
constexpr

m × m lower shift matrix (ones on the subdiagonal); transpose of UpperShiftMatrix

Parameters
mSide length
Returns
Matrix with L_{i+1, i} = 1, all other entries 0

Definition at line 4035 of file matrices.hpp.

◆ MacWilliamsIdentity()

template<FiniteFieldType T>
Polynomial< InfInt > CECCO::MacWilliamsIdentity ( const Polynomial< InfInt > & A,
size_t n,
size_t k )

Definition at line 130 of file codes.hpp.

◆ modinv()

template<uint16_t p, class T>
T CECCO::modinv ( T a)
constexpr

Multiplicative inverse modulo a prime.

Template Parameters
pPrime modulus (must be prime for correct results)
TSigned integer type
Parameters
aElement to invert
Returns
Modular inverse a^(-1) mod p

Uses the extended Euclidean algorithm.

Definition at line 229 of file helpers.hpp.

◆ Monomial()

template<CoefficientType T>
Polynomial< T > CECCO::Monomial ( size_t i,
const T & a = T(1) )
constexpr

Monomial a · xⁱ

Parameters
iPower of x
aCoefficient (defaults to T(1)); a zero coefficient yields the zero polynomial

Definition at line 1375 of file polynomials.hpp.

◆ normalize() [1/2]

template<CoefficientType T>
requires FieldType<T>
Polynomial< T > CECCO::normalize ( const Polynomial< T > & poly)
constexpr

Definition at line 1296 of file polynomials.hpp.

◆ normalize() [2/2]

template<CoefficientType T>
requires FieldType<T>
Polynomial< T > CECCO::normalize ( Polynomial< T > && poly)
constexpr

Definition at line 1305 of file polynomials.hpp.

◆ OnePolynomial()

template<CoefficientType T>
const Polynomial< T > & CECCO::OnePolynomial ( )

Constant polynomial 1 (cached).

Definition at line 1390 of file polynomials.hpp.

◆ operator!=() [1/4]

template<FieldType L, FieldType R>
bool CECCO::operator!= ( const LinearCode< L > & lhs,
const LinearCode< R > & rhs )

Definition at line 7106 of file codes.hpp.

◆ operator!=() [2/4]

template<ReliablyComparableType T>
bool CECCO::operator!= ( const Matrix< T > & lhs,
const Matrix< T > & rhs )
constexpr

Negation of operator==.

Returns
true iff dimensions or any component differ

Definition at line 3750 of file matrices.hpp.

◆ operator!=() [3/4]

template<ReliablyComparableType T>
bool CECCO::operator!= ( const Polynomial< T > & lhs,
const Polynomial< T > & rhs )
constexpr

Definition at line 1319 of file polynomials.hpp.

◆ operator!=() [4/4]

template<ReliablyComparableType T>
bool CECCO::operator!= ( const Vector< T > & lhs,
const Vector< T > & rhs )
constexpr

Definition at line 1620 of file vectors.hpp.

◆ operator%() [1/2]

template<CoefficientType T>
Polynomial< T > CECCO::operator% ( const Polynomial< T > & lhs,
const Polynomial< T > & rhs )
constexpr

Definition at line 1118 of file polynomials.hpp.

◆ operator%() [2/2]

template<CoefficientType T>
Polynomial< T > CECCO::operator% ( Polynomial< T > && lhs,
const Polynomial< T > & rhs )
constexpr

Definition at line 1125 of file polynomials.hpp.

◆ operator*() [1/32]

template<ComponentType T>
Matrix< T > CECCO::operator* ( const Matrix< T > & lhs,
const Matrix< T > & rhs )
constexpr

Definition at line 3036 of file matrices.hpp.

◆ operator*() [2/32]

template<ComponentType T>
Matrix< T > CECCO::operator* ( const Matrix< T > & lhs,
const T & rhs )
constexpr

Definition at line 3068 of file matrices.hpp.

◆ operator*() [3/32]

template<CoefficientType T>
Polynomial< T > CECCO::operator* ( const Polynomial< T > & lhs,
const Polynomial< T > & rhs )
constexpr

Definition at line 1076 of file polynomials.hpp.

◆ operator*() [4/32]

template<CoefficientType T>
Polynomial< T > CECCO::operator* ( const Polynomial< T > & lhs,
const T & rhs )
constexpr

Definition at line 1132 of file polynomials.hpp.

◆ operator*() [5/32]

template<CoefficientType T>
Polynomial< T > CECCO::operator* ( const Polynomial< T > & lhs,
Polynomial< T > && rhs )
constexpr

Definition at line 1090 of file polynomials.hpp.

◆ operator*() [6/32]

template<CoefficientType T>
Polynomial< T > CECCO::operator* ( const Polynomial< T > & lhs,
size_t n )
constexpr

Definition at line 1175 of file polynomials.hpp.

◆ operator*() [7/32]

template<ComponentType T>
Matrix< T > CECCO::operator* ( const T & lhs,
const Matrix< T > & rhs )
constexpr

Definition at line 3086 of file matrices.hpp.

◆ operator*() [8/32]

template<CoefficientType T>
Polynomial< T > CECCO::operator* ( const T & lhs,
const Polynomial< T > & rhs )
constexpr

Definition at line 1146 of file polynomials.hpp.

◆ operator*() [9/32]

template<FieldType T>
T CECCO::operator* ( const T & lhs,
const T & rhs )
constexpr

Definition at line 362 of file fields.hpp.

◆ operator*() [10/32]

template<ComponentType T>
Vector< T > CECCO::operator* ( const T & lhs,
const Vector< T > & rhs )
constexpr

Definition at line 1306 of file vectors.hpp.

◆ operator*() [11/32]

template<FieldType T>
T CECCO::operator* ( const T & lhs,
int rhs )
constexpr

Definition at line 390 of file fields.hpp.

◆ operator*() [12/32]

template<ComponentType T>
Matrix< T > CECCO::operator* ( const T & lhs,
Matrix< T > && rhs )
constexpr

Definition at line 3093 of file matrices.hpp.

◆ operator*() [13/32]

template<CoefficientType T>
Polynomial< T > CECCO::operator* ( const T & lhs,
Polynomial< T > && rhs )
constexpr

Definition at line 1153 of file polynomials.hpp.

◆ operator*() [14/32]

template<FieldType T>
T CECCO::operator* ( const T & lhs,
T && rhs )
constexpr

Definition at line 376 of file fields.hpp.

◆ operator*() [15/32]

template<ComponentType T>
Vector< T > CECCO::operator* ( const T & lhs,
Vector< T > && rhs )
constexpr

Definition at line 1313 of file vectors.hpp.

◆ operator*() [16/32]

template<ComponentType T>
Vector< T > CECCO::operator* ( const Vector< T > & lhs,
const Matrix< T > & rhs )
constexpr

Definition at line 3054 of file matrices.hpp.

◆ operator*() [17/32]

template<ComponentType T>
Vector< T > CECCO::operator* ( const Vector< T > & lhs,
const T & rhs )
constexpr

Definition at line 1288 of file vectors.hpp.

◆ operator*() [18/32]

template<FieldType T>
T CECCO::operator* ( int lhs,
const T & rhs )
constexpr

Definition at line 397 of file fields.hpp.

◆ operator*() [19/32]

template<FieldType T>
T CECCO::operator* ( int lhs,
T && rhs )
constexpr

Definition at line 411 of file fields.hpp.

◆ operator*() [20/32]

template<ComponentType T>
Matrix< T > CECCO::operator* ( Matrix< T > && lhs,
const Matrix< T > & rhs )
constexpr

Definition at line 3043 of file matrices.hpp.

◆ operator*() [21/32]

template<ComponentType T>
Matrix< T > CECCO::operator* ( Matrix< T > && lhs,
const T & rhs )
constexpr

Definition at line 3075 of file matrices.hpp.

◆ operator*() [22/32]

template<CoefficientType T>
Polynomial< T > CECCO::operator* ( Polynomial< T > && lhs,
const Polynomial< T > & rhs )
constexpr

Definition at line 1083 of file polynomials.hpp.

◆ operator*() [23/32]

template<CoefficientType T>
Polynomial< T > CECCO::operator* ( Polynomial< T > && lhs,
const T & rhs )
constexpr

Definition at line 1139 of file polynomials.hpp.

◆ operator*() [24/32]

template<CoefficientType T>
Polynomial< T > CECCO::operator* ( Polynomial< T > && lhs,
Polynomial< T > && rhs )
constexpr

Definition at line 1097 of file polynomials.hpp.

◆ operator*() [25/32]

template<CoefficientType T>
Polynomial< T > CECCO::operator* ( Polynomial< T > && lhs,
size_t n )
constexpr

Definition at line 1182 of file polynomials.hpp.

◆ operator*() [26/32]

template<CoefficientType T>
Polynomial< T > CECCO::operator* ( size_t n,
const Polynomial< T > & rhs )
constexpr

Definition at line 1189 of file polynomials.hpp.

◆ operator*() [27/32]

template<CoefficientType T>
Polynomial< T > CECCO::operator* ( size_t n,
Polynomial< T > && rhs )
constexpr

Definition at line 1196 of file polynomials.hpp.

◆ operator*() [28/32]

template<FieldType T>
T CECCO::operator* ( T && lhs,
const T & rhs )
constexpr

Definition at line 369 of file fields.hpp.

◆ operator*() [29/32]

template<FieldType T>
T CECCO::operator* ( T && lhs,
int rhs )
constexpr

Definition at line 404 of file fields.hpp.

◆ operator*() [30/32]

template<FieldType T>
T CECCO::operator* ( T && lhs,
T && rhs )
constexpr

Definition at line 383 of file fields.hpp.

◆ operator*() [31/32]

template<ComponentType T>
Vector< T > CECCO::operator* ( Vector< T > && lhs,
const Matrix< T > & rhs )
constexpr

Definition at line 3059 of file matrices.hpp.

◆ operator*() [32/32]

template<ComponentType T>
Vector< T > CECCO::operator* ( Vector< T > && lhs,
const T & rhs )
constexpr

Definition at line 1295 of file vectors.hpp.

◆ operator+() [1/16]

template<ComponentType T>
Matrix< T > CECCO::operator+ ( const Matrix< T > & lhs,
const Matrix< T > & rhs )
constexpr

Definition at line 2972 of file matrices.hpp.

◆ operator+() [2/16]

template<ComponentType T>
Matrix< T > CECCO::operator+ ( const Matrix< T > & lhs,
Matrix< T > && rhs )
constexpr

Definition at line 2986 of file matrices.hpp.

◆ operator+() [3/16]

template<CoefficientType T>
Polynomial< T > CECCO::operator+ ( const Polynomial< T > & lhs,
const Polynomial< T > & rhs )
constexpr

Definition at line 1020 of file polynomials.hpp.

◆ operator+() [4/16]

template<CoefficientType T>
Polynomial< T > CECCO::operator+ ( const Polynomial< T > & lhs,
Polynomial< T > && rhs )
constexpr

Definition at line 1034 of file polynomials.hpp.

◆ operator+() [5/16]

template<FieldType T>
T CECCO::operator+ ( const T & lhs,
const T & rhs )
constexpr

Definition at line 306 of file fields.hpp.

◆ operator+() [6/16]

template<FieldType T>
T CECCO::operator+ ( const T & lhs,
T && rhs )
constexpr

Definition at line 320 of file fields.hpp.

◆ operator+() [7/16]

template<ComponentType T>
Vector< T > CECCO::operator+ ( const Vector< T > & lhs,
const Vector< T > & rhs )
constexpr

Definition at line 1224 of file vectors.hpp.

◆ operator+() [8/16]

template<ComponentType T>
Vector< T > CECCO::operator+ ( const Vector< T > & lhs,
Vector< T > && rhs )
constexpr

Definition at line 1238 of file vectors.hpp.

◆ operator+() [9/16]

template<ComponentType T>
Matrix< T > CECCO::operator+ ( Matrix< T > && lhs,
const Matrix< T > & rhs )
constexpr

Definition at line 2979 of file matrices.hpp.

◆ operator+() [10/16]

template<ComponentType T>
Matrix< T > CECCO::operator+ ( Matrix< T > && lhs,
Matrix< T > && rhs )
constexpr

Definition at line 2993 of file matrices.hpp.

◆ operator+() [11/16]

template<CoefficientType T>
Polynomial< T > CECCO::operator+ ( Polynomial< T > && lhs,
const Polynomial< T > & rhs )
constexpr

Definition at line 1027 of file polynomials.hpp.

◆ operator+() [12/16]

template<CoefficientType T>
Polynomial< T > CECCO::operator+ ( Polynomial< T > && lhs,
Polynomial< T > && rhs )
constexpr

Definition at line 1041 of file polynomials.hpp.

◆ operator+() [13/16]

template<FieldType T>
T CECCO::operator+ ( T && lhs,
const T & rhs )
constexpr

Definition at line 313 of file fields.hpp.

◆ operator+() [14/16]

template<FieldType T>
T CECCO::operator+ ( T && lhs,
T && rhs )
constexpr

Definition at line 327 of file fields.hpp.

◆ operator+() [15/16]

template<ComponentType T>
Vector< T > CECCO::operator+ ( Vector< T > && lhs,
const Vector< T > & rhs )
constexpr

Definition at line 1231 of file vectors.hpp.

◆ operator+() [16/16]

template<ComponentType T>
Vector< T > CECCO::operator+ ( Vector< T > && lhs,
Vector< T > && rhs )
constexpr

Definition at line 1245 of file vectors.hpp.

◆ operator-() [1/16]

template<ComponentType T>
Matrix< T > CECCO::operator- ( const Matrix< T > & lhs,
const Matrix< T > & rhs )
constexpr

Definition at line 3004 of file matrices.hpp.

◆ operator-() [2/16]

template<ComponentType T>
Matrix< T > CECCO::operator- ( const Matrix< T > & lhs,
Matrix< T > && rhs )
constexpr

Definition at line 3018 of file matrices.hpp.

◆ operator-() [3/16]

template<CoefficientType T>
Polynomial< T > CECCO::operator- ( const Polynomial< T > & lhs,
const Polynomial< T > & rhs )
constexpr

Definition at line 1048 of file polynomials.hpp.

◆ operator-() [4/16]

template<CoefficientType T>
Polynomial< T > CECCO::operator- ( const Polynomial< T > & lhs,
Polynomial< T > && rhs )
constexpr

Definition at line 1062 of file polynomials.hpp.

◆ operator-() [5/16]

template<FieldType T>
T CECCO::operator- ( const T & lhs,
const T & rhs )
constexpr

Definition at line 334 of file fields.hpp.

◆ operator-() [6/16]

template<FieldType T>
T CECCO::operator- ( const T & lhs,
T && rhs )
constexpr

Definition at line 348 of file fields.hpp.

◆ operator-() [7/16]

template<ComponentType T>
Vector< T > CECCO::operator- ( const Vector< T > & lhs,
const Vector< T > & rhs )
constexpr

Definition at line 1256 of file vectors.hpp.

◆ operator-() [8/16]

template<ComponentType T>
Vector< T > CECCO::operator- ( const Vector< T > & lhs,
Vector< T > && rhs )
constexpr

Definition at line 1270 of file vectors.hpp.

◆ operator-() [9/16]

template<ComponentType T>
Matrix< T > CECCO::operator- ( Matrix< T > && lhs,
const Matrix< T > & rhs )
constexpr

Definition at line 3011 of file matrices.hpp.

◆ operator-() [10/16]

template<ComponentType T>
Matrix< T > CECCO::operator- ( Matrix< T > && lhs,
Matrix< T > && rhs )
constexpr

Definition at line 3025 of file matrices.hpp.

◆ operator-() [11/16]

template<CoefficientType T>
Polynomial< T > CECCO::operator- ( Polynomial< T > && lhs,
const Polynomial< T > & rhs )
constexpr

Definition at line 1055 of file polynomials.hpp.

◆ operator-() [12/16]

template<CoefficientType T>
Polynomial< T > CECCO::operator- ( Polynomial< T > && lhs,
Polynomial< T > && rhs )
constexpr

Definition at line 1069 of file polynomials.hpp.

◆ operator-() [13/16]

template<FieldType T>
T CECCO::operator- ( T && lhs,
const T & rhs )
constexpr

Definition at line 341 of file fields.hpp.

◆ operator-() [14/16]

template<FieldType T>
T CECCO::operator- ( T && lhs,
T && rhs )
constexpr

Definition at line 355 of file fields.hpp.

◆ operator-() [15/16]

template<ComponentType T>
Vector< T > CECCO::operator- ( Vector< T > && lhs,
const Vector< T > & rhs )
constexpr

Definition at line 1263 of file vectors.hpp.

◆ operator-() [16/16]

template<ComponentType T>
Vector< T > CECCO::operator- ( Vector< T > && lhs,
Vector< T > && rhs )
constexpr

Definition at line 1277 of file vectors.hpp.

◆ operator/() [1/10]

template<CoefficientType T>
Matrix< T > CECCO::operator/ ( const Matrix< T > & lhs,
const T & rhs )
constexpr

Definition at line 3104 of file matrices.hpp.

◆ operator/() [2/10]

template<CoefficientType T>
Polynomial< T > CECCO::operator/ ( const Polynomial< T > & lhs,
const Polynomial< T > & rhs )
constexpr

Definition at line 1104 of file polynomials.hpp.

◆ operator/() [3/10]

template<FieldType T>
Polynomial< T > CECCO::operator/ ( const Polynomial< T > & lhs,
const T & rhs )
constexpr

Definition at line 1161 of file polynomials.hpp.

◆ operator/() [4/10]

template<FieldType T>
T CECCO::operator/ ( const T & lhs,
const T & rhs )

Definition at line 418 of file fields.hpp.

◆ operator/() [5/10]

template<CoefficientType T>
Vector< T > CECCO::operator/ ( const Vector< T > & lhs,
const T & rhs )
constexpr

Definition at line 1324 of file vectors.hpp.

◆ operator/() [6/10]

template<CoefficientType T>
Matrix< T > CECCO::operator/ ( Matrix< T > && lhs,
const T & rhs )
constexpr

Definition at line 3111 of file matrices.hpp.

◆ operator/() [7/10]

template<CoefficientType T>
Polynomial< T > CECCO::operator/ ( Polynomial< T > && lhs,
const Polynomial< T > & rhs )
constexpr

Definition at line 1111 of file polynomials.hpp.

◆ operator/() [8/10]

template<FieldType T>
Polynomial< T > CECCO::operator/ ( Polynomial< T > && lhs,
const T & rhs )
constexpr

Definition at line 1168 of file polynomials.hpp.

◆ operator/() [9/10]

template<FieldType T>
T CECCO::operator/ ( T && lhs,
const T & rhs )

Definition at line 425 of file fields.hpp.

◆ operator/() [10/10]

template<CoefficientType T>
Vector< T > CECCO::operator/ ( Vector< T > && lhs,
const T & rhs )
constexpr

Definition at line 1331 of file vectors.hpp.

◆ operator<<() [1/8]

template<FieldType T>
std::ostream & CECCO::operator<< ( std::ostream & os,
const Code< T > & rhs )

Definition at line 7121 of file codes.hpp.

◆ operator<<() [2/8]

template<FiniteFieldType B, MOD modulus, LutMode mode>
std::ostream & CECCO::operator<< ( std::ostream & os,
const Ext< B, modulus, mode > & e )

Print as the integer label (or ERASURE_MARKER if erased).

Definition at line 3116 of file fields.hpp.

◆ operator<<() [3/8]

template<uint16_t p>
std::ostream & CECCO::operator<< ( std::ostream & os,
const Fp< p > & e )

Print as the integer label (or ERASURE_MARKER if erased).

Definition at line 2196 of file fields.hpp.

◆ operator<<() [4/8]

template<ComponentType T>
std::ostream & CECCO::operator<< ( std::ostream & os,
const Matrix< T > & rhs )

Pretty-print the matrix with column alignment and bracket borders.

Returns
Reference to os for chaining

Columns are separated by one blank, by three for polynomial components, whose own rendering contains blanks. An empty matrix is printed as "(empty matrix)".

Definition at line 3763 of file matrices.hpp.

◆ operator<<() [5/8]

template<CoefficientType T>
std::ostream & CECCO::operator<< ( std::ostream & os,
const Polynomial< T > & rhs )

Definition at line 1324 of file polynomials.hpp.

◆ operator<<() [6/8]

template<SignedIntType T>
std::ostream & CECCO::operator<< ( std::ostream & os,
const Rationals< T > & e )

Print as "numerator/denominator" (or just "numerator" when denominator is 1).

Single stream insertion for std::setw compatibility.

Definition at line 759 of file fields.hpp.

◆ operator<<() [7/8]

template<FieldType T>
std::ostream & CECCO::operator<< ( std::ostream & os,
const Trellis< T > & Tr )

Definition at line 690 of file graphs.hpp.

◆ operator<<() [8/8]

template<ComponentType T>
std::ostream & CECCO::operator<< ( std::ostream & os,
const Vector< T > & rhs )

Stream output as ( c₀, c₁, …, cₙ₋₁ ).

Definition at line 1639 of file vectors.hpp.

◆ operator==() [1/4]

template<FieldType L, FieldType R>
bool CECCO::operator== ( const LinearCode< L > & lhs,
const LinearCode< R > & rhs )

Definition at line 7101 of file codes.hpp.

◆ operator==() [2/4]

template<ReliablyComparableType T>
bool CECCO::operator== ( const Matrix< T > & lhs,
const Matrix< T > & rhs )
constexpr

Equality of two matrices.

Returns
true iff dimensions match and all components are equal

Tag-aware fast paths handle structured operands (e.g. two Toeplitz matrices compare only their first row and column).

Definition at line 3703 of file matrices.hpp.

◆ operator==() [3/4]

template<ReliablyComparableType T>
bool CECCO::operator== ( const Polynomial< T > & lhs,
const Polynomial< T > & rhs )
constexpr

Definition at line 1314 of file polynomials.hpp.

◆ operator==() [4/4]

template<ReliablyComparableType T>
bool CECCO::operator== ( const Vector< T > & lhs,
const Vector< T > & rhs )
constexpr

Definition at line 1615 of file vectors.hpp.

◆ operator>>() [1/2]

template<class LHS, class RHS>
decltype(auto) CECCO::operator>> ( LHS && lhs,
RHS && rhs )

Function-call chaining: x >> f ≡ f(x).

Template Parameters
LHSInput type
RHSCallable on LHS
Parameters
lhsInput value (perfect-forwarded)
rhsCallable (perfect-forwarded)
Returns
rhs(lhs)

Selected when RHS is invocable with LHS. Disabled for std::ios_base-derived types to avoid clashing with stream operators. The companion overload below handles the case where the right-hand side is an assignment target.

Definition at line 1102 of file blocks.hpp.

◆ operator>>() [2/2]

template<class LHS, class RHS>
RHS & CECCO::operator>> ( LHS && lhs,
RHS & dst )

Assignment chaining: x >> dst ≡ dst = x; return dst.

Template Parameters
LHSInput type
RHSAssignment target type (assignable from LHS)
Parameters
lhsInput value
dstDestination variable
Returns
Reference to dst for continued chaining

Selected only when the callable overload above is not viable, so block calls always win over capture-into-variable when both are possible. Useful for capturing intermediate results in a chain (c >> map >> x >> awgn >> y >> demap >> r;).

Definition at line 1122 of file blocks.hpp.

◆ operator^() [1/3]

template<CoefficientType T>
Polynomial< T > CECCO::operator^ ( const Polynomial< T > & base,
int exponent )
constexpr

Polynomial exponentiation by square-and-multiply.

Returns
base^exponent
Warning
Does not follow C++ precedence for ^: in b * base ^ exponent the parser evaluates (b * base) ^ exponent. Parenthesise as b * (base ^ exponent), or call CECCO::sqm directly.
Exceptions
std::invalid_argumentif exponent is negative

Definition at line 1502 of file polynomials.hpp.

◆ operator^() [2/3]

template<FieldType T>
T CECCO::operator^ ( const T & base,
int exponent )
constexpr

Definition at line 432 of file fields.hpp.

◆ operator^() [3/3]

template<FieldType T>
T CECCO::operator^ ( T && base,
int exponent )
constexpr

Definition at line 437 of file fields.hpp.

◆ pad_back() [1/2]

template<ComponentType T>
Vector< T > CECCO::pad_back ( const Vector< T > & v,
size_t n )
constexpr

Definition at line 1513 of file vectors.hpp.

◆ pad_back() [2/2]

template<ComponentType T>
Vector< T > CECCO::pad_back ( Vector< T > && v,
size_t n )
constexpr

Definition at line 1520 of file vectors.hpp.

◆ pad_front() [1/2]

template<ComponentType T>
Vector< T > CECCO::pad_front ( const Vector< T > & v,
size_t n )
constexpr

Definition at line 1499 of file vectors.hpp.

◆ pad_front() [2/2]

template<ComponentType T>
Vector< T > CECCO::pad_front ( Vector< T > && v,
size_t n )
constexpr

Definition at line 1506 of file vectors.hpp.

◆ PermutationMatrix()

template<ComponentType T>
Matrix< T > CECCO::PermutationMatrix ( const std::vector< size_t > & perm)

Permutation matrix P with P_{i, perm[i]} = 1.

Parameters
permPermutation of {0, …, m-1}; m is inferred from perm.size()
Returns
m × m permutation matrix; the identity permutation returns IdentityMatrix
Exceptions
std::invalid_argumentif perm contains out-of-range or duplicate indices

Definition at line 3854 of file matrices.hpp.

◆ PlotkinUpperBound()

template<FiniteFieldType T>
long double CECCO::PlotkinUpperBound ( size_t n,
size_t dmin )

Definition at line 100 of file code_bounds.hpp.

Here is the call graph for this function:

◆ poly_long_div() [1/2]

template<CoefficientType T>
std::pair< Polynomial< T >, Polynomial< T > > CECCO::poly_long_div ( const Polynomial< T > & lhs,
const Polynomial< T > & rhs )

Definition at line 1203 of file polynomials.hpp.

◆ poly_long_div() [2/2]

template<CoefficientType T>
std::pair< Polynomial< T >, Polynomial< T > > CECCO::poly_long_div ( Polynomial< T > && lhs,
const Polynomial< T > & rhs )

Definition at line 1209 of file polynomials.hpp.

◆ puncture() [1/3]

template<class C>
auto CECCO::puncture ( C && code,
size_t i )

Definition at line 7066 of file codes.hpp.

◆ puncture() [2/3]

template<FieldType T>
EmptyCode< T > CECCO::puncture ( const EmptyCode< T > & ,
const std::vector< size_t > &  )

Definition at line 7060 of file codes.hpp.

◆ puncture() [3/3]

template<FieldType T>
LinearCode< T > CECCO::puncture ( const LinearCode< T > & C,
const std::vector< size_t > & v )

Definition at line 7041 of file codes.hpp.

◆ randomize() [1/4]

template<CoefficientType T>
Matrix< T > CECCO::randomize ( const Matrix< T > & M)

Definition at line 3118 of file matrices.hpp.

◆ randomize() [2/4]

template<CoefficientType T>
Vector< T > CECCO::randomize ( const Vector< T > & v)

Definition at line 1349 of file vectors.hpp.

◆ randomize() [3/4]

template<CoefficientType T>
Matrix< T > CECCO::randomize ( Matrix< T > && M)

Definition at line 3125 of file matrices.hpp.

◆ randomize() [4/4]

template<CoefficientType T>
Vector< T > CECCO::randomize ( Vector< T > && v)

Definition at line 1356 of file vectors.hpp.

◆ reciprocal() [1/2]

template<CoefficientType T>
Polynomial< T > CECCO::reciprocal ( const Polynomial< T > & poly)
constexpr

Definition at line 1250 of file polynomials.hpp.

◆ reciprocal() [2/2]

template<CoefficientType T>
Polynomial< T > CECCO::reciprocal ( Polynomial< T > && poly)
constexpr

Definition at line 1257 of file polynomials.hpp.

◆ ReigerBurstUpperBound()

size_t CECCO::ReigerBurstUpperBound ( size_t n,
size_t ell )
constexpr

Definition at line 224 of file code_bounds.hpp.

◆ reverse() [1/2]

template<ComponentType T>
Vector< T > CECCO::reverse ( const Vector< T > & v)
constexpr

Definition at line 1555 of file vectors.hpp.

◆ reverse() [2/2]

template<ComponentType T>
Vector< T > CECCO::reverse ( Vector< T > && v)
constexpr

Definition at line 1562 of file vectors.hpp.

◆ reverse_columns() [1/2]

template<ComponentType T>
Matrix< T > CECCO::reverse_columns ( const Matrix< T > & M)

Definition at line 3625 of file matrices.hpp.

◆ reverse_columns() [2/2]

template<ComponentType T>
Matrix< T > CECCO::reverse_columns ( Matrix< T > && M)

Definition at line 3632 of file matrices.hpp.

◆ reverse_rows() [1/2]

template<ComponentType T>
Matrix< T > CECCO::reverse_rows ( const Matrix< T > & M)

Definition at line 3611 of file matrices.hpp.

◆ reverse_rows() [2/2]

template<ComponentType T>
Matrix< T > CECCO::reverse_rows ( Matrix< T > && M)

Definition at line 3618 of file matrices.hpp.

◆ rotate_left() [1/2]

template<ComponentType T>
Vector< T > CECCO::rotate_left ( const Vector< T > & v,
size_t i )
constexpr

Definition at line 1527 of file vectors.hpp.

◆ rotate_left() [2/2]

template<ComponentType T>
Vector< T > CECCO::rotate_left ( Vector< T > && v,
size_t i )
constexpr

Definition at line 1534 of file vectors.hpp.

◆ rotate_right() [1/2]

template<ComponentType T>
Vector< T > CECCO::rotate_right ( const Vector< T > & v,
size_t i )
constexpr

Definition at line 1541 of file vectors.hpp.

◆ rotate_right() [2/2]

template<ComponentType T>
Vector< T > CECCO::rotate_right ( Vector< T > && v,
size_t i )
constexpr

Definition at line 1548 of file vectors.hpp.

◆ rref() [1/2]

template<FieldType T>
Matrix< T > CECCO::rref ( const Matrix< T > & M)

Definition at line 3667 of file matrices.hpp.

◆ rref() [2/2]

template<FieldType T>
Matrix< T > CECCO::rref ( Matrix< T > && M)

Definition at line 3674 of file matrices.hpp.

◆ scale_column() [1/2]

template<ComponentType T>
Matrix< T > CECCO::scale_column ( const Matrix< T > & M,
const T & s,
size_t i )

Definition at line 3334 of file matrices.hpp.

◆ scale_column() [2/2]

template<ComponentType T>
Matrix< T > CECCO::scale_column ( Matrix< T > && M,
const T & s,
size_t i )

Definition at line 3348 of file matrices.hpp.

◆ scale_row() [1/2]

template<ComponentType T>
Matrix< T > CECCO::scale_row ( const Matrix< T > & M,
const T & s,
size_t i )

Definition at line 3327 of file matrices.hpp.

◆ scale_row() [2/2]

template<ComponentType T>
Matrix< T > CECCO::scale_row ( Matrix< T > && M,
const T & s,
size_t i )

Definition at line 3341 of file matrices.hpp.

◆ Schur_product()

template<ComponentType T>
Vector< T > CECCO::Schur_product ( const Vector< T > & lhs,
const Vector< T > & rhs )

Schur (component-wise) product.

Exceptions
std::invalid_argumentif lengths differ

Definition at line 1603 of file vectors.hpp.

◆ set_component() [1/4]

template<ComponentType T>
Matrix< T > CECCO::set_component ( const Matrix< T > & M,
size_t i,
size_t j,
const T & c )

Definition at line 3182 of file matrices.hpp.

◆ set_component() [2/4]

template<ComponentType T>
Vector< T > CECCO::set_component ( const Vector< T > & v,
size_t i,
const T & c )

Definition at line 1363 of file vectors.hpp.

◆ set_component() [3/4]

template<ComponentType T>
Matrix< T > CECCO::set_component ( Matrix< T > && M,
size_t i,
size_t j,
const T & c )

Definition at line 3189 of file matrices.hpp.

◆ set_component() [4/4]

template<ComponentType T>
Vector< T > CECCO::set_component ( Vector< T > && v,
size_t i,
const T & c )

Definition at line 1370 of file vectors.hpp.

◆ set_submatrix() [1/2]

template<ComponentType T>
Matrix< T > CECCO::set_submatrix ( const Matrix< T > & M,
size_t i,
size_t j,
const Matrix< T > & N )

Definition at line 3201 of file matrices.hpp.

◆ set_submatrix() [2/2]

template<ComponentType T>
Matrix< T > CECCO::set_submatrix ( Matrix< T > && M,
size_t i,
size_t j,
const Matrix< T > & N )

Definition at line 3208 of file matrices.hpp.

◆ set_subvector() [1/2]

template<ComponentType T>
Vector< T > CECCO::set_subvector ( Vector< T > && v,
size_t start,
const Vector< T > & w )
constexpr

Definition at line 1392 of file vectors.hpp.

◆ set_subvector() [2/2]

template<ComponentType T>
Vector< T > CECCO::set_subvector ( Vector< T > v,
size_t start,
const Vector< T > & w )
constexpr

Definition at line 1387 of file vectors.hpp.

◆ shift_down() [1/2]

template<CoefficientType T>
Polynomial< T > CECCO::shift_down ( const Polynomial< T > & poly,
size_t s )
constexpr

Definition at line 1282 of file polynomials.hpp.

◆ shift_down() [2/2]

template<CoefficientType T>
Polynomial< T > CECCO::shift_down ( Polynomial< T > && poly,
size_t s )
constexpr

Definition at line 1289 of file polynomials.hpp.

◆ shift_up() [1/2]

template<CoefficientType T>
requires ReliablyComparableType<T>
Polynomial< T > CECCO::shift_up ( const Polynomial< T > & poly,
size_t s )
constexpr

Definition at line 1264 of file polynomials.hpp.

◆ shift_up() [2/2]

template<CoefficientType T>
requires ReliablyComparableType<T>
Polynomial< T > CECCO::shift_up ( Polynomial< T > && poly,
size_t s )
constexpr

Definition at line 1273 of file polynomials.hpp.

◆ shorten()

template<class B>
auto CECCO::shorten ( B && base,
size_t j,
size_t i )

Definition at line 7096 of file codes.hpp.

◆ showall()

std::ostream & CECCO::showall ( std::ostream & os)
inline

Definition at line 199 of file codes.hpp.

◆ showbasic()

std::ostream & CECCO::showbasic ( std::ostream & os)
inline

Definition at line 189 of file codes.hpp.

Here is the caller graph for this function:

◆ showmost()

std::ostream & CECCO::showmost ( std::ostream & os)
inline

Definition at line 194 of file codes.hpp.

◆ showspecial()

std::ostream & CECCO::showspecial ( std::ostream & os)
inline

Definition at line 204 of file codes.hpp.

◆ SingletonUpperBound()

size_t CECCO::SingletonUpperBound ( size_t n,
size_t dmin )
inline

Definition at line 143 of file code_bounds.hpp.

◆ sqm()

template<class T>
T CECCO::sqm ( T b,
int e )
constexpr

Exponentiation by square-and-multiply.

Template Parameters
TType supporting multiplication and, for negative exponents, division
Parameters
bBase value
eExponent
Returns
b^e

For negative exponents, computes (1/b)^|e|.

Note
Returns T(1) for e = 0.
Exceptions
std::overflow_errorif T is an integral type and the result would overflow it
std::invalid_argumentfor negative exponents when T is integral or has no division

Definition at line 376 of file helpers.hpp.

◆ SubfieldSubcode() [1/2]

template<class B>
CECCO::SubfieldSubcode ( B && ) -> SubfieldSubcode< B >

◆ SubfieldSubcode() [2/2]

template<class B>
CECCO::SubfieldSubcode ( const B & ) -> SubfieldSubcode< B >

◆ supp()

template<ReliablyComparableType T>
std::vector< size_t > CECCO::supp ( const Vector< T > & v)

Support; see Vector::supp for semantics.

Definition at line 1662 of file vectors.hpp.

◆ swap_columns() [1/2]

template<ComponentType T>
Matrix< T > CECCO::swap_columns ( const Matrix< T > & M,
size_t i,
size_t j )

Definition at line 3306 of file matrices.hpp.

◆ swap_columns() [2/2]

template<ComponentType T>
Matrix< T > CECCO::swap_columns ( Matrix< T > && M,
size_t i,
size_t j )

Definition at line 3320 of file matrices.hpp.

◆ swap_rows() [1/2]

template<ComponentType T>
Matrix< T > CECCO::swap_rows ( const Matrix< T > & M,
size_t i,
size_t j )

Definition at line 3299 of file matrices.hpp.

◆ swap_rows() [2/2]

template<ComponentType T>
Matrix< T > CECCO::swap_rows ( Matrix< T > && M,
size_t i,
size_t j )

Definition at line 3313 of file matrices.hpp.

◆ to_long_double()

long double CECCO::to_long_double ( const InfInt & v)
inline

Conversion of an InfInt of arbitrary magnitude to long double.

Parameters
vInteger
Returns
Nearest representable value (about 18 significant decimal digits are preserved)

Definition at line 316 of file helpers.hpp.

Here is the call graph for this function:

◆ ToeplitzMatrix()

template<ComponentType T>
Matrix< T > CECCO::ToeplitzMatrix ( const Vector< T > & v,
size_t m,
size_t n )
constexpr

m × n Toeplitz matrix from its diagonal entries

Parameters
vDiagonal values, ordered so that v[i − j + n − 1] sits on entry (i, j); length m + n − 1
mNumber of rows
nNumber of columns
Returns
Toeplitz matrix; tagged by the strongest detected structural type
Exceptions
std::invalid_argumentif m == 0 or n == 0
std::invalid_argumentif v.length() != m + n - 1

Definition at line 3934 of file matrices.hpp.

◆ transpose() [1/2]

template<ComponentType T>
Matrix< T > CECCO::transpose ( const Matrix< T > & M)
constexpr

Definition at line 3653 of file matrices.hpp.

◆ transpose() [2/2]

template<ComponentType T>
Matrix< T > CECCO::transpose ( Matrix< T > && M)
constexpr

Definition at line 3660 of file matrices.hpp.

◆ unaugment()

template<FieldType T, class B>
B CECCO::unaugment ( const AugmentedCode< T, B > & C)

Definition at line 7011 of file codes.hpp.

◆ unerase_column() [1/2]

template<ComponentType T>
Matrix< T > CECCO::unerase_column ( const Matrix< T > & lhs,
size_t i )
constexpr

Definition at line 3539 of file matrices.hpp.

◆ unerase_column() [2/2]

template<ComponentType T>
Matrix< T > CECCO::unerase_column ( Matrix< T > && lhs,
size_t i )
constexpr

Definition at line 3546 of file matrices.hpp.

◆ unerase_columns() [1/2]

template<ComponentType T>
Matrix< T > CECCO::unerase_columns ( const Matrix< T > & lhs,
const std::vector< size_t > & v )
constexpr

Definition at line 3525 of file matrices.hpp.

◆ unerase_columns() [2/2]

template<ComponentType T>
Matrix< T > CECCO::unerase_columns ( Matrix< T > && lhs,
const std::vector< size_t > & v )
constexpr

Definition at line 3532 of file matrices.hpp.

◆ unerase_component() [1/4]

template<ComponentType T>
Matrix< T > CECCO::unerase_component ( const Matrix< T > & lhs,
size_t i,
size_t j )
constexpr

Definition at line 3483 of file matrices.hpp.

◆ unerase_component() [2/4]

template<ComponentType T>
Vector< T > CECCO::unerase_component ( const Vector< T > & lhs,
size_t i )

Definition at line 1483 of file vectors.hpp.

◆ unerase_component() [3/4]

template<ComponentType T>
Matrix< T > CECCO::unerase_component ( Matrix< T > && lhs,
size_t i,
size_t j )
constexpr

Definition at line 3490 of file matrices.hpp.

◆ unerase_component() [4/4]

template<ComponentType T>
Vector< T > CECCO::unerase_component ( Vector< T > && lhs,
size_t i )

Definition at line 1490 of file vectors.hpp.

◆ unerase_components() [1/2]

template<ComponentType T>
Vector< T > CECCO::unerase_components ( const Vector< T > & lhs,
const std::vector< size_t > & v )

Definition at line 1469 of file vectors.hpp.

◆ unerase_components() [2/2]

template<ComponentType T>
Vector< T > CECCO::unerase_components ( Vector< T > && lhs,
const std::vector< size_t > & v )

Definition at line 1476 of file vectors.hpp.

◆ unerase_row() [1/2]

template<ComponentType T>
Matrix< T > CECCO::unerase_row ( const Matrix< T > & lhs,
size_t i )
constexpr

Definition at line 3595 of file matrices.hpp.

◆ unerase_row() [2/2]

template<ComponentType T>
Matrix< T > CECCO::unerase_row ( Matrix< T > && lhs,
size_t i )
constexpr

Definition at line 3602 of file matrices.hpp.

◆ unerase_rows() [1/2]

template<ComponentType T>
Matrix< T > CECCO::unerase_rows ( const Matrix< T > & lhs,
const std::vector< size_t > & v )
constexpr

Definition at line 3581 of file matrices.hpp.

◆ unerase_rows() [2/2]

template<ComponentType T>
Matrix< T > CECCO::unerase_rows ( Matrix< T > && lhs,
const std::vector< size_t > & v )
constexpr

Definition at line 3588 of file matrices.hpp.

◆ unextend()

template<FieldType T, class B>
B CECCO::unextend ( const ExtendedCode< T, B > & C)

Definition at line 6997 of file codes.hpp.

◆ unit_vector()

template<ComponentType T>
Vector< T > CECCO::unit_vector ( size_t length,
size_t i )

Length-length vector with T(1) at index i and zeros elsewhere.

Exceptions
std::invalid_argumentif i >= length

Definition at line 1629 of file vectors.hpp.

◆ unlengthen()

template<FieldType T, class D>
auto CECCO::unlengthen ( const ExtendedCode< T, AugmentedCode< T, D > > & C)

Definition at line 7031 of file codes.hpp.

◆ UpperBound()

template<FiniteFieldType T>
long double CECCO::UpperBound ( size_t n,
size_t dmin )

Definition at line 181 of file code_bounds.hpp.

◆ UpperShiftMatrix()

template<ComponentType T>
Matrix< T > CECCO::UpperShiftMatrix ( size_t m)
constexpr

m × m upper shift matrix (ones on the superdiagonal)

Parameters
mSide length
Returns
Matrix with U_{i, i+1} = 1, all other entries 0

Definition at line 4021 of file matrices.hpp.

◆ VandermondeMatrix()

template<ReliablyComparableType T>
Matrix< T > CECCO::VandermondeMatrix ( const Vector< T > & v,
size_t m )
constexpr

Vandermonde matrix V_{i, j} = v[j]^i.

Parameters
vEvaluation points; must be pairwise distinct
mNumber of rows (i.e. the highest power is m − 1)
Returns
m × v.length() Vandermonde matrix; the 1 × 1 case is tagged as details::Identity
Exceptions
std::invalid_argumentif v is empty, has duplicates, or m is zero

Definition at line 3989 of file matrices.hpp.

◆ Vector()

template<CoefficientType T>
CECCO::Vector ( const Polynomial< T > & ) -> Vector< T >

Deduction guide: a vector constructed from a polynomial deduces the coefficient type.

◆ vertical_join() [1/3]

template<ComponentType T>
Matrix< T > CECCO::vertical_join ( const Matrix< T > & lhs,
const Matrix< T > & rhs )

Definition at line 3236 of file matrices.hpp.

◆ vertical_join() [2/3]

template<ComponentType T>
Matrix< T > CECCO::vertical_join ( Matrix< T > && lhs,
const Matrix< T > & rhs )

Definition at line 3243 of file matrices.hpp.

◆ vertical_join() [3/3]

template<ComponentType T>
Matrix< T > CECCO::vertical_join ( Matrix< T > && lhs,
Matrix< T > && rhs )

Definition at line 3250 of file matrices.hpp.

◆ wH() [1/2]

template<ReliablyComparableType T>
size_t CECCO::wH ( const Matrix< T > & M)
constexpr

Definition at line 3132 of file matrices.hpp.

◆ wH() [2/2]

template<ReliablyComparableType T>
size_t CECCO::wH ( const Vector< T > & v)
constexpr

Hamming weight; see Vector::wH for semantics.

Definition at line 1656 of file vectors.hpp.

◆ ZeroMatrix()

template<ComponentType T>
Matrix< T > CECCO::ZeroMatrix ( size_t m,
size_t n )
constexpr

m × n matrix of zeros (tag details::Zero)

Parameters
mNumber of rows
nNumber of columns
Returns
Newly constructed zero matrix

Definition at line 3827 of file matrices.hpp.

◆ ZeroPolynomial()

template<CoefficientType T>
const Polynomial< T > & CECCO::ZeroPolynomial ( )

Constant polynomial 0 (cached).

Definition at line 1383 of file polynomials.hpp.

Variable Documentation

◆ ERASURE_MARKER

std::string_view CECCO::ERASURE_MARKER = "X"
inlineconstexpr

Definition at line 444 of file fields.hpp.