#[repr(transparent)]pub struct TropicalMaxMul<T: TropicalScalar>(pub T);Expand description
TropicalMaxMul semiring: (ℝ⁺, max, ×)
- Addition (⊕) = max
- Multiplication (⊗) = ×
- Zero = 0
- One = 1
This is used for:
- Probability computations (non-log space)
- Fuzzy logic with product t-norm
Tuple Fields§
§0: TImplementations§
Source§impl<T: TropicalScalar> TropicalMaxMul<T>
impl<T: TropicalScalar> TropicalMaxMul<T>
Trait Implementations§
Source§impl<T: TropicalScalar> Add for TropicalMaxMul<T>
impl<T: TropicalScalar> Add for TropicalMaxMul<T>
Source§impl<T: Clone + TropicalScalar> Clone for TropicalMaxMul<T>
impl<T: Clone + TropicalScalar> Clone for TropicalMaxMul<T>
Source§fn clone(&self) -> TropicalMaxMul<T>
fn clone(&self) -> TropicalMaxMul<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: TropicalScalar> Debug for TropicalMaxMul<T>
impl<T: TropicalScalar> Debug for TropicalMaxMul<T>
Source§impl<T: TropicalScalar> Default for TropicalMaxMul<T>
impl<T: TropicalScalar> Default for TropicalMaxMul<T>
Source§impl<T: TropicalScalar> Display for TropicalMaxMul<T>
impl<T: TropicalScalar> Display for TropicalMaxMul<T>
Source§impl<T: TropicalScalar> From<T> for TropicalMaxMul<T>
impl<T: TropicalScalar> From<T> for TropicalMaxMul<T>
Source§impl KernelDispatch for TropicalMaxMul<f32>
impl KernelDispatch for TropicalMaxMul<f32>
Source§impl KernelDispatch for TropicalMaxMul<f64>
impl KernelDispatch for TropicalMaxMul<f64>
Source§impl KernelDispatch for TropicalMaxMul<i32>
impl KernelDispatch for TropicalMaxMul<i32>
Source§impl KernelDispatch for TropicalMaxMul<i64>
impl KernelDispatch for TropicalMaxMul<i64>
Source§impl Microkernel<TropicalMaxMul<f32>> for Avx2MaxMulF32Kernel
impl Microkernel<TropicalMaxMul<f32>> for Avx2MaxMulF32Kernel
Source§impl<T: TropicalScalar> Mul for TropicalMaxMul<T>
impl<T: TropicalScalar> Mul for TropicalMaxMul<T>
Source§impl<T: PartialEq + TropicalScalar> PartialEq for TropicalMaxMul<T>
impl<T: PartialEq + TropicalScalar> PartialEq for TropicalMaxMul<T>
Source§impl<T: TropicalScalar> SimdTropical for TropicalMaxMul<T>
impl<T: TropicalScalar> SimdTropical for TropicalMaxMul<T>
Source§const SIMD_AVAILABLE: bool = true
const SIMD_AVAILABLE: bool = true
Whether SIMD operations are available for this type.
Source§const SIMD_WIDTH: usize = 8
const SIMD_WIDTH: usize = 8
The SIMD width in elements.
Source§impl<T: TropicalScalar> TropicalSemiring for TropicalMaxMul<T>
impl<T: TropicalScalar> TropicalSemiring for TropicalMaxMul<T>
Source§fn tropical_zero() -> Self
fn tropical_zero() -> Self
Returns the additive identity (zero element for ⊕).
Source§fn tropical_one() -> Self
fn tropical_one() -> Self
Returns the multiplicative identity (one element for ⊗).
Source§fn tropical_add(self, rhs: Self) -> Self
fn tropical_add(self, rhs: Self) -> Self
Tropical addition (⊕).
Source§fn tropical_mul(self, rhs: Self) -> Self
fn tropical_mul(self, rhs: Self) -> Self
Tropical multiplication (⊗).
Source§fn from_scalar(s: T) -> Self
fn from_scalar(s: T) -> Self
Create from a scalar value.
Source§impl<T: TropicalScalar> TropicalWithArgmax for TropicalMaxMul<T>
impl<T: TropicalScalar> TropicalWithArgmax for TropicalMaxMul<T>
impl<T: Copy + TropicalScalar> Copy for TropicalMaxMul<T>
impl<T: TropicalScalar> StructuralPartialEq for TropicalMaxMul<T>
Auto Trait Implementations§
impl<T> Freeze for TropicalMaxMul<T>where
T: Freeze,
impl<T> RefUnwindSafe for TropicalMaxMul<T>where
T: RefUnwindSafe,
impl<T> Send for TropicalMaxMul<T>
impl<T> Sync for TropicalMaxMul<T>
impl<T> Unpin for TropicalMaxMul<T>where
T: Unpin,
impl<T> UnwindSafe for TropicalMaxMul<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more