23 #ifndef EDSP_ENERGY_HPP 24 #define EDSP_ENERGY_HPP 29 namespace edsp {
namespace feature {
inline namespace temporal {
45 template<
typename ForwardIt>
46 constexpr
auto energy(ForwardIt first, ForwardIt last) {
47 using value_type =
typename std::iterator_traits<ForwardIt>::value_type;
49 return std::inner_product(first, last, first, static_cast<value_type>(0));
53 #endif //EDSP_ENERGY_HPP constexpr T distance(T x, T y) noexcept
Computes the distance between x and y.
Definition: numeric.hpp:328
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