41 #ifndef Foam_scalarRanges_H 42 #define Foam_scalarRanges_H 58 public List<scalarRange>
72 explicit scalarRanges(
const std::string& str,
bool report =
true)
89 bool contains(
const scalar value)
const 93 if (
range.contains(value))
102 bool match(
const scalar value)
const {
return contains(value); }
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
constexpr scalarRanges() noexcept=default
Default construct.
bool match(const scalar value) const
True if the value is matched by any of the sub-ranges.
static scalarRanges parse(const std::string &str, bool report=true)
Construct by parsing string for scalar ranges with optional reporting if any range fails to parse...
A collection of scalar bounds to be used as a unary predicate.
bool contains(const scalar value) const
True if the value is contained by any of the sub-ranges.
bool operator()(const scalar value) const
For use as a predicate, same as contains()
Scalar bounds to be used as a unary predicate.