How can I reset an accumulator that was created using parameters? In other words, I want to clear out any and all values that were added to the accumulator. Here is an example of an accumulator that is created using a parameter,
// 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
There is another question/answer that similar to this one that works using acc = {} but only for accumulators that aren't created with parameters.
reset boost accumulator c++
one of the options would be to create wrapper class capturing and reusing accumulator params later when resetting accumulators, that's how I did it