Skip to content
Snippets Groups Projects
Commit f50b1d32 authored by René Fritze's avatar René Fritze
Browse files

[common] also count elementes entered into minmaxavg

parent 0a78a8a2
No related branches found
No related tags found
No related merge requests found
......@@ -188,6 +188,10 @@ public:
acc_ = std::for_each(elements.begin(), elements.end(), acc_);
}
std::size_t count() const
{
return boost::accumulators::count(acc_);
}
ElementType sum() const
{
return boost::accumulators::sum(acc_);
......@@ -218,7 +222,8 @@ public:
protected:
typedef boost::accumulators::stats<boost::accumulators::tag::max, boost::accumulators::tag::min,
boost::accumulators::tag::mean, boost::accumulators::tag::sum> StatsType;
boost::accumulators::tag::mean, boost::accumulators::tag::count,
boost::accumulators::tag::sum> StatsType;
boost::accumulators::accumulator_set<ElementType, StatsType> acc_;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment