Go to the documentation of this file.
41 { opType::EQUAL,
"eq" },
42 { opType::EQUAL,
"equal" },
43 { opType::NOT_EQUAL,
"neq" },
44 { opType::NOT_EQUAL,
"notEqual" },
45 { opType::LESS,
"lt" },
46 { opType::LESS,
"less" },
47 { opType::LESS_EQ,
"le" },
48 { opType::LESS_EQ,
"lessEq" },
49 { opType::GREATER,
"gt" },
50 { opType::GREATER,
"greater" },
51 { opType::GREATER_EQ,
"ge" },
52 { opType::GREATER_EQ,
"greaterEq" },
60 const enum predicates::scalars::opType op,
61 const Foam::scalar opVal,
62 const Foam::scalar tol
70 case opType::NOT_EQUAL:
82 case opType::GREATER_EQ:
101 template<
class Container,
class Get0>
104 const Container& entries,
108 for (
const auto&
entry : entries)
121 template<
class Error,
class Container,
class Get0,
class Get1>
125 const Container& entries,
134 for (
const auto& entry : entries)
144 <<
"Entries with unknown operations:" <<
nl
149 for (
const auto& entry : entries)
151 const bool bad = badIndices.found(idx);
162 err <<
'(' << get0(entry) <<
' ' << get1(entry) <<
')';
183 std::initializer_list<std::pair<word, scalar>> entries
186 List<unary>(entries.size())
190 [](
const std::pair<word,scalar>&
entry) {
return entry.first; };
192 [](
const std::pair<word,scalar>&
entry) {
return entry.second; };
204 for (
const auto& entry : entries)
217 List<unary>(entries.size())
223 [](
const Tuple2<word,scalar>& entry) {
return entry.second(); };
235 for (
const auto& entry : entries)
259 const label len = this->size();
267 if ((*
this)[
pos](value))
287 if (pos < 0 || pos >= this->size())
289 pos = this->size()-1;
294 if ((*
this)[
pos](value))
311 List<Tuple2<word, scalar>> entries(is);
315 [](
const Tuple2<word,scalar>& entry) {
return entry.first(); };
317 [](
const Tuple2<word,scalar>& entry) {
return entry.second(); };
328 list.
resize(entries.size());
331 for (
const Tuple2<word, scalar>& entry : entries)
A keyword and a list of tokens is an 'entry'.
scalars(std::initializer_list< std::pair< word, scalar >> entries)
static unary greaterEqOp(const scalar opVal)
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
void resize(const label len)
static const Enum< opType > opNames
A list of unary predicates (tests) on scalars. Includes a number of standard comparison predicates (e...
Istream & operator>>(Istream &, directionInfo &)
static bool hasBadEntries(const Container &entries, const Get0 &get0)
A HashTable with keys but without contents that is similar to std::unordered_set.
static unary greaterOp(const scalar opVal)
label find(const scalar value, label pos=0) const
label rfind(const scalar value, label pos=-1) const
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
static unary notEqualOp(const scalar opVal, const scalar tol=VSMALL)
static unary lessEqOp(const scalar opVal)
static unary equalOp(const scalar opVal, const scalar tol=VSMALL)
static unary lessOp(const scalar opVal)
errorManipArg< error, int > exit(error &err, const int errNo=1)
static unary operation(const opType op, const scalar opVal, const scalar tol=VSMALL)
#define FatalErrorInFunction
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
static Error & printBadEntries(Error &err, const Container &entries, const Get0 &get0, const Get1 &get1)
bool insert(const Key &key)
#define FatalIOErrorInFunction(ios)
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys and label hasher.
std::function< bool(Foam::scalar)> unary
dimensionedScalar pos(const dimensionedScalar &ds)