Go to the documentation of this file.
105 #include <type_traits>
147 inline MinMax(
const T& minVal,
const T& maxVal);
159 inline explicit MinMax(
const T& val);
182 inline const T&
min() const noexcept;
185 inline
T&
min() noexcept;
188 inline const
T&
max() const noexcept;
191 inline
T&
max() noexcept;
197 inline
T span() const;
200 inline scalar
mag() const;
203 inline
bool empty() const;
206 inline
bool valid() const;
226 inline
int compare(const
T& val) const;
229 inline
bool contains(const
T& val) const;
234 inline const
T&
clip(const
T& val) const;
256 inline
bool operator()(const
T& val) const;
263 inline
MinMax<
T>& operator+=(const
T& val);
269 inline
MinMax<
T>& operator*=(const scalar&
s);
272 inline
MinMax<
T>& operator/=(const scalar&
s);
A class for handling words, derived from Foam::string.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
bool inplaceClip(T &val) const
Inplace clip value by the min/max limits.
const T & max() const noexcept
The max value (second)
const T & min() const noexcept
The min value (first)
scalar mag() const
The magnitude of the min to max span. Zero if the range is invalid.
bool contains(const T &val) const
True if the value is within the range.
T centre() const
The min/max average value.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
bool overlaps(const MinMax< T > &b) const
Test if the ranges overlap.
word name(const complex &c)
Return string representation of complex.
T span() const
The min to max span. Zero if the range is invalid.
static MinMax< T > zero_one()
A 0-1 range corresponding to the pTraits zero, one.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
T value_type
The value type the MinMax represents.
const T & clip(const T &val) const
MinMax< scalar > scalarMinMax
A scalar min/max range.
MinMax< label > labelMinMax
A label min/max range.
static MinMax< T > le(const T &maxVal)
A semi-infinite range from type min to maxVal.
MinMax()
Construct inverted range.
bool intersect(const MinMax< T > &b)
Intersect (union) with the second range.
void clear()
Reset to an invalid, inverted range.
An ordered pair of two objects of type <T> with first() and second() elements.
static MinMax< T > ge(const T &minVal)
A semi-infinite range from minVal to the type max.
Traits class for primitives.
MinMax< T > & add(const MinMax &other)
Extend the range to include the other min/max range.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool valid() const
Range is valid if it is not inverted.
bool empty() const
Range is empty if it is inverted.
Global functions and operators related to the MinMax class. Included by MinMax.H.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
A min/max value pair with additional methods. In addition to conveniently storing values,...
int compare(const T &val) const
Compares the min/max range with the specified value.
pTraits< T >::cmptType cmptType
Component type.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...