A list of unary predicates (tests) on scalars. Includes a number of standard comparison predicates (eg, "less", "greater", ...) More...
Public Types | |
enum | opType { EQUAL, NOT_EQUAL, LESS, LESS_EQ, GREATER, GREATER_EQ, ALWAYS, NEVER } |
typedef std::function< bool(Foam::scalar)> | unary |
![]() | |
typedef SubList< T > | subList |
Public Member Functions | |
scalars (std::initializer_list< std::pair< word, scalar >> entries) | |
scalars (const UList< Tuple2< word, scalar >> &entries) | |
scalars (Istream &is) | |
~scalars ()=default | |
label | find (const scalar value, label pos=0) const |
label | rfind (const scalar value, label pos=-1) const |
bool | found (const scalar value, label pos=0) const |
bool | match (const scalar &value) const |
bool | matchAny (const scalar &value) const |
bool | matchAll (const scalar &value) const |
labelList | matching (const scalar &value) const |
labelList | matching (const UList< scalar > &input, const bool invert=false) const |
bool | operator() (const scalar &value) const |
![]() | |
constexpr | List () noexcept |
List (const label len) | |
List (const label len, const T &val) | |
List (const label len, const Foam::zero) | |
List (const Foam::one, const T &val) | |
List (const Foam::one, T &&val) | |
List (const Foam::one, const Foam::zero) | |
List (const List< T > &a) | |
List (const UList< T > &a) | |
List (List< T > &a, bool reuse) | |
List (const UList< T > &list, const labelUList &indices) | |
List (const UList< T > &list, const FixedList< label, N > &indices) | |
List (const FixedList< T, N > &list) | |
List (const PtrList< T > &list) | |
List (const SLList< T > &list) | |
List (const IndirectListBase< T, Addr > &list) | |
List (std::initializer_list< T > list) | |
List (List< T > &&list) | |
List (DynamicList< T, SizeMin > &&list) | |
List (SortableList< T > &&list) | |
List (SLList< T > &&list) | |
List (Istream &is) | |
List (const label len) | |
List (const label len, const T &val) | |
List (const label len, const Foam::zero) | |
List (const Foam::one, const T &val) | |
List (const Foam::one, T &&val) | |
List (const Foam::one, const Foam::zero) | |
List (const UList< T > &a) | |
List (const List< T > &a) | |
List (List< T > &a, bool reuse) | |
List (const UList< T > &list, const labelUList &indices) | |
List (const PtrList< T > &list) | |
List (const SLList< T > &list) | |
List (std::initializer_list< T > list) | |
List (List< T > &&list) | |
List (SortableList< T > &&list) | |
List (SLList< T > &&list) | |
constexpr | List () noexcept |
List (Istream &is) | |
autoPtr< List< T > > | clone () const |
~List () | |
void | clear () |
void | resize (const label len) |
void | resize (const label len, const T &val) |
void | resize (const label newLen) |
void | resize_nocopy (const label len) |
void | setSize (const label n) |
void | setSize (const label n, const T &val) |
void | append (const T &val) |
void | append (T &&val) |
void | append (const UList< T > &list) |
void | append (const IndirectListBase< T, Addr > &list) |
void | append (const T &val) |
void | append (T &&val) |
void | append (const UList< T > &list) |
label | appendUniq (const T &val) |
void | transfer (List< T > &list) |
void | transfer (DynamicList< T, SizeMin > &list) |
void | transfer (SortableList< T > &list) |
void | transfer (List< T > &list) |
void | transfer (SortableList< T > &list) |
T & | newElmt (const label i) |
void | operator= (const UList< T > &a) |
void | operator= (const List< T > &list) |
void | operator= (const SLList< T > &list) |
void | operator= (const IndirectListBase< T, Addr > &list) |
void | operator= (const FixedList< T, N > &list) |
void | operator= (std::initializer_list< T > list) |
void | operator= (const T &val) |
void | operator= (const Foam::zero) |
void | operator= (List< T > &&list) |
void | operator= (DynamicList< T, SizeMin > &&list) |
void | operator= (SortableList< T > &&list) |
void | operator= (SLList< T > &&list) |
void | operator= (const UList< T > &a) |
void | operator= (const List< T > &list) |
void | operator= (const SLList< T > &list) |
void | operator= (std::initializer_list< T > list) |
void | operator= (List< T > &&list) |
void | operator= (SortableList< T > &&list) |
void | operator= (SLList< T > &&list) |
void | operator= (const T &val) |
void | operator= (const Foam::zero) |
Istream & | readList (Istream &is) |
Istream & | readList (Istream &is) |
Istream & | readList (Istream &is) |
void | shallowCopy (const UList< T > &)=delete |
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type | set (const label i, bool val=true) |
Static Public Member Functions | |
static unary | equalOp (const scalar opVal, const scalar tol=VSMALL) |
static unary | notEqualOp (const scalar opVal, const scalar tol=VSMALL) |
static unary | lessOp (const scalar opVal) |
static unary | lessEqOp (const scalar opVal) |
static unary | greaterOp (const scalar opVal) |
static unary | greaterEqOp (const scalar opVal) |
static unary | trueOp () |
static unary | falseOp () |
static unary | andOp (const unary &test1, const unary &test2) |
static unary | orOp (const unary &test1, const unary &test2) |
static unary | operation (const opType op, const scalar opVal, const scalar tol=VSMALL) |
static unary | operation (const word &opName, const scalar opVal, const scalar tol=VSMALL) |
static unary | operation (const Tuple2< word, scalar > &op, const scalar tol=VSMALL) |
static unary | operation (const std::pair< word, scalar > &op, const scalar tol=VSMALL) |
![]() | |
static const List< T > & | null () |
Static Public Attributes | |
static const Enum< opType > | opNames |
A list of unary predicates (tests) on scalars. Includes a number of standard comparison predicates (eg, "less", "greater", ...)
Definition at line 62 of file scalarPredicates.H.
Definition at line 71 of file scalarPredicates.H.
enum opType |
Enumerator | |
---|---|
EQUAL | "eq", "equal" |
NOT_EQUAL | "neq", "notEqual" |
LESS | "lt", "less" |
LESS_EQ | "le", "lessEq" |
GREATER | "gt", "greater" |
GREATER_EQ | "ge", "greaterEq" |
ALWAYS | Always matches. |
NEVER | Never matches. |
Definition at line 74 of file scalarPredicates.H.
Definition at line 175 of file scalarPredicates.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::hasBadEntries(), scalars::operation(), and Foam::printBadEntries().
Definition at line 206 of file scalarPredicates.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::hasBadEntries(), scalars::operation(), and Foam::printBadEntries().
Definition at line 236 of file scalarPredicates.C.
|
default |
Definition at line 94 of file scalarPredicates.H.
References Foam::mag().
|
inlinestatic |
Definition at line 108 of file scalarPredicates.H.
References Foam::mag().
Definition at line 121 of file scalarPredicates.H.
Definition at line 131 of file scalarPredicates.H.
Definition at line 142 of file scalarPredicates.H.
|
inlinestatic |
Definition at line 152 of file scalarPredicates.H.
|
inlinestatic |
Definition at line 164 of file scalarPredicates.H.
|
inlinestatic |
Definition at line 170 of file scalarPredicates.H.
Definition at line 179 of file scalarPredicates.H.
Referenced by parcelSelection::calculateFilter().
Definition at line 188 of file scalarPredicates.H.
Referenced by parcelSelection::calculateFilter().
Referenced by parcelSelection::calculateFilter(), Foam::operator>>(), and scalars::scalars().
|
inlinestatic |
Definition at line 24 of file scalarPredicatesI.H.
|
inlinestatic |
Definition at line 35 of file scalarPredicatesI.H.
References Tuple2::first(), and Tuple2::second().
|
inlinestatic |
Definition at line 45 of file scalarPredicatesI.H.
Foam::label find | ( | const scalar | value, |
label | pos = 0 |
||
) | const |
Definition at line 247 of file scalarPredicates.C.
References Foam::pos().
Foam::label rfind | ( | const scalar | value, |
label | pos = -1 |
||
) | const |
Definition at line 274 of file scalarPredicates.C.
References Foam::pos().
|
inline |
Definition at line 57 of file scalarPredicatesI.H.
References Foam::ListOps::find(), and Foam::pos().
|
inline |
Definition at line 66 of file scalarPredicatesI.H.
References scalars::matchAny().
|
inline |
Definition at line 72 of file scalarPredicatesI.H.
Referenced by scalars::match().
|
inline |
Definition at line 86 of file scalarPredicatesI.H.
|
inline |
Definition at line 101 of file scalarPredicatesI.H.
References Foam::BitOps::count(), and List::resize().
|
inline |
Definition at line 124 of file scalarPredicatesI.H.
References Foam::BitOps::count(), Foam::input(), Foam::invert(), Foam::stringOps::match(), and List::resize().
|
inline |
Definition at line 150 of file scalarPredicatesI.H.
References found.
|
static |
Definition at line 87 of file scalarPredicates.H.
Referenced by Foam::hasBadEntries(), and Foam::printBadEntries().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.