[ 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 thats 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

© 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.7.1 (3 Dec 2010)