[][src]Module norman::special

Dedicated traits for some standard norms like the euclidean norm.

Always calling the norm function of the Norm trait with an additional Abs::new or PNorm::eucl argument may be a bit verbose if one only wants to get some grasp of how big a value is. So this module contains some specialized traits that calculate standard norms without an additional norm descriptor.

The same goes for the Distance trait.

Currently there are only NormEucl and DistanceEucl.

For details on their implementation, see the module documentation of implementation.

Modules

implementation

Implementations of the NormEucl and DistanceEucl trait for several types.

Traits

DistanceEucl

This trait is used to emphasize a special distance function for a type of vectors that is kind of a euclidean distance and can be used as the standard norm for this type.

NormEucl

This trait is used to emphasize a special norm for a type of vectors that is kind of a euclidean norm and can be used as the standard norm for this type.

Functions

normalize_eucl

Normalizes the vector v according to the euclidean norm, i.e. divides it by its norm.

normalized_eucl

Returns the normalization of v according to the euclidean norm, i.e. v divided by its norm.