Boost logo

Boost Users :

Subject: Re: [Boost-users] [accumulator] compiler error with quantil
From: Philipp Kraus (philipp.kraus_at_[hidden])
Date: 2013-06-13 06:56:33


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>
#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:

/Developer/opt/Boost/1.53.0/include/boost/accumulators/framework/depends_on.hpp:
In instantiation of
'boost::accumulators::detail::insert_dependencies<boost::mpl::m_item<boost::accumulators::tag::extended_p_square_quantile,
boost::accumulators::tag::extended_p_square_quantile,
boost::mpl::m_item<boost::accumulators::tag::mean,
boost::accumulators::tag::mean,
boost::mpl::m_item<boost::accumulators::tag::sum,
boost::accumulators::tag::sum,
boost::mpl::m_item<boost::accumulators::tag::count,
boost::accumulators::tag::count, boost::mpl::map0<mpl_::na> > > > >,
boost::accumulators::tag::extended_p_square_quantile, void>':

/Developer/opt/Boost/1.53.0/include/boost/mpl/aux_/has_type.hpp:20:
instantiated from 'const bool
boost::mpl::aux::has_type<boost::accumulators::detail::insert_dependencies<boost::mpl::m_item<boost::accumulators::tag::extended_p_square_quantile,
boost::accumulators::tag::extended_p_square_quantile,
boost::mpl::m_item<boost::accumulators::tag::mean,
boost::accumulators::tag::mean,
boost::mpl::m_item<boost::accumulators::tag::sum,
boost::accumulators::tag::sum,
boost::mpl::m_item<boost::accumulators::tag::count,
boost::accumulators::tag::count, boost::mpl::map0<mpl_::na> > > > >,
boost::accumulators::tag::extended_p_square_quantile, void>,
mpl_::bool_<true> >::value'

/Developer/opt/Boost/1.53.0/include/boost/mpl/aux_/has_type.hpp:20:
instantiated from
'boost::mpl::aux::has_type<boost::accumulators::detail::insert_dependencies<boost::mpl::m_item<boost::accumulators::tag::extended_p_square_quantile,
boost::accumulators::tag::extended_p_square_quantile,
boost::mpl::m_item<boost::accumulators::tag::mean,
boost::accumulators::tag::mean,
boost::mpl::m_item<boost::accumulators::tag::sum,
boost::accumulators::tag::sum,
boost::mpl::m_item<boost::accumulators::tag::count,
boost::accumulators::tag::count, boost::mpl::map0<mpl_::na> > > > >,
boost::accumulators::tag::extended_p_square_quantile, void>,
mpl_::bool_<true> >'

.....

Can anybody help me?

Thanks

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