akreon-linalg
Fixed-size linear algebra and numerical methods in C++26.
Loading...
Searching...
No Matches
linalg::Field Concept Reference

Registered scalar supporting the Akreon Linalg's field arithmetic interface. More...

#include <scalar_concepts.hpp>

Concept definition

template<typename T>
concept linalg::Field = Scalar<T> && requires(const remove_cvref_t<T>& a,
const remove_cvref_t<T>& b) {
{ a + b } -> std::convertible_to<remove_cvref_t<T>>;
{ a - b } -> std::convertible_to<remove_cvref_t<T>>;
{ a * b } -> std::convertible_to<remove_cvref_t<T>>;
{ a / b } -> std::convertible_to<remove_cvref_t<T>>;
}
Registered scalar supporting the Akreon Linalg's field arithmetic interface.
Type registered with the Akreon Linalg scalar trait system.
constexpr std::size_t mat_rows_v
Registered compile-time row count after cv/ref normalization.

Detailed Description

Registered scalar supporting the Akreon Linalg's field arithmetic interface.

Addition, subtraction, multiplication, and division between two normalized values must each produce a result convertible to that same scalar type. The concept checks the C++ expression contract, not mathematical field axioms; in particular, it cannot prove associativity, distributivity, or that a runtime divisor is nonzero.

Definition at line 39 of file scalar_concepts.hpp.