Trait alga::linear::NormedSpace [] [src]

pub trait NormedSpace: VectorSpace {
    fn norm_squared(&self) -> Self::Field;
    fn norm(&self) -> Self::Field;
    fn normalize(&self) -> Self;
    fn normalize_mut(&mut self) -> Self::Field;
    fn try_normalize(&self, eps: &Self::Field) -> Option<Self>;
    fn try_normalize_mut(&mut self, eps: &Self::Field) -> Option<Self::Field>;
}

A normed vector space.

Required Methods

The squared norm of this vector.

The norm of this vector.

Returns a normalized version of this vector.

Normalizes this vector in-place and returns its norm.

Returns a normalized version of this vector unless its norm as smaller or equal to eps.

Normalizes this vector in-place or does nothing if its norm is smaller or equal to eps.

If the normalization succeded, returns the old normal of this vector.

Implementors