Tropical carrier T ∪ {∞}. finite==false is the ⊕-identity sentinel (−∞ for Max, +∞ for Min), absorbing under ⊗. operator+ is ⊗ (honest addition); ⊕ is TropicalPlus.
More...
|
|
bool | finite = false |
|
T | val = T{} |
|
|
template<typename Op> |
| static constexpr bool | is_associative_v = true |
|
template<typename Op> |
| static constexpr bool | is_commutative_v = true |
|
template<typename Op> |
| static constexpr bool | is_idempotent_v = std::same_as<Op, TropicalPlus> |
|
|
constexpr bool | operator== (const Tropical &a, const Tropical &b) |
| | All ∞ representations are equal: val is dead when !finite, so a non-canonical {false, k} still compares equal to the {false, T{}} sentinel (preserving the additive-identity law).
|
|
constexpr Tropical | operator+ (const Tropical &a, const Tropical &b) |
| | ⊗ = + (the naturals' addition), saturating so it stays monotone over ⊕ and hence distributive; ∞ absorbs. For unsigned T the finite sum clamps at max on overflow — the bounded max-plus dioid — which is what makes the IsSemiring distributivity certificate honest rather than false at the wraparound boundary.
|
template<typename T, bool Max = true>
struct dedekind::algebra::Tropical< T, Max >
Tropical carrier T ∪ {∞}. finite==false is the ⊕-identity sentinel (−∞ for Max, +∞ for Min), absorbing under ⊗. operator+ is ⊗ (honest addition); ⊕ is TropicalPlus.
The documentation for this struct was generated from the following file: