VIGRA - Numeric and Promote Traits of FFTWComplex

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

| Numeric and Promote Traits of FFTWComplex |
--- | --- | ---

The numeric and promote traits for fftw_complex and FFTWComplex follow the general specifications for Numeric and Promotion Traits and AlgebraicField. They are explicitly specialized for the types involved:

        template<>
        struct NumericTraits<fftw_complex>
        {
            typedef fftw_complex Promote;
            typedef fftw_complex RealPromote;
            typedef fftw_complex ComplexPromote;
            typedef fftw_real    ValueType;

            typedef VigraFalseType isIntegral;
            typedef VigraFalseType isScalar;
            typedef VigraFalseType isOrdered;
            typedef VigraTrueType  isComplex;

            // etc.
        };

        template<>
        struct NumericTraits<FFTWComplex>
        {
            typedef FFTWComplex Promote;
            typedef FFTWComplex RealPromote;
            typedef FFTWComplex ComplexPromote;
            typedef fftw_real   ValueType;

            typedef VigraFalseType isIntegral;
            typedef VigraFalseType isScalar;
            typedef VigraFalseType isOrdered;
            typedef VigraTrueType  isComplex;

            // etc.
        };

        template<>
        struct NormTraits<fftw_complex>
        {
            typedef fftw_complex Type;
            typedef fftw_real    SquaredNormType;
            typedef fftw_real    NormType;
        };

        template<>
        struct NormTraits<FFTWComplex>
        {
            typedef FFTWComplex Type;
            typedef fftw_real   SquaredNormType;
            typedef fftw_real   NormType;
        };

        template <>
        struct PromoteTraits<fftw_complex, fftw_complex>
        {
            typedef fftw_complex Promote;
        };

        template <>
        struct PromoteTraits<fftw_complex, double>
        {
            typedef fftw_complex Promote;
        };

        template <>
        struct PromoteTraits<double, fftw_complex>
        {
            typedef fftw_complex Promote;
        };

        template <>
        struct PromoteTraits<FFTWComplex, FFTWComplex>
        {
            typedef FFTWComplex Promote;
        };

        template <>
        struct PromoteTraits<FFTWComplex, double>
        {
            typedef FFTWComplex Promote;
        };

        template <>
        struct PromoteTraits<double, FFTWComplex>
        {
            typedef FFTWComplex Promote;
        };

#include "vigra/fftw3.hxx" (for FFTW 3) or
#include "vigra/fftw.hxx" (for deprecated FFTW 2)
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.5.0 (7 Dec 2006)