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

details Numeric and Promote Traits of RGBValue VIGRA

The numeric and promote traits for RGBValues follow the general specifications for Numeric and Promotion Traits. They are implemented in terms of the traits of the basic types by partial template specialization:

    template <class T>
    struct NumericTraits<RGBValue<T> >
    {
        typedef RGBValue<typename NumericTraits<T>::Promote> Promote;
        typedef RGBValue<typename NumericTraits<T>::RealPromote> RealPromote;

        typedef typename NumericTraits<T>::isIntegral isIntegral;
        typedef VigraFalseType isScalar;

        // etc.
    };

    template <class T>
    struct NormTraits<RGBValue<T> >
    {
        typedef RGBValue<T> Type;
        typedef typename Type::SquaredNormType    SquaredNormType;
        typedef typename Type::NormType           NormType;
    };

    template <class T1, class T2>
    struct PromoteTraits<RGBValue<T1>, RGBValue<T2> >
    {
        typedef RGBValue<typename PromoteTraits<T1, T2>::Promote> Promote;
    };

#include "vigra/rgbvalue.hxx"
Namespace: vigra

© Ullrich Köthe (koethe@informatik.uni-hamburg.de)
Cognitive Systems Group, University of Hamburg, Germany

html generated using doxygen and Python
VIGRA 1.3.3 (18 Aug 2005)