renamed 'Traits' to 'Impl', added vim modelines for syntax highlighting

This commit is contained in:
Mark Borgerding 2009-10-21 10:27:17 -04:00
parent 902b6dcd6c
commit 85f8d1f0c6
2 changed files with 12 additions and 9 deletions

View File

@ -178,3 +178,5 @@ operator<< (std::basic_ostream<charT,traits>& ostr, const Complex<T>& rhs)
} }
#endif #endif
/* vim: set filetype=cpp et sw=2 ts=2 ai: */

View File

@ -46,21 +46,21 @@
namespace Eigen { namespace Eigen {
template <typename _Scalar, template <typename _Scalar,
typename _Traits=DEFAULT_FFT_IMPL<_Scalar> typename _Impl=DEFAULT_FFT_IMPL<_Scalar>
> >
class FFT class FFT
{ {
public: public:
typedef _Traits traits_type; typedef _Impl impl_type;
typedef typename traits_type::Scalar Scalar; typedef typename impl_type::Scalar Scalar;
typedef typename traits_type::Complex Complex; typedef typename impl_type::Complex Complex;
FFT(const traits_type & traits=traits_type() ) :m_traits(traits) { } FFT(const impl_type & impl=impl_type() ) :m_impl(impl) { }
template <typename _Input> template <typename _Input>
void fwd( Complex * dst, const _Input * src, int nfft) void fwd( Complex * dst, const _Input * src, int nfft)
{ {
m_traits.fwd(dst,src,nfft); m_impl.fwd(dst,src,nfft);
} }
template <typename _Input> template <typename _Input>
@ -73,7 +73,7 @@ class FFT
template <typename _Output> template <typename _Output>
void inv( _Output * dst, const Complex * src, int nfft) void inv( _Output * dst, const Complex * src, int nfft)
{ {
m_traits.inv( dst,src,nfft ); m_impl.inv( dst,src,nfft );
} }
template <typename _Output> template <typename _Output>
@ -86,10 +86,11 @@ class FFT
// TODO: multi-dimensional FFTs // TODO: multi-dimensional FFTs
// TODO: handle Eigen MatrixBase // TODO: handle Eigen MatrixBase
traits_type & traits() {return m_traits;} impl_type & impl() {return m_impl;}
private: private:
traits_type m_traits; impl_type m_impl;
}; };
#undef DEFAULT_FFT_IMPL #undef DEFAULT_FFT_IMPL
} }
#endif #endif
/* vim: set filetype=cpp et sw=2 ts=2 ai: */