If I have:
typedef accumulator_set
On 2/14/2010 9:13 AM, Neal Becker wrote:
If I have:
typedef accumulator_set
tag::mean > accum_t; Is there a way to get the count of the number of samples?
You need to add a dependency on the count feature:
accumulator_set
Eric Niebler wrote:
On 2/14/2010 9:13 AM, Neal Becker wrote:
If I have:
typedef accumulator_set
tag::mean > accum_t; Is there a way to get the count of the number of samples?
You need to add a dependency on the count feature:
accumulator_set
> Now you can get the count of samples using the count extractor.
HTH,
Thanks, but before I saw this response, I already tried simply doing count(accum), without adding the count tag, since it seemed to be part of the examples shown here: http://www.boost.org/doc /libs/1_37_0/doc/html/accumulators/user_s_guide.html# accumulators.user_s_guide.the_statistical_accumulators_library.mean and it seems to work (compiles, at least).
On 2/15/2010 1:14 PM, Neal Becker wrote:
Eric Niebler wrote:
On 2/14/2010 9:13 AM, Neal Becker wrote:
If I have:
typedef accumulator_set
tag::mean > accum_t; Is there a way to get the count of the number of samples?
You need to add a dependency on the count feature:
accumulator_set
> Now you can get the count of samples using the count extractor.
Thanks, but before I saw this response, I already tried simply doing count(accum), without adding the count tag, since it seemed to be part of the examples shown here: http://www.boost.org/doc /libs/1_37_0/doc/html/accumulators/user_s_guide.html# accumulators.user_s_guide.the_statistical_accumulators_library.mean
and it seems to work (compiles, at least).
The mean accumulator depends on the count accumulator, so yes, this works. But it's better to state up-front which features you plan to extract later, as only those extractors are guaranteed to work. -- Eric Niebler BoostPro Computing http://www.boostpro.com
participants (2)
-
Eric Niebler
-
Neal Becker