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_density_impl< Sample, Weight > Struct Template Reference

Histogram density estimator for weighted samples. More...

#include <statistics_fwd.hpp>

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

Public Types

typedef
numeric::functional::fdiv
< Weight, std::size_t >
::result_type 
float_type
 
typedef std::vector< std::pair
< float_type, float_type > > 
histogram_type
 
typedef std::vector< float_typearray_type
 
typedef iterator_range
< typename
histogram_type::iterator > 
result_type
 
typedef mpl::false_ is_droppable
 

Public Member Functions

template<typename Args >
 weighted_density_impl (Args const &args)
 
template<typename Args >
void operator() (Args const &args)
 
template<typename Args >
result_type result (Args const &args) 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_density_impl< Sample, Weight >

Histogram density estimator for weighted samples.

The histogram density estimator returns a histogram of the sample distribution. The positions and sizes of the bins are determined using a specifiable number of cached samples (cache_size). The range between the minimum and the maximum of the cached samples is subdivided into a specifiable number of bins (num_bins) of same size. Additionally, an under- and an overflow bin is added to capture future under- and overflow samples. Once the bins are determined, the cached samples and all subsequent samples are added to the correct bins. At the end, a range of std::pair is returned, where each pair contains the position of the bin (lower bound) and the sum of the weights (normalized with the sum of all weights).

Parameters
density_cache_sizeNumber of first samples used to determine min and max.
density_num_binsNumber of bins (two additional bins collect under- and overflow samples).

Member Typedef Documentation

template<typename Sample , typename Weight >
typedef std::vector<float_type> boost::accumulators::impl::weighted_density_impl< Sample, Weight >::array_type
template<typename Sample , typename Weight >
typedef numeric::functional::fdiv<Weight, std::size_t>::result_type boost::accumulators::impl::weighted_density_impl< Sample, Weight >::float_type
template<typename Sample , typename Weight >
typedef std::vector<std::pair<float_type, float_type> > boost::accumulators::impl::weighted_density_impl< Sample, Weight >::histogram_type
template<typename Sample , typename Weight >
typedef iterator_range<typename histogram_type::iterator> boost::accumulators::impl::weighted_density_impl< Sample, Weight >::result_type

Constructor & Destructor Documentation

template<typename Sample , typename Weight >
template<typename Args >
boost::accumulators::impl::weighted_density_impl< Sample, Weight >::weighted_density_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
template<typename Sample , typename Weight >
template<typename Args >
result_type boost::accumulators::impl::weighted_density_impl< Sample, Weight >::result ( Args const &  args) const
inline

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