
Thanks Paul, I'll check it out. Arman helped me get to a working demo (below) but I am still a bit confused. 1) What is the "cache"/"cache size"? 2) Does this line: double tqueryP = quantile(acc0, quantile_probability = 0.50 ); tell you the percentage of the input values that fall in the top 50% of all input values? Here is the code: std::vector<double> data(100); std::generate(data.begin(), data.end(), data_filler<double>()); int c = data.size();//cache size for histogramm. //create a accumulator. accumulator_t_right acc0( boost::accumulators::tag::tail<right>::cache_size = c ); //fill accumulator for (int j = 0; j < c; ++j) { acc0(data[j]); } //ask some questions... double tqueryP = quantile(acc0, quantile_probability = 0.50 ); std::cout << tqueryP << std::endl; Also, with this code: 1) again, what is the cache_size? 2) Is there a way to get a list of the values that are in each bin? Or only the percentage of the input values that fall in the bin? //create some random data std::vector<double> data(100); std::generate(data.begin(), data.end(), data_filler<double>()); int c = data.size();//cache size for histogramm. //create a accumulator. acc myAccumulator( tag::density::num_bins = 20, tag::density::cache_size = 10); //fill accumulator for (int j = 0; j < c; ++j) { myAccumulator(data[j]); } //ask some questions... //double query = density(myAccumulator); histogram_type hist = density(myAccumulator); double total = 0.0; for( int i = 0; i < hist.size(); i++ ) { std::cout << "Bin lower bound: " << hist[i].first << ", Value: " << hist[i].second << std::endl; total += hist[i].second; } std::cout << "Total: " << total << std::endl; //should be 1 (and it is) Thanks! David