Simple utility for human-friendly binning. More...
#include <initializer_list>
#include <utility>
Go to the source code of this file.
Classes | |
class | icarus::ns::util::BinningSpecs |
Data structure holding binning information. More... | |
Namespaces | |
icarus::ns::util | |
Algorithms for binning. | |
The A few functions are provided that create a binning with "human-friendly" characteristics for pleasant plots: given a selection of bin width hints, the functions try to create a binning accommodating those hints. These functions always require the full range of the binning to be specified, and can take either a desired number of bins, or their width. | |
constexpr std::initializer_list< double > | icarus::ns::util::DefaultBinningHints { 1.0, 0.8, 2.0, 0.5, 4.0, 5.0, 10.0, 20.0 } |
Set of bin sizes to be considered by the binning algorithms. More... | |
constexpr double | icarus::ns::util::DefaultAllowedBinningStretch { 0.5 } |
Stretch factor on the requested binning range an algorithm is allowed. More... | |
BinningSpecs | icarus::ns::util::makeBinningFromBinWidth (double lower, double upper, double width, std::initializer_list< double > hints=DefaultBinningHints, double allowedStretch=DefaultAllowedBinningStretch) |
Returns the "optimal" binning for the requested parameters. More... | |
BinningSpecs | icarus::ns::util::makeBinningFromNBins (double lower, double upper, unsigned long nBins, std::initializer_list< double > hints=DefaultBinningHints, double allowedStretch=DefaultAllowedBinningStretch) |
Returns the "optimal" binning for the requested parameters. More... | |
BinningSpecs | icarus::ns::util::alignBinningTo (BinningSpecs const &binning, double boundary, bool extendCoverage=true) |
Returns a binning shifted to align with the specified boundary . More... | |
double | icarus::ns::util::chooseBinningWidth (double lower, double upper, double width, unsigned long nBins, std::initializer_list< double > hints=DefaultBinningHints, double allowedStretch=DefaultAllowedBinningStretch) |
Returns the "optimal" bin width for the requested parameters. More... | |
Simple utility for human-friendly binning.
Definition in file BinningSpecs.h.