pub trait TropicalScalar:
Copy
+ Clone
+ Send
+ Sync
+ Debug
+ Display
+ PartialOrd
+ 'static
+ Sized {
// Required methods
fn scalar_zero() -> Self;
fn scalar_one() -> Self;
fn scalar_add(self, rhs: Self) -> Self;
fn scalar_mul(self, rhs: Self) -> Self;
fn pos_infinity() -> Self;
fn neg_infinity() -> Self;
fn scalar_max(self, rhs: Self) -> Self;
fn scalar_min(self, rhs: Self) -> Self;
}Expand description
Trait for scalar types that can be used as underlying values in tropical numbers.
Required Methods§
Sourcefn scalar_zero() -> Self
fn scalar_zero() -> Self
The additive identity (standard arithmetic).
Sourcefn scalar_one() -> Self
fn scalar_one() -> Self
The multiplicative identity (standard arithmetic).
Sourcefn scalar_add(self, rhs: Self) -> Self
fn scalar_add(self, rhs: Self) -> Self
Standard arithmetic addition.
Sourcefn scalar_mul(self, rhs: Self) -> Self
fn scalar_mul(self, rhs: Self) -> Self
Standard arithmetic multiplication.
Sourcefn pos_infinity() -> Self
fn pos_infinity() -> Self
Positive infinity (for MinPlus zero).
Sourcefn neg_infinity() -> Self
fn neg_infinity() -> Self
Negative infinity (for MaxPlus zero).
Sourcefn scalar_max(self, rhs: Self) -> Self
fn scalar_max(self, rhs: Self) -> Self
Maximum of two values.
Sourcefn scalar_min(self, rhs: Self) -> Self
fn scalar_min(self, rhs: Self) -> Self
Minimum of two values.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.