Module scalar

Module scalar 

Source
Expand description

Tropical scalar wrapper types.

Each newtype redefines Add and Mul so that the Scalar blanket impl is satisfied with tropical semantics:

Type+ (⊕)* (⊗)ZeroOne
MaxPlus<T>max+−∞0
MinPlus<T>min++∞0
MaxMul<T>max×01

All arithmetic bodies use todo!() (POC skeleton).

Structs§

MaxMul
Max-times tropical scalar: ⊕ = max, ⊗ = ×.
MaxPlus
Max-plus tropical scalar: ⊕ = max, ⊗ = +.
MinPlus
Min-plus tropical scalar: ⊕ = min, ⊗ = +.