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
field_concepts_traits.hpp File Reference

Concepts, traits, and type utilities for finite field arithmetic. More...

#include <complex>
#include <concepts>
#include "helpers.hpp"
Include dependency graph for field_concepts_traits.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CECCO::details::degree_over_prime< Fp< p > >
struct  CECCO::details::degree_over_prime< Ext< B, modulus, mode > >
struct  CECCO::details::degree_over_prime< Iso< MAIN, OTHERS... > >
struct  CECCO::details::is_subfield_of< SUPERFIELD, SUBFIELD >
 Construction-based subfield test: SUBFIELD reachable by descending SUPERFIELD's tower. More...
struct  CECCO::details::is_subfield_of< Fp< p >, Fp< p > >
struct  CECCO::details::is_subfield_of< Ext< B, modulus, mode >, SUB >
struct  CECCO::details::is_subfield_of< Ext< B, modulus, mode >, Ext< B, modulus, mode > >
struct  CECCO::details::is_subfield_of< Ext< B_SUP, modulus_SUP, mode_SUP >, Ext< B_SUB, modulus_SUB, mode_SUB > >
struct  CECCO::details::is_subfield_of< Iso< MAIN, OTHERS... >, SUB >
struct  CECCO::details::is_subfield_of< Iso< MAIN, OTHERS... >, Iso< MAIN, OTHERS... > >
struct  CECCO::details::is_subfield_of< Iso< SUP_MAIN, SUP_OTHERS... >, Iso< SUB_MAIN, SUB_OTHERS... > >
struct  CECCO::details::type_list< Types >
 Compile-time type list utility for subfield calculations. More...
struct  CECCO::details::contains< T, type_list< Types... > >
struct  CECCO::details::union_type_lists< type_list< Types1... >, type_list< Types2... > >
struct  CECCO::details::intersect_type_lists< type_list< Types1... >, type_list< Types2... > >
struct  CECCO::details::largest_field_in_list< type_list< T > >
struct  CECCO::details::largest_field_in_list< type_list< T1, T2, Rest... > >
struct  CECCO::details::collect_subfields< Fp< p > >
struct  CECCO::details::collect_subfields< Ext< B, modulus, mode > >
struct  CECCO::details::union_all_subfields<>
struct  CECCO::details::union_all_subfields< T >
struct  CECCO::details::union_all_subfields< T1, T2, Rest... >
struct  CECCO::details::collect_subfields< Iso< MAIN, OTHERS... > >
struct  CECCO::details::largest_common_subfield< F, G >
 Largest field that appears as a subfield of both F and G. More...
struct  CECCO::details::iso_info< T >
 Detect whether T is an Iso and expose its components. More...
struct  CECCO::details::iso_info< Iso< MAIN, OTHERS... > >
 Specialization of iso_info for Iso<MAIN, OTHERS...>. More...
class  CECCO::details::NonCopyable
 Mixin that deletes the copy operations and defaults the move operations. More...

Namespaces

namespace  CECCO
 Provides a framework for error correcting codes.
namespace  CECCO::details
 Contains implementation details not to be exposed to the user. Functions and classes here may change without notice.

Concepts

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

Macros

#define MOD   std::array
 Alias for std::array, used to spell modulus polynomials in CECCO::Ext.

Typedefs

template<typename List1, typename List2>
using CECCO::details::union_type_lists_t = typename union_type_lists<List1, List2>::type
template<typename List1, typename List2>
using CECCO::details::intersect_type_lists_t = typename intersect_type_lists<List1, List2>::type
template<typename List>
using CECCO::details::largest_field_in_list_t = typename largest_field_in_list<List>::type
template<typename F>
using CECCO::details::collect_subfields_t = typename collect_subfields<F>::type
template<typename F, typename G>
using CECCO::details::largest_common_subfield_t = typename largest_common_subfield<F, G>::type

Enumerations

enum class  CECCO::LutMode { CECCO::CompileTime , CECCO::RunTime }
 LUT generation mode for field operations. More...

Functions

template<typename... Types>
constexpr bool CECCO::details::pairwise_distinct ()
 True iff all types in the pack are pairwise distinct.

Variables

template<FiniteFieldType T>
constexpr size_t CECCO::details::degree_over_prime_v = degree_over_prime<T>::value
template<FiniteFieldType SUPER, FiniteFieldType SUB>
constexpr bool CECCO::details::is_subfield_of_v = is_subfield_of<SUPER, SUB>::value
template<typename T, typename List>
constexpr bool CECCO::details::contains_v = contains<T, List>::value
template<typename T, typename... Types>
constexpr bool CECCO::details::is_distinct_from_all = (!std::is_same_v<T, Types> && ...)
 True iff T is not the same as any of Types....

Detailed Description

Concepts, traits, and type utilities for finite field arithmetic.

Author
Christian Senger senge.nosp@m.r@in.nosp@m.ue.un.nosp@m.i-st.nosp@m.uttga.nosp@m.rt.d.nosp@m.e
Version
2.1.5
Date
2026

Licensed for noncommercial use only, including academic teaching, research, and personal non-profit purposes. Commercial use is prohibited without a separate commercial license. See the LICENSE file in the repository root for full terms and how to request a commercial license.

Description

Conceptual foundation for the finite field arithmetic library: C++20 concepts and traits that constrain field types and let cross-field operations decide compatibility at compile time.

Concepts visible to library users: CECCO::FieldType, CECCO::FiniteFieldType, CECCO::SubfieldOf / CECCO::ExtensionOf, CECCO::Isomorphic, CECCO::ComponentType (the umbrella for CECCO::Vector / CECCO::Polynomial / CECCO::Matrix component types), CECCO::ReliablyComparableType, CECCO::SignedIntType.

Internals (in CECCO::details): metafunctions that compute field-tower relationships (is_subfield_of, collect_subfields, largest_common_subfield_t) and iso_info for Iso introspection.

See also
fields.hpp for the field classes (Fp, Ext, Iso, Rationals) that satisfy these concepts

Definition in file field_concepts_traits.hpp.

Macro Definition Documentation

◆ MOD

#define MOD   std::array

Alias for std::array, used to spell modulus polynomials in CECCO::Ext.

Lets Ext<F2, {1, 1, 1}> deduce the array length from the brace-initialiser instead of requiring std::array<int, 3>{…}.

Definition at line 223 of file field_concepts_traits.hpp.