[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

template<> struct NormTraits<ArithmeticType>

Unary traits for the calculation of the norm and squared norm of arithmetic objects.

#include <vigra/numerictraits.hxx>

This traits class is used to determine appropriate result types for the functions norm() and squaredNorm(). These functions are always declared like this (where `ArithmeticType` is a type that supports a norm):

NormTraits<ArithmeticType>::NormType norm(ArithmeticType const & t);
NormTraits<ArithmeticType>::SquaredNormType squaredNorm(ArithmeticType const & t);

The following members are defined in `NormTraits<ArithmeticType>`:

`typedef ArithmeticType Type;` | the type itself
`typedef ... SquaredNormType;` | result of `squaredNorm(ArithmeticType)`
`typedef ... NormType;` | result of `norm(ArithmeticType)` Usually equal to `SquareRootTraits<SquaredNormType>::SquareRootResult`

NormTraits for the built-in types are defined in #include <vigra/numerictraits.hxx>

Namespace: vigra

vigra::squaredNorm
FFTWComplex< R >::SquaredNormType squaredNorm(const FFTWComplex< R > &a)
squared norm (= squared magnitude)
Definition: fftw3.hxx:1044
vigra::norm
FFTWComplex< R >::NormType norm(const FFTWComplex< R > &a)
norm (= magnitude)
Definition: fftw3.hxx:1037

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.11.1