![]() |
Home | Libraries | People | FAQ | More |
boost::histogram::algorithm::reduce — Shrink, crop, slice, and/or rebin axes of a histogram.
// In header: <boost/histogram/algorithm/reduce.hpp> template<typename Histogram, typename Iterable> Histogram reduce(const Histogram & hist, const Iterable & options);
Returns a new reduced histogram and leaves the original histogram untouched.
The commands rebin andshrink orslice for the same axis are automatically combined, this is not an error. Passing ashrink and aslice command for the same axis or tworebin commands triggers aninvalid_argument exception. Trying to reducing a non-reducible axis triggers aninvalid_argument exception. Histograms with non-reducible axes can still be reduced along the other axes that are reducible.
An overload allows one to pass reduce_command as positional arguments.
Parameters: |
|