【Boost】Accumulators

1.Count

The count feature is a simple counter that tracks the number of samples pushed into the accumulator set

#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics/count.hpp>
using namespace boost::accumulators;

int main(int argc, char *argv[])
{
    accumulator_set <int, features <tag::count>> acc;

    acc(0);
    acc(1);
    acc(2);

    assert(count(acc) == 3);
    return 0;
}

 2.Covariance

The covariance feature is an iterative Monte Carlo estimator for the covariance.

 3.Density

The tag::density feature returns a histogram of the sample distribution

4.Error_of

The error_of <mean> feature calculates the error of the mean feature

5.Extended_p_square

Multiple quantile estimation with the extended P^2 algorithm

 

posted on 2014-03-29 02:23  至死丶不渝  阅读(555)  评论(0编辑  收藏  举报

导航