pub trait VecMath {
Show 41 methods fn fill(capacity: usize, fill_value: Dn) -> Self; fn zeros(capacity: usize) -> Self; fn sum(&self) -> Dn; fn mean(&self) -> Dn; fn variance(&self) -> Dn; fn xcorr(&self, other: &Self) -> Dn; fn stddev(&self) -> Dn; fn z_score(&self, check_value: Dn) -> Dn; fn isolate_window_2d(
        &self,
        width_2d: usize,
        height_2d: usize,
        window_size: usize,
        x: usize,
        y: usize
    ) -> Self; fn get_2d(&self, width_2d: usize, height_2d: usize, x: usize, y: usize) -> Dn; fn center_crop_2d(
        &self,
        from_width: usize,
        from_height: usize,
        to_width: usize,
        to_height: usize
    ) -> Self; fn crop_2d(
        &self,
        from_width: usize,
        from_height: usize,
        left_x: usize,
        top_y: usize,
        to_width: usize,
        to_height: usize
    ) -> Self; fn add(&self, other: &Self) -> Self; fn add_mut(&mut self, other: &Self); fn add_across(&self, other: Dn) -> Self; fn add_across_mut(&mut self, other: Dn); fn subtract(&self, other: &Self) -> Self; fn subtract_mut(&mut self, other: &Self); fn subtract_across(&self, other: Dn) -> Self; fn subtract_across_mut(&mut self, other: Dn); fn divide(&self, other: &Self) -> Self; fn divide_mut(&mut self, other: &Self); fn divide_into(&self, divisor: Dn) -> Self; fn divide_into_mut(&mut self, divisor: Dn); fn scale(&self, scalar: Dn) -> Self; fn scale_mut(&mut self, scalar: Dn); fn multiply(&self, other: &Self) -> Self; fn multiply_mut(&mut self, other: &Self); fn power(&self, exponent: Dn) -> Self; fn power_mut(&mut self, exponent: Dn); fn clip(&self, clip_min: Dn, clip_max: Dn) -> Self; fn clip_mut(&mut self, clip_min: Dn, clip_max: Dn); fn paste_2d(
        &self,
        dest_width: usize,
        dest_height: usize,
        src: &Self,
        src_width: usize,
        src_height: usize,
        tl_x: usize,
        tl_y: usize
    ) -> Self; fn paste_mut_2d(
        &mut self,
        dest_width: usize,
        dest_height: usize,
        src: &Self,
        src_width: usize,
        src_height: usize,
        tl_x: usize,
        tl_y: usize
    ); fn normalize_force_minmax(
        &self,
        min: Dn,
        max: Dn,
        forced_min: Dn,
        forced_max: Dn
    ) -> Self; fn normalize_force_minmax_mut(
        &mut self,
        min: Dn,
        max: Dn,
        forced_min: Dn,
        forced_max: Dn
    ); fn min(&self) -> Dn; fn max(&self) -> Dn; fn get_min_max(&self) -> MinMax; fn normalize(&self, min: Dn, max: Dn) -> Self; fn normalize_mut(&mut self, min: Dn, max: Dn);
}
Expand description

Dn Vector (Unmasked)

Required Methods

Implementors