![]() |
libsemigroups
v3.0.0
C++ library for semigroups and monoids
|
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} \min\{x, y\} & \text{if } x \neq \infty\text{ and }y \neq \infty \\ \mbox{} \infty & \text{if } x = \infty \text{ or }y = \infty; \end{cases} \]
representing addition in the min-plus semiring.
Scalar | the type of the values in the semiring (must be signed integer type). |
Public Member Functions | |
Scalar | operator() (Scalar x, Scalar y) const noexcept |
Call operator for addition. | |
|
inlinenoexcept |
This function returns the sum of its arguments in the min-plus semiring.
x | the first value. |
y | the second value. |
x
and y
in the min-plus semiring.noexcept
and is guaranteed never to throw.