Trait MDiv

Source
pub trait MDiv<Rhs>: Matrix
where Self::Output: Matrix,
{ type Output; // Required method fn div(self, rhs: Rhs) -> Self::Output; }

Required Associated Types§

Required Methods§

Source

fn div(self, rhs: Rhs) -> Self::Output

Returns matrix divided by a scalar

A/b

§Arguments
  • rhs - A scalar
§Examples
let a = [
    [1.0, 2.0],
    [3.0, 4.0]
];
let b = 2.0;
let a_b = [
    [0.5, 1.0],
    [1.5, 2.0]
];
assert_eq!(a.div(b), a_b)

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<F, const L: usize, const H: usize> MDiv<F> for [[F; L]; H]
where Self: Matrix, [[<F as Div<F>>::Output; L]; H]: Matrix, F: Clone + Div<F>,

Source§

type Output = [[<F as Div>::Output; L]; H]

Source§

fn div(self, rhs: F) -> Self::Output

Implementors§