Defined in matrix.hpp.
This is a stateless struct with a single call operator of signature: Scalar operator()(Scalar x, Scalar y) const noexcept that returns \(x \oplus y\) which is defined by
\[ x\oplus y = \begin{cases} x + y & \text{if } x + y \leq T \\ \mbox{} T + ((x + y) - T \pmod{P}) & \text{if } x + y > T \end{cases} \]
representing addition in the quotient of the semiring natural numbers by the congruence \((T = T + P)\).
| T | the threshold. |
| P | the period. |
| Scalar | the type of the values in the semiring. |
Public Member Functions | |
| constexpr Scalar | operator() (Scalar x, Scalar y) const noexcept |
| Call operator for addition. | |
|
inlineconstexprnoexcept |
This function returns the sum of its arguments in an ntp semiring.
| x | the first value. |
| y | the second value. |
x and y in an ntp semiring.noexcept and is guaranteed never to throw.