我很好奇,从此代码段中获得的平均值是多少?累加器意图是空的。使用空Boost累加器
boost::accumulators::accumulator_set<
int,
boost::accumulators::features<boost::accumulators::tag::mean>
> Accumulator;
int Mean = boost::accumulators::mean(Accumulator);
当我测试它时,平均值不为零。有没有什么方法可以说明平均值是用于空数据集?为什么“Mean”的结果值非零?
我四处寻找累加器库的文档,但无法找到这个问题的答案。
任何价值将是一个有效的均值为空值的集合,不是吗? –