Trait ArrayDifferentiate

Source
pub trait ArrayDifferentiate<T, const N: usize>: Array + AsSlice<Item = T> {
    // Required method
    const fn differentiate(&mut self)
       where T: SubAssign<T> + Copy;
}

Required Methods§

Source

const fn differentiate(&mut self)
where T: SubAssign<T> + Copy,

Differentiates array (discrete calculus)

§Example
use array__ops::ops::*;
 
let mut a = [1, 2, 3];
 
a.differentiate();
 
assert_eq!(a, [1, 2 - 1, 3 - 2]);

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<T, const N: usize> ArrayDifferentiate<T, N> for [T; N]

Source§

fn differentiate(&mut self)
where T: SubAssign<T> + Copy,

Implementors§