22 #ifndef EDSP_BOXCAR_HPP 23 #define EDSP_BOXCAR_HPP 26 #include <edsp/meta/iterator.hpp> 28 namespace edsp {
namespace windowing {
42 template <
typename OutputIt>
43 constexpr
void boxcar(OutputIt first, OutputIt last) {
44 using value_type = meta::value_type_t<OutputIt>;
45 using size_type = meta::diff_type_t<OutputIt>;
46 const auto size =
static_cast<size_type
>(
std::distance(first, last));
47 for (size_type i = 0; i < size; ++i, ++first) {
48 *first =
static_cast<value_type
>(1);
54 #endif // EDSP_BOXCAR_HPP constexpr void boxcar(OutputIt first, OutputIt last)
Computes a boxcar (rectangular) window of length N and stores the result in the range, beginning at d_first.
Definition: boxcar.hpp:43
constexpr T distance(T x, T y) noexcept
Computes the distance between x and y.
Definition: numeric.hpp:328
Definition: amplifier.hpp:29