35 #ifndef SHARK_ALGORITHMS_TRAINERS_DISTRIBUTION_NORMAL_H 36 #define SHARK_ALGORITHMS_TRAINERS_DISTRIBUTION_NORMAL_H 41 #include <boost/accumulators/framework/accumulator_set.hpp> 42 #include <boost/accumulators/statistics/count.hpp> 43 #include <boost/accumulators/statistics/stats.hpp> 44 #include <boost/accumulators/statistics/variance.hpp> 45 #include <boost/bind/bind.hpp> 46 #include <boost/bind/placeholders.hpp> 47 #include <boost/range/algorithm/for_each.hpp> 70 template <
typename RngType>
74 namespace bae = boost::accumulators::extract;
75 InternalAccumulatorType accu;
76 #if (BOOST_VERSION < 106000) 77 boost::range::for_each(input, boost::bind(boost::ref(accu), _1));
79 boost::range::for_each(input, boost::bind(boost::ref(accu), boost::placeholders::_1));
86 ?
bae::variance(accu) * bae::count(accu) / (bae::count(accu) - 1)
96 typedef boost::accumulators::accumulator_set<
98 boost::accumulators::stats<
99 boost::accumulators::tag::count,
105 #endif // SHARK_ALGORITHMS_TRAINERS_DISTRIBUTION_NORMAL_H