Go to the documentation of this file.
55 template<
class T>
class Pair;
85 inline Pair(
const std::pair<T,T>& vals);
88 inline Pair(std::pair<T,T>&& vals);
94 inline Pair(
const T&
f,
const T&
s,
const bool doSort);
114 inline const T&
second() const noexcept;
120 inline const
T&
other(const
T& a) const;
126 inline
bool sorted() const;
155 inline unsigned operator()
161 if (obj.first() < obj.second())
163 seed = HashT()(obj.first(), seed);
164 seed = HashT()(obj.second(), seed);
168 seed = HashT()(obj.second(), seed);
169 seed = HashT()(obj.first(), seed);
203 return Hasher(obj.cdata(),
sizeof(obj), seed);
206 seed =
Hash<T>()(obj.first(), seed);
227 return (a.first() ==
b.first() && a.
second() ==
b.second());
243 a.first() <
b.first()
244 || (!(
b.first() < a.first()) && a.
second() <
b.second())
const T & second() const noexcept
Return second element, which is also the last element.
void reverse(UList< T > &list, const label n)
bool operator<=(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A same or older than B.
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))
unsigned Hasher(const void *data, size_t len, unsigned seed=0)
Bob Jenkins's 96-bit mixer hashing function (lookup3)
unsigned operator()(const T &obj, unsigned seed=0) const
Symmetrical hashing for Pair data.
A template class to specify if a data type is composed solely of Foam::label elements.
bool sorted() const
True if first() is less-than second()
Pair< label > labelPair
A pair of labels.
bool operator!=(const eddy &a, const eddy &b)
void sort()
Sort so that first() is less-than second()
Hash function class. The default definition is for primitives, non-primitives used to hash entries on...
static int compare(const Pair< T > &a, const Pair< T > &b)
Compare Pairs.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Pair()=default
Construct null.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
const T & other(const T &a) const
Return other element.
void flip()
Flip the Pair in-place.
bool operator>=(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A same or newer than B.
A template class to specify if a data type is composed solely of Foam::scalar elements.
An ordered pair of two objects of type <T> with first() and second() elements.
A 1D vector of objects of type <T> with a fixed length <N>.
unsigned operator()(const Pair< T > &obj, unsigned seed=0) const
bool operator<(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A older than B.
A template class to specify that a data type can be considered as being contiguous in memory.
bool operator>(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A newer than B.