92 if (
operator[](rangeI).isExact())
96 int nearestIndex = -1;
97 scalar nearestDiff = Foam::great;
102 if (diff < nearestDiff)
109 if (nearestIndex >= 0)
111 lst[nearestIndex] =
true;
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.
#define forAll(list, i)
Loop across all elements in list.
void inplaceSelect(List< scalar > &) const
Select a list of values that are within the ranges.
T & operator[](const label)
Return element of UList.
List< scalar > select(const List< scalar > &) const
Select a list of values that are within the ranges.
bool valid() const
Is the range non-empty?
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
void size(const label)
Override size to be inconsistent with allocated storage.
bool good() const
Return true if next operation might succeed.
Various functions to operate on Lists.
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 selected(const scalar) const
Return true if the given value is within the ranges.
scalarRanges()
Construct Null.
ListType subset(const UList< T > &select, const T &value, const ListType &)
Extract elements of List when select is a certain value.
void transfer(List< scalarRange > &)
Transfer the contents of the argument List into this list.
A scalar range specifier.