23 #ifndef EDSP_NORMALIZER_HPP    24 #define EDSP_NORMALIZER_HPP    29 #include <edsp/meta/iterator.hpp>    31 namespace edsp { 
inline namespace algorithm {
    45     template <
typename InputIt, 
typename OutputIt>
    46     constexpr 
void normalize(InputIt first, InputIt last, OutputIt d_first) {
    48         std::transform(first, last, d_first,
    49                        [factor](
const meta::value_type_t<InputIt> value) -> meta::value_type_t<OutputIt> {
    50                            return static_cast<meta::value_type_t<OutputIt>
>(value) / factor;
    66     template <
typename InputIt, 
typename OutputIt>
    67     constexpr 
void normalize_rms(InputIt first, InputIt last, OutputIt d_first) {
    69         std::transform(first, last, d_first,
    70                        [factor](
const meta::value_type_t<InputIt> value) -> meta::value_type_t<OutputIt> {
    71                            return static_cast<meta::value_type_t<OutputIt>
>(value) / factor;
    77 #endif // EDSP_NORMALIZER_HPP constexpr void normalize_rms(InputIt first, InputIt last, OutputIt d_first)
Normalizes the elements in the range [first, last) and stores the result in another range...
Definition: normalize.hpp:67
 
constexpr meta::value_type_t< ForwardIt > rms(ForwardIt first, ForwardIt last)
Computes the root-mean-square (RMS) value of the range [first, last) 
Definition: rms.hpp:44
 
constexpr meta::value_type_t< ForwardIt > maxabs(ForwardIt first, ForwardIt last)
Computes the maximum absolute value of the range [first, last) 
Definition: max.hpp:50
 
constexpr void normalize(InputIt first, InputIt last, OutputIt d_first)
Normalizes the elements in the range [first, last) and stores the result in another range...
Definition: normalize.hpp:46
 
Definition: amplifier.hpp:29