TropicalSemiring

Trait TropicalSemiring 

Source
pub trait TropicalSemiring {
    // Required methods
    fn tropical_zero() -> Self;
    fn tropical_one() -> Self;
    fn tropical_add(&self, other: &Self) -> Self;
    fn tropical_mul(&self, other: &Self) -> Self;
}
Expand description

Trait for tropical semiring operations

Required Methods§

Source

fn tropical_zero() -> Self

Tropical zero element

Source

fn tropical_one() -> Self

Tropical one element

Source

fn tropical_add(&self, other: &Self) -> Self

Tropical addition (max for max-plus, min for min-plus)

Source

fn tropical_mul(&self, other: &Self) -> Self

Tropical multiplication (ordinary addition)

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.

Implementations on Foreign Types§

Source§

impl TropicalSemiring for f64

Source§

fn tropical_zero() -> Self

Source§

fn tropical_one() -> Self

Source§

fn tropical_add(&self, other: &Self) -> Self

Source§

fn tropical_mul(&self, other: &Self) -> Self

Implementors§