27 #ifndef EDSP_SPECTRAL_ENTROPY_HPP 28 #define EDSP_SPECTRAL_ENTROPY_HPP 34 namespace edsp {
namespace feature {
inline namespace spectral {
55 template <
typename ForwardIt>
57 using value_type =
typename std::iterator_traits<ForwardIt>::value_type ;
58 const auto acc = std::accumulate(first, last, static_cast<value_type >(0));
59 std::for_each(first, last, std::bind(std::multiplies<value_type>(), std::placeholders::_1, acc));
64 #endif //EDSP_SPECTRAL_ENTROPY_HPP constexpr auto spectral_entropy(ForwardIt first, ForwardIt last)
Computes the spectral entropy of the of the power spectral density represented by the elements in the...
Definition: spectral_entropy.hpp:56
constexpr meta::value_type_t< ForwardIt > entropy(ForwardIt first, ForwardIt last)
Computes the normalized entropy of the probability mass function given in the range [first...
Definition: entropy.hpp:51
Definition: amplifier.hpp:29