22 #ifndef EDSP_STATISTICAL_VARIANCE_H 23 #define EDSP_STATISTICAL_VARIANCE_H 26 #include <edsp/meta/iterator.hpp> 29 namespace edsp {
namespace statistics {
43 template <
typename ForwardIt>
44 constexpr meta::value_type_t<ForwardIt>
variance(ForwardIt first, ForwardIt last) {
45 return moment<2>(first, last);
60 template <
typename ForwardIt>
62 return std::sqrt(
variance(first, last));
67 #endif // EDSP_STATISTICAL_VARIANCE_H
constexpr meta::value_type_t< ForwardIt > variance(ForwardIt first, ForwardIt last)
Computes the variance of the range [first, last)
Definition: variance.hpp:44
meta::value_type_t< ForwardIt > standard_deviation(ForwardIt first, ForwardIt last)
Computes the standard deviation of the range [first, last)
Definition: variance.hpp:61
Definition: amplifier.hpp:29