如何重置使用参数创建的累加器?换句话说,我想清除添加到累加器中的所有值。这是使用参数创建的累加器的示例,
// https://www.boost.org/doc/libs/1_55_0/doc/html/accumulators/user_s_guide.html#accumulators.user_s_guide.the_statistical_accumulators_library.extended_p_square
using namespace boost::accumulators;
boost::array<double> probs = {0.001,0.01,0.1,0.25,0.5,0.75,0.9,0.99,0.999};
accumulator_set<double, stats<tag::extended_p_square> >
acc(tag::extended_p_square::probabilities = probs); // <--- this const parameter
还有另一个问题/答案与此类似,acc = {}
但仅适用于未使用参数创建的累加器。
重置升压累加器 C++