|
Boost Users : |
Subject: [Boost-users] [accumulator] compiler error with quantil
From: Philipp Kraus (philipp.kraus_at_[hidden])
Date: 2013-06-11 09:09:40
Hello,
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 ).
My typedef shows at the momen like this:
typedef boost::accumulators::accumulator_set<double, boost::accumulators::stats<
boost::accumulators::tag::count,
boost::accumulators::tag::sum,
//boost::accumulators::tag::median,
boost::accumulators::tag::mean,
boost::accumulators::tag::variance,
boost::accumulators::tag::min,
boost::accumulators::tag::max,
boost::accumulators::tag::extended_p_square
> > Accumulator;
I would like to create the 25% & 75% quantil and replace the median with the 50% quantil, so I have defined the ctor
accumulator call like this:
boost::array<double, 3> probs = {0.25, 0.5, 0.75};
m_times[p_name] = Accumulator( boost::accumulators::extended_p_square_probabilities = probs );
(the median is disabled and m_times is a std::map<std::string, Accumulator>).
At this point I get a compiler errors:
/Developer/opt/Boost/1.53.0/include/boost/accumulators/statistics/extended_p_square.hpp: In constructor 'boost::accumulators::impl::extended_p_square_impl<Sample>::extended_p_square_impl(const Args&) [with Args = boost::parameter::aux::arg_list<boost::parameter::aux::tagged_argument<boost::accumulators::tag::accumulator, boost::accumulators::accumulator_set<double, boost::accumulators::stats<boost::accumulators::tag::count, boost::accumulators::tag::sum, boost::accumulators::tag::mean, boost::accumulators::tag::variance, boost::accumulators::tag::min, boost::accumulators::tag::max, boost::accumulators::tag::extended_p_square, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, void> >, boost::parameter::aux::empty_arg_list>, Sample = double]':
/Developer/opt/Boost/1.53.0/include/boost/accumulators/framework/depends_on.hpp:319: instantiated from 'boost::accumulators::detail::accumulator_wrapper<Accumulator, Feature>::accumulator_wrapper(const Args&) [with Args = boost::parameter::aux::arg_list<boost::parameter::aux::tagged_argument<boost::accumulators::tag::accumulator, boost::accumulators::accumulator_set<double, boost::accumulators::stats<boost::accumulators::tag::count, boost::accumulators::tag::sum, boost::accumulators::tag::mean, boost::accumulators::tag::variance, boost::accumulators::tag::min, boost::accumulators::tag::max, boost::accumulators::tag::extended_p_square, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, void> >, boost::parameter::aux::empty_arg_list>, Accumulator = boost::accumulators::impl::extended_p_square_impl<double>, Feature = boost::accumulators::tag::extended_p_square]'
....
I need one accumulator for all the data. I'm using Boost 1.53. How can I create working code? Thanks for help
Phil
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