[][src]Trait easy_ml::numeric::NumericByValue

pub trait NumericByValue<Rhs = Self, Output = Self>: Add<Rhs, Output = Output> + Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Neg<Output = Output> + Sized { }

A trait defining what a numeric type is in terms of by value numerical operations matrices need their types to support for math operations.

The requirements are Add, Sub, Mul, Div, Neg and Sized. Note that unsigned integers do not implement Neg unless they are wrapped by Wrapping.

Implementors

impl<T, Rhs, Output> NumericByValue<Rhs, Output> for T where
    T: Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Neg<Output = Output> + Sized
[src]

Anything which implements all the super traits will automatically implement this trait too. This covers primitives such as f32, f64, signed integers and Wrapped unsigned integers.

It will not include Matrix because Matrix does not implement Div. Similarly, unwrapped unsigned integers do not implement Neg so are not included.

Loading content...