47 return operation(opNames[op.
first()], op.
second(), tol);
53 const std::pair<word, scalar>& op,
57 return operation(opNames[op.first], op.second, tol);
69 return (this->
find(value,
pos) >= 0);
75 return matchAny(value);
81 for (
const unary& pred : *
this)
95 for (
const unary& pred : *
this)
103 return (!this->empty());
114 label i = 0,
count = 0;
115 for (
const unary& pred : *
this)
136 const label len =
input.size();
141 for (label i=0; i < len; ++i)
label find(const ListType &input, const UnaryPredicate &pred, const label start=0)
Same as ListOps::find_if.
void resize(const label len)
Adjust allocated size of list.
bool match(const scalar value) const
Matches any condition in the list.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
bool contains(const scalar value, label pos=0) const
Matches any condition in the list after the offset position.
bool matchAny(const scalar value) const
Matches any condition in the list.
dimensionedScalar pos(const dimensionedScalar &ds)
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
A class for handling words, derived from Foam::string.
static Istream & input(Istream &is, IntRange< T > &range)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
labelList matching(const scalar value) const
Extract list indices for all matches.
labelList invert(const label len, const labelUList &map)
Create an inverse one-to-one mapping.
bool matchAll(const scalar value) const
Matches all conditions in the list.
const T2 & second() const noexcept
Access the second element.
std::function< bool(Foam::scalar)> unary
The unary function type for testing a scalar.
static unary operation(const opType op, const scalar opVal, const scalar tol=VSMALL)
Standard comparison method by type.
static const Enum< opType > opNames
Names for the opType enumeration.
const T1 & first() const noexcept
Access the first element.