mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
support STL container: numeric, numeric/dft
This commit is contained in:
parent
092910e2f7
commit
aace49ac65
51 changed files with 812 additions and 101 deletions
|
@ -2,10 +2,7 @@
|
|||
#define SPROUT_RANGE_NUMERIC_DFT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/range/numeric/dft/dft.hpp>
|
||||
#include <sprout/range/numeric/dft/idft.hpp>
|
||||
#include <sprout/range/numeric/dft/dft_element.hpp>
|
||||
#include <sprout/range/numeric/dft/idft_element.hpp>
|
||||
#include <sprout/range/numeric/dft/spectrum.hpp>
|
||||
#include <sprout/range/numeric/dft/non_modifying.hpp>
|
||||
#include <sprout/range/numeric/dft/modifying.hpp>
|
||||
|
||||
#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_HPP
|
||||
|
|
9
sprout/range/numeric/dft/fit.hpp
Normal file
9
sprout/range/numeric/dft/fit.hpp
Normal file
|
@ -0,0 +1,9 @@
|
|||
#ifndef SPROUT_RANGE_NUMERIC_DFT_FIT_HPP
|
||||
#define SPROUT_RANGE_NUMERIC_DFT_FIT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/range/numeric/dft/fit/dft.hpp>
|
||||
#include <sprout/range/numeric/dft/fit/idft.hpp>
|
||||
#include <sprout/range/numeric/dft/fit/spectrum.hpp>
|
||||
|
||||
#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_FIT_HPP
|
|
@ -18,6 +18,12 @@ namespace sprout {
|
|||
amplitude_spectrum(Input const& input, Result const& result) {
|
||||
return sprout::fit::amplitude_spectrum(sprout::begin(input), sprout::end(input), result);
|
||||
}
|
||||
|
||||
template<typename Result, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
amplitude_spectrum(Input const& input) {
|
||||
return sprout::fit::amplitude_spectrum<Result>(sprout::begin(input), sprout::end(input));
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace range
|
||||
} // namespace sprout
|
||||
|
|
|
@ -18,6 +18,12 @@ namespace sprout {
|
|||
dft(Input const& input, Result const& result) {
|
||||
return sprout::fit::dft(sprout::begin(input), sprout::end(input), result);
|
||||
}
|
||||
|
||||
template<typename Result, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
dft(Input const& input) {
|
||||
return sprout::fit::dft<Result>(sprout::begin(input), sprout::end(input));
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace range
|
||||
} // namespace sprout
|
||||
|
|
|
@ -18,6 +18,12 @@ namespace sprout {
|
|||
idft(Input const& input, Result const& result) {
|
||||
return sprout::fit::idft(sprout::begin(input), sprout::end(input), result);
|
||||
}
|
||||
|
||||
template<typename Result, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
idft(Input const& input) {
|
||||
return sprout::fit::idft<Result>(sprout::begin(input), sprout::end(input));
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace range
|
||||
} // namespace sprout
|
||||
|
|
|
@ -18,6 +18,12 @@ namespace sprout {
|
|||
phase_spectrum(Input const& input, Result const& result) {
|
||||
return sprout::fit::phase_spectrum(sprout::begin(input), sprout::end(input), result);
|
||||
}
|
||||
|
||||
template<typename Result, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
phase_spectrum(Input const& input) {
|
||||
return sprout::fit::phase_spectrum<Result>(sprout::begin(input), sprout::end(input));
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace range
|
||||
} // namespace sprout
|
||||
|
|
|
@ -18,6 +18,12 @@ namespace sprout {
|
|||
spectrum(Input const& input, Result const& result) {
|
||||
return sprout::fit::spectrum(sprout::begin(input), sprout::end(input), result);
|
||||
}
|
||||
|
||||
template<typename Result, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
spectrum(Input const& input) {
|
||||
return sprout::fit::spectrum<Result>(sprout::begin(input), sprout::end(input));
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace range
|
||||
} // namespace sprout
|
||||
|
|
9
sprout/range/numeric/dft/fixed.hpp
Normal file
9
sprout/range/numeric/dft/fixed.hpp
Normal file
|
@ -0,0 +1,9 @@
|
|||
#ifndef SPROUT_RANGE_NUMERIC_DFT_FIXED_HPP
|
||||
#define SPROUT_RANGE_NUMERIC_DFT_FIXED_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/range/numeric/dft/fixed/dft.hpp>
|
||||
#include <sprout/range/numeric/dft/fixed/idft.hpp>
|
||||
#include <sprout/range/numeric/dft/fixed/spectrum.hpp>
|
||||
|
||||
#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_FIXED_HPP
|
|
@ -18,6 +18,12 @@ namespace sprout {
|
|||
amplitude_spectrum(Input const& input, Result const& result) {
|
||||
return sprout::fixed::amplitude_spectrum(sprout::begin(input), sprout::end(input), result);
|
||||
}
|
||||
|
||||
template<typename Result, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
amplitude_spectrum(Input const& input) {
|
||||
return sprout::fixed::amplitude_spectrum<Result>(sprout::begin(input), sprout::end(input));
|
||||
}
|
||||
} // namespace fixed
|
||||
|
||||
using sprout::range::fixed::amplitude_spectrum;
|
||||
|
|
|
@ -18,6 +18,12 @@ namespace sprout {
|
|||
dft(Input const& input, Result const& result) {
|
||||
return sprout::fixed::dft(sprout::begin(input), sprout::end(input), result);
|
||||
}
|
||||
|
||||
template<typename Result, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
dft(Input const& input) {
|
||||
return sprout::fixed::dft<Result>(sprout::begin(input), sprout::end(input));
|
||||
}
|
||||
} // namespace fixed
|
||||
|
||||
using sprout::range::fixed::dft;
|
||||
|
|
|
@ -18,6 +18,12 @@ namespace sprout {
|
|||
idft(Input const& input, Result const& result) {
|
||||
return sprout::fixed::idft(sprout::begin(input), sprout::end(input), result);
|
||||
}
|
||||
|
||||
template<typename Result, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
idft(Input const& input) {
|
||||
return sprout::fixed::idft<Result>(sprout::begin(input), sprout::end(input));
|
||||
}
|
||||
} // namespace fixed
|
||||
|
||||
using sprout::range::fixed::idft;
|
||||
|
|
|
@ -18,6 +18,12 @@ namespace sprout {
|
|||
phase_spectrum(Input const& input, Result const& result) {
|
||||
return sprout::fixed::phase_spectrum(sprout::begin(input), sprout::end(input), result);
|
||||
}
|
||||
|
||||
template<typename Result, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
phase_spectrum(Input const& input) {
|
||||
return sprout::fixed::phase_spectrum<Result>(sprout::begin(input), sprout::end(input));
|
||||
}
|
||||
} // namespace fixed
|
||||
|
||||
using sprout::range::fixed::phase_spectrum;
|
||||
|
|
|
@ -18,6 +18,12 @@ namespace sprout {
|
|||
spectrum(Input const& input, Result const& result) {
|
||||
return sprout::fixed::spectrum(sprout::begin(input), sprout::end(input), result);
|
||||
}
|
||||
|
||||
template<typename Result, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
spectrum(Input const& input) {
|
||||
return sprout::fixed::spectrum<Result>(sprout::begin(input), sprout::end(input));
|
||||
}
|
||||
} // namespace fixed
|
||||
|
||||
using sprout::range::fixed::spectrum;
|
||||
|
|
8
sprout/range/numeric/dft/modifying.hpp
Normal file
8
sprout/range/numeric/dft/modifying.hpp
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef SPROUT_RANGE_NUMERIC_DFT_MODIFYIING_HPP
|
||||
#define SPROUT_RANGE_NUMERIC_DFT_MODIFYIING_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/range/numeric/dft/fixed.hpp>
|
||||
#include <sprout/range/numeric/dft/fit.hpp>
|
||||
|
||||
#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_MODIFYIING_HPP
|
8
sprout/range/numeric/dft/non_modifying.hpp
Normal file
8
sprout/range/numeric/dft/non_modifying.hpp
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef SPROUT_RANGE_NUMERIC_DFT_NON_MODIFYIING_HPP
|
||||
#define SPROUT_RANGE_NUMERIC_DFT_NON_MODIFYIING_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/range/numeric/dft/dft_element.hpp>
|
||||
#include <sprout/range/numeric/dft/idft_element.hpp>
|
||||
|
||||
#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_NON_MODIFYIING_HPP
|
|
@ -23,6 +23,17 @@ namespace sprout {
|
|||
adjacent_difference(Input const& input, Result const& result, BinaryOperation binary_op) {
|
||||
return sprout::fit::adjacent_difference(sprout::begin(input), sprout::end(input), result, binary_op);
|
||||
}
|
||||
|
||||
template<typename Result, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
adjacent_difference(Input const& input) {
|
||||
return sprout::fit::adjacent_difference<Result>(sprout::begin(input), sprout::end(input));
|
||||
}
|
||||
template<typename Result, typename Input, typename BinaryOperation>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
adjacent_difference(Input const& input, BinaryOperation binary_op) {
|
||||
return sprout::fit::adjacent_difference<Result>(sprout::begin(input), sprout::end(input), binary_op);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace range
|
||||
} // namespace sprout
|
||||
|
|
|
@ -23,6 +23,17 @@ namespace sprout {
|
|||
partial_sum(Input const& input, Result const& result, BinaryOperation binary_op) {
|
||||
return sprout::fit::partial_sum(sprout::begin(input), sprout::end(input), result, binary_op);
|
||||
}
|
||||
|
||||
template<typename Result, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
partial_sum(Input const& input) {
|
||||
return sprout::fit::partial_sum<Result>(sprout::begin(input), sprout::end(input));
|
||||
}
|
||||
template<typename Result, typename Input, typename BinaryOperation>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fit::result_of::algorithm<Result>::type
|
||||
partial_sum(Input const& input, BinaryOperation binary_op) {
|
||||
return sprout::fit::partial_sum<Result>(sprout::begin(input), sprout::end(input), binary_op);
|
||||
}
|
||||
} // namespace fit
|
||||
} // namespace range
|
||||
} // namespace sprout
|
||||
|
|
|
@ -23,6 +23,17 @@ namespace sprout {
|
|||
adjacent_difference(Input const& input, Result const& result, BinaryOperation binary_op) {
|
||||
return sprout::fixed::adjacent_difference(sprout::begin(input), sprout::end(input), result, binary_op);
|
||||
}
|
||||
|
||||
template<typename Result, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
adjacent_difference(Input const& input) {
|
||||
return sprout::fixed::adjacent_difference<Result>(sprout::begin(input), sprout::end(input));
|
||||
}
|
||||
template<typename Result, typename Input, typename BinaryOperation>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
adjacent_difference(Input const& input, BinaryOperation binary_op) {
|
||||
return sprout::fixed::adjacent_difference<Result>(sprout::begin(input), sprout::end(input), binary_op);
|
||||
}
|
||||
} // namespace fixed
|
||||
|
||||
using sprout::range::fixed::adjacent_difference;
|
||||
|
|
|
@ -23,6 +23,17 @@ namespace sprout {
|
|||
partial_sum(Input const& input, Result const& result, BinaryOperation binary_op) {
|
||||
return sprout::fixed::partial_sum(sprout::begin(input), sprout::end(input), result, binary_op);
|
||||
}
|
||||
|
||||
template<typename Result, typename Input>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
partial_sum(Input const& input) {
|
||||
return sprout::fixed::partial_sum<Result>(sprout::begin(input), sprout::end(input));
|
||||
}
|
||||
template<typename Result, typename Input, typename BinaryOperation>
|
||||
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Result>::type
|
||||
partial_sum(Input const& input, BinaryOperation binary_op) {
|
||||
return sprout::fixed::partial_sum<Result>(sprout::begin(input), sprout::end(input), binary_op);
|
||||
}
|
||||
} // namespace fixed
|
||||
|
||||
using sprout::range::fixed::partial_sum;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue