23 #ifndef EDSP_POWER_HPP 24 #define EDSP_POWER_HPP 28 namespace edsp {
namespace feature {
inline namespace temporal {
43 template<
typename ForwardIt>
44 constexpr
auto power(ForwardIt first, ForwardIt last) {
45 using value_type =
typename std::iterator_traits<ForwardIt>::value_type;
47 return energy(first, last) /
static_cast<value_type
>(size);
51 #endif //EDSP_POWER_HPP constexpr T distance(T x, T y) noexcept
Computes the distance between x and y.
Definition: numeric.hpp:328
constexpr auto power(ForwardIt first, ForwardIt last)
Computes the instant power of the elements in the range [first, last)
Definition: power.hpp:44
constexpr auto energy(ForwardIt first, ForwardIt last)
Computes the energy of the elements in the range [first, last)
Definition: energy.hpp:46
Definition: amplifier.hpp:29