summaryrefslogtreecommitdiff
path: root/boost/accumulators/statistics/mean.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/accumulators/statistics/mean.hpp')
-rw-r--r--boost/accumulators/statistics/mean.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/boost/accumulators/statistics/mean.hpp b/boost/accumulators/statistics/mean.hpp
index 0b3ba5e7cd..4788837184 100644
--- a/boost/accumulators/statistics/mean.hpp
+++ b/boost/accumulators/statistics/mean.hpp
@@ -31,7 +31,7 @@ namespace impl
: accumulator_base
{
// for boost::result_of
- typedef typename numeric::functional::average<Sample, std::size_t>::result_type result_type;
+ typedef typename numeric::functional::fdiv<Sample, std::size_t>::result_type result_type;
mean_impl(dont_care) {}
@@ -39,7 +39,7 @@ namespace impl
result_type result(Args const &args) const
{
extractor<SumFeature> sum;
- return numeric::average(sum(args), count(args));
+ return numeric::fdiv(sum(args), count(args));
}
};
@@ -48,11 +48,11 @@ namespace impl
: accumulator_base
{
// for boost::result_of
- typedef typename numeric::functional::average<Sample, std::size_t>::result_type result_type;
+ typedef typename numeric::functional::fdiv<Sample, std::size_t>::result_type result_type;
template<typename Args>
immediate_mean_impl(Args const &args)
- : mean(numeric::average(args[sample | Sample()], numeric::one<std::size_t>::value))
+ : mean(numeric::fdiv(args[sample | Sample()], numeric::one<std::size_t>::value))
{
}
@@ -60,7 +60,7 @@ namespace impl
void operator ()(Args const &args)
{
std::size_t cnt = count(args);
- this->mean = numeric::average(
+ this->mean = numeric::fdiv(
(this->mean * (cnt - 1)) + args[parameter::keyword<Tag>::get()]
, cnt
);