#include #include #include #include #include #include #include #include #include #include #include class Test { public: void add(double value, double weight = 1.0) { acc_(value, boost::accumulators::weight=weight); } private: typedef boost::accumulators::accumulator_set< double, boost::accumulators::stats< boost::accumulators::tag::count, boost::accumulators::tag::min, boost::accumulators::tag::max, boost::accumulators::tag::weighted_mean, boost::accumulators::tag::weighted_variance, boost::accumulators::tag::weighted_skewness, boost::accumulators::tag::weighted_kurtosis, boost::accumulators::tag::sum_of_weights>, double> accumulator_set; accumulator_set acc_; };