63 if (
operator[](i).selected(value))
83 if (selected(values[i]))
92 if (
operator[](rangeI).isExact())
94 scalar target = operator[](rangeI).value();
96 int nearestIndex = -1;
97 scalar nearestDiff = Foam::great;
102 if (
diff < nearestDiff)
109 if (nearestIndex >= 0)
111 lst[nearestIndex] =
true;
125 return subset(selected(values), values);
Various functions to operate on Lists.
#define forAll(list, i)
Loop across all elements in list.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
bool good() const
Return true if next operation might succeed.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void transfer(List< scalarRange > &)
Transfer the contents of the argument List into this list.
void size(const label)
Override size to be inconsistent with allocated storage.
A scalar range specifier.
bool valid() const
Is the range non-empty?
List< scalar > select(const List< scalar > &) const
Select a list of values that are within the ranges.
bool selected(const scalar) const
Return true if the given value is within the ranges.
scalarRanges()
Construct Null.
void inplaceSelect(List< scalar > &) const
Select a list of values that are within the ranges.
void inplaceSubset(const UList< T > &select, const T &value, ListType &)
Inplace extract elements of List when select is a certain value.
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
ListType subset(const UList< T > &select, const T &value, const ListType &)
Extract elements of List when select is a certain value.