| Home | Libraries | People | FAQ | More

## Function shrink

boost::histogram::algorithm::shrink — Shrink command to be used in `reduce`.

## Synopsis

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

    reduce_command shrink(double lower, double upper);

## Description

Command is applied to corresponding axis in order of reduce arguments.

Shrinking is based on an inclusive value interval. The bin which contains the first value starts the range of bins to keep. The bin which contains the second value is the last included in that range. When the second value is exactly equal to a lower bin edge, then the previous bin is the last in the range.

The counts in removed bins are added to the corresponding underflow and overflow bins, if they are present. If they are not present, the counts are discarded. Also see `crop`, which always discards the counts.

Parameters: |
`lower` | bin which contains lower is first to be kept.
`upper` | bin which contains upper is last to be kept, except if upper is equal to the lower edge.