Go to the documentation of this file.
40 <<
"Should have at least two values in bins. Now:" << bins
44 counts_.setSize(bins.size()-1);
58 else if (index == bins.size()-1)
82 const typename List::const_reference
min,
83 const typename List::const_reference
max,
90 typename List::value_type span = (
max-
min) / nBins;
94 for (label i = 1; i < nBins; i++)
96 bins[i] = bins[i-1] + span;
Calculates the counts per bin of a list.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
#define forAll(list, i)
Loop across all elements in list.
label findLower(const ListType &input, const T &val, const label start, const ComparePredicate &comp)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Various functions to operate on Lists.