40 <<
"Should have at least two values in bins. Now:" << bins
44 counts_.setSize(bins.size()-1);
58 else if (index == bins.size()-1)
94 for (label i = 1; i < nBins; i++)
96 bins[i] = bins[i-1] + span;
label findLower(const ListType &input, const T &val, const label start, const ComparePredicate &comp)
Binary search to find the index of the last element in a sorted list that is less than value...
errorManipArg< error, int > exit(error &err, const int errNo=1)
Calculates the counts per bin of a list.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Various functions to operate on Lists.
#define forAll(list, i)
Loop across all elements in list.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
const T & const_reference
The type used for reading from constant value_type objects.
T value_type
The value type the list contains.