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; }
【Boost】Accumulators,布布扣,bubuko.com
原文:http://www.cnblogs.com/Cxx-Code/p/3632062.html