libsemigroups
|
The tropical min-plus semiring consists of the integers \(\{0, \ldots , t\}\) for some value \(t\) (called the threshold of the semiring) and \(\infty\). Infinity is represented by Semiring<int64_t>::INFTY. More...
#include <semiring.h>
Public Member Functions | |
TropicalMinPlusSemiring (int64_t threshold) | |
Construct from threshold. More... | |
int64_t | one () const override |
Returns the integer 0. More... | |
int64_t | plus (int64_t x, int64_t y) const override |
Returns Semiring<int64_t>::INFTY if either of x and y is Semiring<int64_t>::INFTY, and otherwise the minimum of x, y, and the threshold of the semiring. More... | |
int64_t | prod (int64_t x, int64_t y) const override |
Returns Semiring<int64_t>::INFTY if x or y equals Semiring<int64_t>::INFTY, otherwise return the minimum of x + y and the threshold of the semiring. More... | |
int64_t | zero () const override |
Returns the Semiring<int64_t>::INFTY. More... | |
![]() | |
SemiringWithThreshold (int64_t threshold) | |
A class for semirings with a threshold. More... | |
int64_t | threshold () const |
Returns the threshold of a semiring with threshold. More... | |
![]() | |
virtual | ~Semiring () |
A default destructor. More... | |
Additional Inherited Members | |
![]() | |
static const int64_t | INFTY |
Value representing \(\infty\). More... | |
static const int64_t | MINUS_INFTY |
Value representing \(-\infty\). More... | |
static const int64_t | UNDEFINED |
Value representing an undefined quantity. More... | |
The tropical min-plus semiring consists of the integers \(\{0, \ldots , t\}\) for some value \(t\) (called the threshold of the semiring) and \(\infty\). Infinity is represented by Semiring<int64_t>::INFTY.
|
inlineexplicit |
Construct from threshold.
The threshold is the largest integer in the semiring.
|
inlineoverridevirtual |
Returns the integer 0.
Implements libsemigroups::Semiring< int64_t >.
|
inlineoverridevirtual |
Returns Semiring<int64_t>::INFTY if either of x
and y
is Semiring<int64_t>::INFTY, and otherwise the minimum of x, y, and the threshold of the semiring.
Implements libsemigroups::Semiring< int64_t >.
|
inlineoverridevirtual |
Returns Semiring<int64_t>::INFTY if x
or y
equals Semiring<int64_t>::INFTY, otherwise return the minimum of x
+ y
and the threshold of the semiring.
Implements libsemigroups::Semiring< int64_t >.
|
inlineoverridevirtual |
Returns the Semiring<int64_t>::INFTY.
Implements libsemigroups::Semiring< int64_t >.