mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-12 14:54:10 +00:00
add c++14 constexpr spectrum and wave genarator algorithms
This commit is contained in:
parent
d1fc657c1f
commit
cc48f3585a
29 changed files with 506 additions and 77 deletions
|
@ -9,8 +9,11 @@
|
|||
#define SPROUT_NUMERIC_DFT_FIXED_SPECTRUM_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/iterator/type_traits/is_iterator_of.hpp>
|
||||
#include <sprout/type_traits/enabler_if.hpp>
|
||||
#include <sprout/algorithm/fixed/results.hpp>
|
||||
#include <sprout/numeric/dft/fixed/amplitude_spectrum.hpp>
|
||||
#include <sprout/numeric/dft/fixed/phase_spectrum.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace fixed {
|
||||
|
@ -30,9 +33,20 @@ namespace sprout {
|
|||
}
|
||||
} // namespace fixed
|
||||
|
||||
using sprout::fixed::spectrum;
|
||||
template<
|
||||
typename InputIterator, typename Result,
|
||||
typename sprout::enabler_if<!sprout::is_iterator_outputable<Result>::value>::type = sprout::enabler
|
||||
>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
spectrum(InputIterator first, InputIterator last, Result const& result) {
|
||||
return sprout::fixed::spectrum(first, last, result);
|
||||
}
|
||||
|
||||
template<typename Result, typename InputIterator>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Result>::type
|
||||
spectrum(InputIterator first, InputIterator last) {
|
||||
return sprout::fixed::spectrum<Result>(first, last);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
#include <sprout/numeric/dft/fixed/phase_spectrum.hpp>
|
||||
|
||||
#endif // #ifndef SPROUT_NUMERIC_DFT_FIXED_SPECTRUM_HPP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue