libsemigroups
|
This abstract class provides common methods for its subclasses TropicalMaxPlusSemiring, TropicalMinPlusSemiring, and NaturalSemiring. More...
#include <semiring.h>
Public Member Functions | |
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... | |
virtual int64_t | one () const=0 |
Returns the multiplicative identity, or one, of the semiring. More... | |
virtual int64_t | plus (int64_t x, int64_t y) const=0 |
Returns the sum of x and y . More... | |
virtual int64_t | prod (int64_t x, int64_t y) const=0 |
Returns the product of x and y . More... | |
virtual int64_t | zero () const=0 |
Returns the additive identity, or zero, of the semiring. 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... | |
This abstract class provides common methods for its subclasses TropicalMaxPlusSemiring, TropicalMinPlusSemiring, and NaturalSemiring.
|
inlineexplicit |
A class for semirings with a threshold.
The threshold of a semiring is related to the largest finite value in the semiring.
|
inline |
Returns the threshold of a semiring with threshold.