Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct template density_impl

boost::accumulators::impl::density_impl — Histogram density estimator.

Synopsis

// In header: <boost/accumulators/statistics/density.hpp>

template<typename Sample> 
struct density_impl : public  {
  // types
  typedef  ;    
  typedef             ;
  typedef                                      ;    
  typedef            ;   

  // construct/copy/destruct
  template<typename Args> ();

  // public member functions
  template<typename Args>  ();
  template<typename Args>  () ;
  template<typename Archive>  (, );
};

Description

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 return, where each pair contains the position of the bin (lower bound) and the samples count (normalized with the total number of samples).

density_impl public construct/copy/destruct

  1. template<typename Args> ( args);

density_impl public member functions

  1. template<typename Args>  ( args);
  2. template<typename Args>  ( args) ;

    Requires:

    The number of samples must meet or exceed the cache size

  3. template<typename Archive> 
       ( ar,  file_version);

PrevUpHomeNext