libsemigroups  v3.0.0
C++ library for semigroups and monoids
Loading...
Searching...
No Matches
MinPlusTruncProd< T, Scalar >
template<size_t T, typename Scalar>
struct libsemigroups::MinPlusTruncProd< T, Scalar >

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 \otimes y\) which is defined by

\[ x\otimes y = \begin{cases} \min\{x + y, T\} & \text{if } x \neq \infty\text{ and }y \neq \infty \\ \mbox \infty & \text{if } x = \infty \text{ or }y = \infty; \end{cases} \]

representing multiplication in the quotient of the min-plus semiring by the congruence \(T = T + 1\).

Template Parameters
Tthe threshold (point at which the entries in the min-plus semiring are truncated).
Scalarthe type of the values in the semiring.

Public Member Functions

Scalar operator() (Scalar x, Scalar y) const noexcept
 Call operator for multiplication.
 

Member Function Documentation

◆ operator()()

template<size_t T, typename Scalar>
Scalar operator() ( Scalar x,
Scalar y ) const
inlinenoexcept

This function returns the product of its arguments in a truncated min-plus semiring.

Parameters
xthe first value.
ythe second value.
Returns
The product of x and y in truncated min-plus semiring.
Exceptions
This function is noexcept and is guaranteed never to throw.

The documentation for this struct was generated from the following file: