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

[common] adds sum to MinMaxAvg

parent 821a0630
No related branches found
No related tags found
No related merge requests found
...@@ -162,6 +162,10 @@ public: ...@@ -162,6 +162,10 @@ public:
acc_ = std::for_each(elements.begin(), elements.end(), acc_); acc_ = std::for_each(elements.begin(), elements.end(), acc_);
} }
ElementType sum() const
{
return boost::accumulators::sum(acc_);
}
ElementType min() const ElementType min() const
{ {
return boost::accumulators::min(acc_); return boost::accumulators::min(acc_);
...@@ -188,7 +192,7 @@ public: ...@@ -188,7 +192,7 @@ public:
protected: protected:
typedef boost::accumulators::stats<boost::accumulators::tag::max, boost::accumulators::tag::min, typedef boost::accumulators::stats<boost::accumulators::tag::max, boost::accumulators::tag::min,
boost::accumulators::tag::mean> StatsType; boost::accumulators::tag::mean, boost::accumulators::tag::sum> StatsType;
boost::accumulators::accumulator_set<ElementType, StatsType> acc_; 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