Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Function template reduce

boost::histogram::algorithm::reduce — Shrink, slice, and/or rebin axes of a histogram.

Synopsis

// In header: <boost/histogram/algorithm/reduce.hpp>


template<typename Histogram, class... Ts> 
  decltype(auto) 
  reduce(const Histogram & hist, const reduce_option & opt, 
         const Ts &... opts);

Description

Returns the reduced copy of the histogram.

Shrinking only works with axes that accept double values. Some axis types do not support the reduce operation, for example, the builtin category axis, which is not ordered. Custom axis types must implement a special constructor (see concepts) to be reducible.

Parameters:

hist

original histogram.

opt

reduce option generated by shrink_and_rebin(), shrink(), and rebin().

opts

more reduce options.


PrevUpHomeNext