Functions wvector_mean¶
-
template<class
vec_t
, classvec2_t
>
doubleo2scl
::
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()
.