Auxiliary Arithmetic Algorithms
statistics.hpp
1 #pragma once
2 
3 #include "misc_algorithms.hpp"
4 #include "traits.hpp"
5 
9 template<typename Container>
10 sqrt_value_type<Container> mean(const Container& a)
11 {
12  return static_cast<sqrt_value_type<Container>>(sum(a) / static_cast<double>);
13 }
T sum(InputIterator first, InputIterator last, T init=T{})
Definition: misc_algorithms.hpp:44