Trait Scalar

Source
pub trait Scalar
where Self: Numerical + Sized + 'static + Display + Product + Sum + Neg + One + Zero + Num + NumCast + NumAssign + NumAssignOps + NumAssignRef + NumOps + NumRef + FromPrimitive + ToPrimitive + Signed + Pow<Self, Output = Self> + Float + FloatConst,
{ // Provided methods fn one() -> Self where Self: Sized { ... } fn zero() -> Self where Self: Sized { ... } }
Expand description

The Scalar trait extends the Numerical trait to include additional mathematical operations for the purpose of reducing the number of overall traits required to complete various machine-learning tasks.

Provided Methods§

Source

fn one() -> Self
where Self: Sized,

Source

fn zero() -> Self
where Self: Sized,

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 Scalar for f32

Source§

impl Scalar for f64

Implementors§