Trait array_math::ArrayMath
source · pub trait ArrayMath<T, const N: usize>: ArrayOps<T, N> {
Show 16 methods
// Required methods
fn sum(self) -> T
where T: AddAssign + Zero;
fn product(self) -> T
where T: MulAssign + One;
fn variance(self) -> <T as Mul>::Output
where Self: ArrayOps<T, N> + Copy,
u8: Into<T>,
T: Div<Output: Mul<Output: Neg<Output = <T as Mul>::Output>> + Copy> + Mul<Output: AddAssign> + AddAssign + Zero;
fn variance16(self) -> <T as Mul>::Output
where Self: ArrayOps<T, N> + Copy,
u16: Into<T>,
T: Div<Output: Mul<Output: Neg<Output = <T as Mul>::Output>> + Copy> + Mul<Output: AddAssign> + AddAssign + Zero;
fn variance32(self) -> <T as Mul>::Output
where Self: ArrayOps<T, N> + Copy,
u32: Into<T>,
T: Div<Output: Mul<Output: Neg<Output = <T as Mul>::Output>> + Copy> + Mul<Output: AddAssign> + AddAssign + Zero;
fn variance64(self) -> <T as Mul>::Output
where Self: ArrayOps<T, N> + Copy,
u64: Into<T>,
T: Div<Output: Mul<Output: Neg<Output = <T as Mul>::Output>> + Copy> + Mul<Output: AddAssign> + AddAssign + Zero;
fn avg(self) -> <T as Div>::Output
where u8: Into<T>,
T: Div + AddAssign + Zero;
fn avg16(self) -> <T as Div>::Output
where u16: Into<T>,
T: Div + AddAssign + Zero;
fn avg32(self) -> <T as Div>::Output
where u32: Into<T>,
T: Div + AddAssign + Zero;
fn avg64(self) -> <T as Div>::Output
where u64: Into<T>,
T: Div + AddAssign + Zero;
fn mul_dot<Rhs>(self, rhs: [Rhs; N]) -> <T as Mul<Rhs>>::Output
where T: Mul<Rhs, Output: AddAssign + Zero>;
fn magnitude_squared(self) -> <T as Mul<T>>::Output
where T: Mul<T, Output: AddAssign + Zero> + Copy;
fn magnitude(self) -> <T as Mul<T>>::Output
where T: Mul<T, Output: AddAssign + Zero + Float> + Copy;
fn magnitude_inv(self) -> <T as Mul<T>>::Output
where T: Mul<T, Output: AddAssign + Zero + Float> + Copy;
fn normalize(self) -> [<T as Mul<<T as Mul<T>>::Output>>::Output; N]
where T: Mul<T, Output: AddAssign + Zero + Float + Copy> + Mul<<T as Mul<T>>::Output> + Copy;
fn normalize_to<Rhs>(
self,
magnitude: Rhs
) -> [<T as Mul<<<T as Mul<T>>::Output as Mul<Rhs>>::Output>>::Output; N]
where T: Mul<T, Output: AddAssign + Zero + Float + Mul<Rhs, Output: Copy>> + Mul<<<T as Mul<T>>::Output as Mul<Rhs>>::Output> + Copy;
}
Required Methods§
fn sum(self) -> T
fn product(self) -> T
fn variance(self) -> <T as Mul>::Output
fn variance16(self) -> <T as Mul>::Output
fn variance32(self) -> <T as Mul>::Output
fn variance64(self) -> <T as Mul>::Output
fn avg(self) -> <T as Div>::Output
fn avg16(self) -> <T as Div>::Output
fn avg32(self) -> <T as Div>::Output
fn avg64(self) -> <T as Div>::Output
fn mul_dot<Rhs>(self, rhs: [Rhs; N]) -> <T as Mul<Rhs>>::Output
fn magnitude_squared(self) -> <T as Mul<T>>::Output
fn magnitude(self) -> <T as Mul<T>>::Output
fn magnitude_inv(self) -> <T as Mul<T>>::Output
fn normalize(self) -> [<T as Mul<<T as Mul<T>>::Output>>::Output; N]
fn normalize_to<Rhs>( self, magnitude: Rhs ) -> [<T as Mul<<<T as Mul<T>>::Output as Mul<Rhs>>::Output>>::Output; N]
Object Safety§
This trait is not object safe.