X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FUtils%2FStatisticAccumulator.hh;h=8bd2b32aa40054b6e117934f4dd3fbc5db2f9f97;hb=be253d22a60afc49fa9265fcff4728742e9f9a2d;hp=388ef99c9ce4f1003cee9427c69829413cf116e7;hpb=bd52d6b1c3b258c030c7302f5e926aeb5b5b0715;p=senf.git diff --git a/senf/Utils/StatisticAccumulator.hh b/senf/Utils/StatisticAccumulator.hh index 388ef99..8bd2b32 100644 --- a/senf/Utils/StatisticAccumulator.hh +++ b/senf/Utils/StatisticAccumulator.hh @@ -46,6 +46,14 @@ namespace senf { \ingroup senf_statistics */ + struct StatisticsData{ + float min; + float max; + float avg; + float stddev; + boost::uint32_t count; + }; + template class StatisticAccumulator { @@ -80,6 +88,9 @@ namespace senf { boost::uint32_t count() const; ///< Returns count of accumulated values. /**< This method returns count of accumulated values of the current accumulation.*/ + void data( StatisticsData & data_) const; + ///< Returns the accumulated data as a tuple + /**< This method returns the accumulated information as a tuple.*/ private: T sum_squared_; @@ -96,7 +107,6 @@ namespace senf { typedef StatisticAccumulator StatisticAccumulatorInt; typedef StatisticAccumulator StatisticAccumulatorFloat; - } ///////////////////////////////hh.e//////////////////////////////////////// //#include "StatisticAccumulator.cci"