libsemigroups
|
The tropical max-plus semiring consists of the integers \(\{0, \ldots , t\}\) for some value \(t\) (called the threshold of the semiring) and \(-\infty\). Negative infinity is represented by Semiring<int64_t>::MINUS_INFTY. More...
#include <semiring.h>
Public Member Functions | |
TropicalMaxPlusSemiring (int64_t threshold) | |
Construct from threshold. More... | |
int64_t | one () const override |
Returns the multiplicative identity, or one, of the semiring. More... | |
int64_t | plus (int64_t x, int64_t y) const override |
Returns the minimum of (the maximum of x and y ) and the threshold of the semiring. More... | |
int64_t | prod (int64_t x, int64_t y) const override |
Returns Semiring<int64_t>::MINUS_INFTY if x or y equals Semiring<int64_t>::MINUS_INFTY, otherwise returns the minimum of x + y and the threshold of the semiring. More... | |
int64_t | zero () const override |
Returns the Semiring<int64_t>::MINUS_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 max-plus semiring consists of the integers \(\{0, \ldots , t\}\) for some value \(t\) (called the threshold of the semiring) and \(-\infty\). Negative infinity is represented by Semiring<int64_t>::MINUS_INFTY.
|
inlineexplicit |
Construct from threshold.
The threshold is the largest integer in the semiring.
|
inlineoverridevirtual |
Returns the multiplicative identity, or one, of the semiring.
Implements libsemigroups::Semiring< int64_t >.
|
inlineoverridevirtual |
Returns the minimum of (the maximum of x
and y
) and the threshold of the semiring.
Implements libsemigroups::Semiring< int64_t >.
|
inlineoverridevirtual |
Returns Semiring<int64_t>::MINUS_INFTY if x
or y
equals Semiring<int64_t>::MINUS_INFTY, otherwise returns the minimum of x
+ y
and the threshold of the semiring.
Implements libsemigroups::Semiring< int64_t >.
|
inlineoverridevirtual |
Returns the Semiring<int64_t>::MINUS_INFTY.
Implements libsemigroups::Semiring< int64_t >.