|
| T & | operator= (int l)=delete |
| | Assign from int ā derived must implement.
|
| T & | operator= (const T &rhs) noexcept=delete |
| | Copy assignment ā derived must implement.
|
| T & | operator= (T &&rhs) noexcept=delete |
| | Move assignment ā derived must implement.
|
| constexpr bool | operator!= (const T &rhs) const |
| | Inequality, defined as !(*this == rhs).
|
| constexpr T | operator+ () const & |
| | Unary + on an lvalue: returns a copy.
|
| constexpr T && | operator+ () &&noexcept |
| | Unary + on an rvalue: returns the rvalue itself.
|
| T | operator- () const &noexcept=delete |
| | Additive inverse on an lvalue ā derived must implement.
|
| T & | operator- () &&noexcept=delete |
| | Additive inverse on an rvalue (in place) ā derived must implement.
|
| T & | operator+= (const T &rhs) noexcept=delete |
| | *this += rhs ā derived must implement
|
| T & | operator-= (const T &rhs) noexcept=delete |
| | *this -= rhs ā derived must implement
|
| T & | operator*= (const T &rhs) noexcept=delete |
| | *this *= rhs ā derived must implement
|
| T & | operator/= (const T &rhs)=delete |
| | *this /= rhs; throws std::invalid_argument if rhs is zero ā derived must implement
|
| Field & | randomize ()=delete |
| | Uniform random element of the field ā derived must implement; may return the same value.
|
| Field & | randomize_force_change ()=delete |
| | Like randomize but guaranteed to differ from the current value ā derived must implement.
|
| size_t | get_multiplicative_order () const =delete |
| | Smallest k > 0 with this^k == 1; throws std::invalid_argument if *this is zero.
|
| size_t | get_additive_order () const =delete |
| | Smallest k > 0 with k * *this == 0; for finite fields of characteristic p this is p (or 1 for zero); for ā it is 1 for zero and 0 (infinite) otherwise.
|
| bool | has_positive_sign () const noexcept=delete |
| | True if the element is "positive" (always true for finite fields; sign of numerator for ā).
|
| bool | is_zero () const noexcept=delete |
| | True if *this is the additive identity.
|
| Field & | erase () noexcept=delete |
| | Mark this element as erased (out-of-field marker for erasure decoding).
|
| Field & | unerase () noexcept=delete |
| | Clear the erasure flag, resetting to additive identity.
|
| bool | is_erased () const noexcept=delete |
| | Test whether this element is currently erased.
|
template<class T>
class CECCO::details::Field< T >
CRTP base documenting the interface every field type must provide.
- Template Parameters
-
| T | Derived field type (CRTP parameter) |
Most members are = delete, present solely to advertise the interface ā derived types shadow them with their own definitions. The free arithmetic operators in this file template on CECCO::FieldType and dispatch directly to T's compound assignments; there is no virtual dispatch.
Derived types must supply: assignment from T, T&&, and int; operator==; unary -; the four compound assignments +=, ā=, *=, /=; randomize() / randomize_force_change(); the property queries is_zero(), has_positive_sign(), get_multiplicative_order(), get_additive_order(). When CECCO_ERASURE_SUPPORT is defined, also erase() / unerase() / is_erased().
Provided here (not deleted): operator!= (delegates to ==) and the two unary operator+ overloads (identity).
Definition at line 206 of file fields.hpp.