Boost logo

Boost Users :

Subject: Re: [Boost-users] [accumulator] compiler error with quantil
From: Eric Niebler (eniebler_at_[hidden])
Date: 2013-06-13 19:02:35


On 6/13/2013 3:56 AM, Philipp Kraus wrote:
> On 2013-06-11 15:09:40 +0200, Philipp Kraus said:
>
>> I try to create a complex accumulator. I would like to use an
>> accumulator for a box plot with the whisker data (
>> http://en.wikipedia.org/wiki/Box_plot ).
>
> This short example
>
> #include <boost/accumulators/accumulators.hpp>
> #include <boost/accumulators/statistics/sum.hpp>
> #include <boost/accumulators/statistics/min.hpp>
> #include <boost/accumulators/statistics/max.hpp>
> #include <boost/accumulators/statistics/mean.hpp>
> #include <boost/accumulators/statistics/stats.hpp>
> #include <boost/accumulators/statistics/count.hpp>
> #include <boost/accumulators/statistics/median.hpp>
> #include <boost/accumulators/statistics/variance.hpp>
> #include <boost/accumulators/statistics/extended_p_square.hpp>

whoops, should be:

#include <boost/accumulators/statistics/extended_p_square_quantile.hpp>

> #include <boost/array.hpp>
>
> using namespace boost::accumulators;
>
> typedef accumulator_set<double, stats<
> tag::count,
> tag::sum,
> tag::mean,
> tag::extended_p_square_quantile //*
>> > accumulator_t;
>
>
> int main()
> {
> boost::array<double,3> probs = {0.25, 0.50, 0.75};
> accumulator_t acc(extended_p_square_probabilities = probs);
> }
>
> compiles only, if I comment the //* line, but with the quantil tag the
> compiler creates this errors:

<snip>

The errors went away for me when I included the correct header. You
might check the docs for the statistics you're using. The docs aren't
great, but they at least tell you what headers to include.

http://www.boost.org/doc/libs/1_53_0/doc/html/accumulators/user_s_guide.html#accumulators.user_s_guide.the_statistical_accumulators_library.extended_p_square_quantile

-- 
Eric Niebler
Boost.org
http://www.boost.org

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net