Trait 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;

    // Provided method
    fn norm(&self) -> Self::Output { ... }
}
Expand description

Define norm as a metric linear space (not as a matrix)

For operator norms, see opnorm module

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

Provided Methodsยง

Source

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

rename of norm_l2

Implementations on Foreign Typesยง

Sourceยง

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

Sourceยง

type Output = <A as Scalar>::Real

Sourceยง

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

Sourceยง

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

Sourceยง

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

Implementorsยง