num::weighted_sum¶ Defined in header <stats/probability.hpp> template <typename Projection> real weighted_sum(view<const real> weights, Projection &&value); Compute a weighted sum: \(\sum_i w_i\, g(i)\).