|
Boost Users : |
Subject: [Boost-users] [accumulators] Any was to reset an accumulator_set object?
From: dhruva (dhruva_at_[hidden])
Date: 2009-02-23 22:14:38
Hello,
I am using boost::accumulator_set to compute mean. After every 100 samples, I need to start afresh. Since I am using accumulator_set as a member variable in a class (I get samples one at a time and need to preserve accumulator_set object across function calls), I need some mechanism to reset it to its initial state. I am not doing anything fancy like using droppable functionality. As a real crude work around, I am keeping 2 objects. The first is not used for any computing and hence its state is same throughout. The computing is done using the second object. After 100 samples, I just copy the first onto the second hoping the state of second object will be same as first which is the initial state.
Is there a better way to achieve the above requirement?
-dhruva
Download prohibited? No problem. CHAT from any browser, without download. Go to http://in.webmessenger.yahoo.com/
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net