38 <<
"Should have at least two values in bins. Now:" << bins
42 counts_.setSize(bins.size()-1);
56 else if (index == bins.size()-1)
92 for (
label i = 1; i < nBins; i++)
94 bins[i] = bins[i-1] + span;
Various functions to operate on Lists.
#define forAll(list, i)
Loop across all elements in list.
Calculates the counts per bin of a list.
Histogram(const List &bins, const List &l)
Construct given bin values and input list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
T value_type
Type of values the UList contains.
const T & const_reference
Type that can be used for storing into.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
label findLower(const ListType &, typename ListType::const_reference, const label stary, const BinaryOp &bop)
Find last element < given value in sorted list and return index,.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
label count(const ListType &l, typename ListType::const_reference x)
Count the number of occurrences of a value in a list.