Trait linfa_linalg::norm::Norm

source ·
pub trait Norm {
    type Output;

    // Required methods
    fn norm_l1(&self) -> Self::Output;
    fn norm_l2(&self) -> Self::Output;
    fn norm_max(&self) -> Self::Output;
}
Expand description

Define norm as a metric linear space, treating the whole matrix as one big vector.

Required Associated Types§

Required Methods§

source

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

L-1 norm

source

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

L-2 norm

source

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

Maximum norm (L-infinite)

Implementations on Foreign Types§

source§

impl<A, S, D> Norm for ArrayBase<S, D>
where A: NdFloat + Sum, S: Data<Elem = A>, D: Dimension,

source§

type Output = A

source§

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

source§

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

source§

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

Implementors§