|
HerdSoftware
0.4.0
|
Handler struct for binned profile of various variables. More...
#include <BinnedProfile.h>
Public Member Functions | |
| BinnedProfile (unsigned int n, T v) | |
| Construct a new binned profile. More... | |
| void | SetRange (float start, float end) |
| Setup the bin edges from a given range. More... | |
Public Attributes | |
| std::vector< T > | values |
| std::vector< float > | binEdges |
| The bin contents. More... | |
Handler struct for binned profile of various variables.
This class is meant to be a helper for handling binning of countinuous or irregularly-sampled quantities. It holds both the values of the distribution in each bin as well as the edges of each bin. (If you have N bins, there will be N values and N+1 bin edges).
| T | the type of the binned variable |
|
inline |
Construct a new binned profile.
Be sure to call SetRange after constructing a new profile in order to properly compute the bin edges
| n | The number of values to be hold (number of bins) |
| v | The initial (default) value for the bin content |
|
inline |
Setup the bin edges from a given range.
| start | The lower bin edge of the first bin |
| end | The upper bin edge of the last bin |
| std::vector<float> BinnedProfile< T >::binEdges |
The bin contents.
| std::vector<T> BinnedProfile< T >::values |
1.8.17