Sample the deltas between values using boost::accumulators
- by Checkers
I have a data set with N integers (say, 13, 16, 17, 20) where each next sample is incremented by some value (3, 1, 3 in this case) and I want to use boost::accumulators::accumulator_set to find various statistics of the second sequence.
I want to be able to do something like this:
accumulator_set< double, features< tag::mean > > acc;
...
acc(13);
acc(16);
acc(17);
acc(20);
...BUT sampling the differences instead of the actual values.
How can I do that with accumulator_set without keeping track of the last value manually?