/*============================================================================= Copyright (c) 2011-2014 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/Sprout Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ #ifndef SPROUT_ITERATOR_PHASE_SPECTRUM_ITERATOR_HPP #define SPROUT_ITERATOR_PHASE_SPECTRUM_ITERATOR_HPP #include #include #include #include namespace sprout { // // phase_value // template class phase_value { public: typedef typename T::value_type result_type; typedef T argument_type; public: SPROUT_CONSTEXPR typename T::value_type operator()(T const& value) const { return sprout::phase_spectrum_value(value); } }; template<> class phase_value { public: template SPROUT_CONSTEXPR typename T::value_type operator()(T const& value) const { return sprout::phase_spectrum_value(value); } }; // // make_phase_spectrum_iterator // template inline SPROUT_CONSTEXPR sprout::transform_iterator::value_type>, Iterator> make_phase_spectrum_iterator(Iterator it) { return sprout::transform_iterator::value_type>, Iterator>( it, sprout::phase_value::value_type>() ); } } // namespace sprout #endif // #ifndef SPROUT_ITERATOR_PHASE_SPECTRUM_ITERATOR_HPP