#ifndef SPROUT_NUMERIC_DFT_IDFT_ELEMENT_HPP #define SPROUT_NUMERIC_DFT_IDFT_ELEMENT_HPP #include #include #include #include #include namespace sprout { namespace detail { template inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type idft_element_impl( InputIterator first, InputIterator last, typename std::iterator_traits::difference_type i, Size size ) { typedef typename std::iterator_traits::value_type value_type; typedef typename value_type::value_type elem_type; return sprout::detail::dft_element_gen( first, last, 2 * sprout::math::pi() * i / size ) / static_cast(size) ; } } // namespace detail // // idft_element // template inline SPROUT_CONSTEXPR typename std::iterator_traits::value_type idft_element( InputIterator first, InputIterator last, typename std::iterator_traits::difference_type i) { return sprout::detail::idft_element_impl( first, last, i, sprout::distance(first, last) ); } } // namespace sprout #endif // #ifndef SPROUT_NUMERIC_DFT_IDFT_ELEMENT_HPP