diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-12-04 12:40:29 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-12-04 12:40:29 +0100 |
commit | ea684af6b41cdcfd9a8d2edbda37a866827e5347 (patch) | |
tree | 0f3b9b03a1803327dab5b468e44152666304b58e /unsupported/Eigen | |
parent | 7aad4341609260356845b16057fd581302c5072f (diff) | |
parent | ffaea19a70d22657008645e97a0b9efe2fcc9451 (diff) |
merge
Diffstat (limited to 'unsupported/Eigen')
-rw-r--r-- | unsupported/Eigen/AutoDiff | 2 | ||||
-rw-r--r-- | unsupported/Eigen/src/FFT/ei_kissfft_impl.h | 8 | ||||
-rw-r--r-- | unsupported/Eigen/src/NumericalDiff/NumericalDiff.h | 5 |
3 files changed, 8 insertions, 7 deletions
diff --git a/unsupported/Eigen/AutoDiff b/unsupported/Eigen/AutoDiff index 229c15e69..a8b3ea90a 100644 --- a/unsupported/Eigen/AutoDiff +++ b/unsupported/Eigen/AutoDiff @@ -25,7 +25,7 @@ #ifndef EIGEN_AUTODIFF_MODULE #define EIGEN_AUTODIFF_MODULE -#include <Eigen/Core> +#include <Eigen/Array> namespace Eigen { diff --git a/unsupported/Eigen/src/FFT/ei_kissfft_impl.h b/unsupported/Eigen/src/FFT/ei_kissfft_impl.h index 5c958d1ec..2dff2bd00 100644 --- a/unsupported/Eigen/src/FFT/ei_kissfft_impl.h +++ b/unsupported/Eigen/src/FFT/ei_kissfft_impl.h @@ -160,7 +160,7 @@ struct ei_kiss_cpx_fft scratch[0]=scratch[1]-scratch[2]; tw1 += fstride; tw2 += fstride*2; - Fout[m] = Complex( Fout->real() - .5*scratch[3].real() , Fout->imag() - .5*scratch[3].imag() ); + Fout[m] = Complex( Fout->real() - Scalar(.5)*scratch[3].real() , Fout->imag() - Scalar(.5)*scratch[3].imag() ); scratch[0] *= epi3.imag(); *Fout += scratch[3]; Fout[m2] = Complex( Fout[m].real() + scratch[0].imag() , Fout[m].imag() - scratch[0].real() ); @@ -377,10 +377,10 @@ struct ei_kissfft_impl std::vector<Complex> m_tmpBuf2; inline - int PlanKey(int nfft,bool isinverse) const { return (nfft<<1) | isinverse; } + int PlanKey(int nfft, bool isinverse) const { return (nfft<<1) | int(isinverse); } inline - PlanData & get_plan(int nfft,bool inverse) + PlanData & get_plan(int nfft, bool inverse) { // TODO look for PlanKey(nfft, ! inverse) and conjugate the twiddles PlanData & pd = m_plans[ PlanKey(nfft,inverse) ]; @@ -400,7 +400,7 @@ struct ei_kissfft_impl int ncfft= ncfft2<<1; Scalar pi = acos( Scalar(-1) ); for (int k=1;k<=ncfft2;++k) - twidref[k-1] = exp( Complex(0,-pi * ((double) (k) / ncfft + .5) ) ); + twidref[k-1] = exp( Complex(0,-pi * (Scalar(k) / ncfft + Scalar(.5)) ) ); } return &twidref[0]; } diff --git a/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h b/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h index 98872e0bc..db6f791df 100644 --- a/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h +++ b/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h @@ -45,10 +45,11 @@ enum NumericalDiffMode { * * Currently only "Forward" and "Central" scheme are implemented. */ -template<typename Functor, NumericalDiffMode mode=Forward> -class NumericalDiff : public Functor +template<typename _Functor, NumericalDiffMode mode=Forward> +class NumericalDiff : public _Functor { public: + typedef _Functor Functor; typedef typename Functor::Scalar Scalar; typedef typename Functor::InputType InputType; typedef typename Functor::ValueType ValueType; |