1 #ifndef CommonTools_Statistics_median_h
2 #define CommonTools_Statistics_median_h
17 switch (values.size()) {
23 return (values[0] + values[1]) / 2.;
26 const int size = values.size();
27 const int half = (int)
ceil(size / 2.);
28 partial_sort(values.begin(), values.begin() + half + 1, values.end());
30 ret = values[half - 1];
32 ret = (values[half - 1] + values[half]) / 2.;
constexpr int32_t ceil(float num)
tuple ret
prodAgent to be discontinued
tuple size
Write out results.