|
Boost Users : |
Subject: Re: [Boost-users] [accumulators] help/advise required: Need a container to hold accumulator_set
From: Eric Niebler (eric_at_[hidden])
Date: 2009-02-22 00:55:30
dhruva wrote:
> Hello, I am writing a wrapper class which gets data over time and has
> to compute a variety of statistics using boost::accumulators. The
> accumulator cannot be a variable on the stack (function local
> variable) as it will go out of scope after the function invocation. I
> will have to make it a member variable of a class. I will not know
> the type of calculations to requested at compile time. I therefore
> need a generic accumulator type as member and add the specific type
> at runtime.
<snip>
It doesn't sound like Boost.Accumulators is a good fit for your problem.
Accumulators uses static type information to resolve computational
dependencies and order calculations. As you don't know what you will be
computing until runtime, you can't provide Accumulators with the static
type information it requires.
-- Eric Niebler BoostPro Computing http://www.boostpro.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