|
Boost Users : |
Subject: [Boost-users] [accumulators] Is there a reset function yet?
From: Tim Odenthal (Tim.Odenthal_at_[hidden])
Date: 2010-05-21 11:18:53
Hi!
I just discovered this nice functionality in boost, but while trying something
as simple as calculating a mean from a set of numbers, I hit a strange
drawback:
It seems to be impossible to use the same accumulator again for a different
set of numbers, because I cannot clear/ reset it. I found some old (ok, March
2009) discussions about this, but nothing in the documentation.
By the way, does the accumulator do something to prevent an overflow when I
add up everything into one variable? And does it prevent a loss of precision,
when at a late stage the variable I sum everything into is very big, but the
thing I add is very small?
Maybe it would be a good idea to mention this in the documentation, as well...
Many thanks in advance for any help
Tim
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