Function wvector_mean (o2scl)¶
-
template<class vec_t, class vec2_t>
double o2scl::wvector_mean(size_t n, const vec_t &data, const vec2_t &weights)¶ Compute the mean of weighted data.
This function computes
\[ \left( \sum_i w_i x_i \right) \left( \sum_i w_i \right)^{-1} \]This function produces the same results as
gsl_stats_wmean()
.