35void Foam::Histogram<List>::count(
const List& bins,
const List& l)
40 <<
"Should have at least two values in bins. Now:" << bins
44 counts_.setSize(bins.size()-1);
58 else if (index == bins.size()-1)
73Foam::Histogram<List>::Histogram(
const List& bins,
const List& l)
80Foam::Histogram<List>::Histogram
94 for (label i = 1; i < nBins; i++)
96 bins[i] = bins[i-1] + span;
Various functions to operate on Lists.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
T value_type
The value type the list contains.
const T & const_reference
The type used for reading from constant value_type objects.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
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.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define forAll(list, i)
Loop across all elements in list.