Skip to main content

L2Norm

Trait L2Norm 

Source
pub trait L2Norm {
    type Output;

    // Required method
    fn l2_norm(&self) -> Self::Output;
}
Expand description

a trait for computing the L2 norm of a tensor or array

Required Associated Types§

Required Methods§

Source

fn l2_norm(&self) -> Self::Output

compute the L2 norm of the tensor or array

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, A, S, D> L2Norm for &'a ArrayBase<S, D, A>
where A: 'static + Clone + Float, D: Dimension, S: Data<Elem = A>,

Source§

type Output = A

Source§

fn l2_norm(&self) -> <&'a ArrayBase<S, D, A> as L2Norm>::Output

Source§

impl<'a, A, S, D> L2Norm for &'a mut ArrayBase<S, D, A>
where A: 'static + Clone + Float, D: Dimension, S: Data<Elem = A>,

Source§

type Output = A

Source§

fn l2_norm(&self) -> <&'a mut ArrayBase<S, D, A> as L2Norm>::Output

Source§

impl<A, S, D> L2Norm for ArrayBase<S, D, A>
where A: 'static + Clone + Float, D: Dimension, S: Data<Elem = A>,

Source§

type Output = A

Source§

fn l2_norm(&self) -> <ArrayBase<S, D, A> as L2Norm>::Output

Implementors§