Opened 7 years ago
Last modified 7 years ago
#11441 new Bugs
Documentation sample error
Reported by: | Owned by: | Eric Niebler | |
---|---|---|---|
Milestone: | To Be Determined | Component: | accumulator |
Version: | Boost 1.58.0 | Severity: | Not Applicable |
Keywords: | Cc: |
Description
User'd guide.
Accumulators sample program:
#include <iostream> #include <boost/accumulators/accumulators.hpp> #include <boost/accumulators/statistics/stats.hpp> #include <boost/accumulators/statistics/mean.hpp> #include <boost/accumulators/statistics/moment.hpp> using namespace boost::accumulators;
int main() {
Define an accumulator set for calculating the mean and the 2nd moment ... accumulator_set<double, stats<tag::mean, tag::moment<2> > > acc;
push in some data ... acc(1.2); acc(2.3); acc(3.4); acc(4.5);
Display the results ... std::cout << "Mean: " << mean(acc) << std::endl; std::cout << "Moment: " << accumulators::moment<2>(acc) << std::endl;
return 0;
}
In a line "std::cout << "Moment: " << accumulators::moment<2>(acc) << std::endl;" name of namespace "accumulators" should be removed because namespace "accumulators" is already used.
Change History (1)
comment:1 by , 7 years ago
Component: | Documentation → accumulator |
---|---|
Owner: | changed from | to