...one of the most highly
regarded and expertly designed C++ library projects in the
world.

— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards

boost::accumulators::impl::p_square_cumulative_distribution_impl — Histogram calculation of the cumulative distribution with the algorithm.

// In header: <boost/accumulators/statistics_fwd.hpp> template<typename Sample> struct p_square_cumulative_distribution_impl : public accumulator_base { // construct/copy/destruct template<typename Args> p_square_cumulative_distribution_impl(Args const &); // public member functions template<typename Args> void operator()(Args const &); template<typename Args> result_type result(Args const &) const; };

A histogram of the sample cumulative distribution is computed dynamically without storing samples based on the algorithm. The returned histogram has a specifiable amount (num_cells) equiprobable (and not equal-sized) cells.

For further details, see

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.