Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::accumulators::impl::weighted_extended_p_square_impl< Sample, Weight > Struct Template Reference

Multiple quantile estimation with the extended $P^2$ algorithm for weighted samples. More...

#include <statistics_fwd.hpp>

Inheritance diagram for boost::accumulators::impl::weighted_extended_p_square_impl< Sample, Weight >:
Collaboration diagram for boost::accumulators::impl::weighted_extended_p_square_impl< Sample, Weight >:

Public Types

typedef
numeric::functional::multiplies
< Sample, Weight >
::result_type 
weighted_sample
 
typedef
numeric::functional::fdiv
< weighted_sample, std::size_t >
::result_type 
float_type
 
typedef std::vector< float_typearray_type
 
typedef iterator_range
< detail::lvalue_index_iterator
< permutation_iterator
< typename
array_type::const_iterator,
detail::times2_iterator > > > 
result_type
 
typedef mpl::false_ is_droppable
 

Public Member Functions

template<typename Args >
 weighted_extended_p_square_impl (Args const &args)
 
template<typename Args >
void operator() (Args const &args)
 
result_type result (dont_care) const
 
detail::void_ operator() (dont_care)
 
detail::void_ add_ref (dont_care)
 
detail::void_ drop (dont_care)
 
detail::void_ on_drop (dont_care)
 

Detailed Description

template<typename Sample, typename Weight>
struct boost::accumulators::impl::weighted_extended_p_square_impl< Sample, Weight >

Multiple quantile estimation with the extended $P^2$ algorithm for weighted samples.

This version of the extended $P^2$ algorithm extends the extended $P^2$ algorithm to support weighted samples. The extended $P^2$ algorithm dynamically estimates several quantiles without storing samples. Assume that $m$ quantiles $\xi_{p_1}, \ldots, \xi_{p_m}$ are to be estimated. Instead of storing the whole sample cumulative distribution, the algorithm maintains only $m+2$ principal markers and $m+1$ middle markers, whose positions are updated with each sample and whose heights are adjusted (if necessary) using a piecewise-parablic formula. The heights of the principal markers are the current estimates of the quantiles and are returned as an iterator range.

For further details, see

K. E. E. Raatikainen, Simultaneous estimation of several quantiles, Simulation, Volume 49, Number 4 (October), 1986, p. 159-164.

The extended $ P^2 $ algorithm generalizes the $ P^2 $ algorithm of

R. Jain and I. Chlamtac, The P^2 algorithm for dynamic calculation of quantiles and histograms without storing observations, Communications of the ACM, Volume 28 (October), Number 10, 1985, p. 1076-1085.

Parameters
extended_p_square_probabilitiesA vector of quantile probabilities.

Member Typedef Documentation

template<typename Sample , typename Weight >
typedef std::vector<float_type> boost::accumulators::impl::weighted_extended_p_square_impl< Sample, Weight >::array_type
template<typename Sample , typename Weight >
typedef numeric::functional::fdiv<weighted_sample, std::size_t>::result_type boost::accumulators::impl::weighted_extended_p_square_impl< Sample, Weight >::float_type
template<typename Sample , typename Weight >
typedef iterator_range< detail::lvalue_index_iterator< permutation_iterator< typename array_type::const_iterator , detail::times2_iterator > > > boost::accumulators::impl::weighted_extended_p_square_impl< Sample, Weight >::result_type
template<typename Sample , typename Weight >
typedef numeric::functional::multiplies<Sample, Weight>::result_type boost::accumulators::impl::weighted_extended_p_square_impl< Sample, Weight >::weighted_sample

Constructor & Destructor Documentation

template<typename Sample , typename Weight >
template<typename Args >
boost::accumulators::impl::weighted_extended_p_square_impl< Sample, Weight >::weighted_extended_p_square_impl ( Args const &  args)
inline

Member Function Documentation

detail::void_ boost::accumulators::accumulator_base::add_ref ( dont_care  )
inlineinherited
detail::void_ boost::accumulators::accumulator_base::drop ( dont_care  )
inlineinherited
detail::void_ boost::accumulators::accumulator_base::on_drop ( dont_care  )
inlineinherited
detail::void_ boost::accumulators::accumulator_base::operator() ( dont_care  )
inlineinherited

The documentation for this struct was generated from the following file: