Boost logo

Boost :

Subject: [boost] [histogram] Variance
From: Bjorn Reese (breese_at_[hidden])
Date: 2018-09-17 20:08:45


The variance of individual bins can be obtained when using the
adaptive_storage (via h.at(i).variance().)

I am trying to understand the overhead of this feature.

If I interpret the code correctly, there is a space overhead because
each counter has to keep track of both the count and the sum of squares.
The computational overhead is that the sum of squares has to be
calculated for each insertion. Is this correct?

If so, is there any way to use the adaptive storage policy without
variance?

Furthermore, why does variance() return the sum of squares? Should this
not be divided by the sample size?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk