56 [[nodiscard]]
static constexpr Value zero() {
return false; }
57 [[nodiscard]]
static constexpr Value one() {
return true; }
72 static_assert(std::is_floating_point_v<T>,
"RealSemiring<T> requires a floating-point T (double or float)");
76 [[nodiscard]]
static constexpr Value zero() {
return static_cast<T
>(0); }
77 [[nodiscard]]
static constexpr Value one() {
return static_cast<T
>(1); }
Definition datalog_atom.hpp:14
A "Semiring" here is not a base class – it is a compile-time trait shape a type must satisfy to be us...
Definition datalog_semiring.hpp:53
static constexpr Value zero()
Definition datalog_semiring.hpp:56
bool Value
Definition datalog_semiring.hpp:54
static constexpr Value add(Value a, Value b)
Definition datalog_semiring.hpp:58
static constexpr Value one()
Definition datalog_semiring.hpp:57
static constexpr Value mul(Value a, Value b)
Definition datalog_semiring.hpp:59
The real-valued (+, x) semiring: ⊕ = floating-point addition, ⊗ = floating-point multiplication,...
Definition datalog_semiring.hpp:71
T Value
Definition datalog_semiring.hpp:74
static constexpr Value one()
Definition datalog_semiring.hpp:77
static constexpr Value zero()
Definition datalog_semiring.hpp:76
static constexpr Value mul(Value a, Value b)
Definition datalog_semiring.hpp:79
static constexpr Value add(Value a, Value b)
Definition datalog_semiring.hpp:78