pub struct MaxPlusAlgebra;Expand description
Algebra marker for the max-plus tropical semiring (⊕ = max, ⊗ = +).
Used as the algebra parameter A in
TensorPrims<MaxPlusAlgebra>.
§Examples
ⓘ
use tenferro_tropical::MaxPlusAlgebra;
use tenferro_prims::{CpuBackend, TensorPrims};
// Check extension support
let has_contract = CpuBackend::has_extension_for::<f64>(
tenferro_prims::Extension::Contract,
);Trait Implementations§
Source§impl Semiring for MaxPlusAlgebra
Max-plus semiring over MaxPlus<f64>.
impl Semiring for MaxPlusAlgebra
Max-plus semiring over MaxPlus<f64>.
zero()= MaxPlus(−∞)one()= MaxPlus(0.0)add(a, b)= max(a, b)mul(a, b)= a + b (ordinary addition)
Source§impl TensorPrims<MaxPlusAlgebra> for CpuBackend
impl TensorPrims<MaxPlusAlgebra> for CpuBackend
Source§fn has_extension_for<T: ScalarBase>(_ext: Extension) -> bool
fn has_extension_for<T: ScalarBase>(_ext: Extension) -> bool
Tropical backends do not support extended operations.
Source§type Plan<T: ScalarBase> = TropicalPlan<T>
type Plan<T: ScalarBase> = TropicalPlan<T>
Backend-specific plan type (no type erasure).
Auto Trait Implementations§
impl Freeze for MaxPlusAlgebra
impl RefUnwindSafe for MaxPlusAlgebra
impl Send for MaxPlusAlgebra
impl Sync for MaxPlusAlgebra
impl Unpin for MaxPlusAlgebra
impl UnwindSafe for MaxPlusAlgebra
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more