Sample the deltas between values using boost::accumulators
Posted
by Checkers
on Stack Overflow
See other posts from Stack Overflow
or by Checkers
Published on 2010-03-30T22:18:53Z
Indexed on
2010/03/30
22:23 UTC
Read the original article
Hit count: 340
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?
© Stack Overflow or respective owner