56template<
class T>
class Pair;
80 void front() =
delete;
95 inline Pair(
const std::pair<T,T>& vals);
98 inline Pair(std::pair<T,T>&& vals);
104 inline Pair(
const T&
f,
const T&
s,
const bool doSort);
130 inline const T&
other(
const T& a)
const;
164 unsigned operator()(
const Pair<T>& obj,
unsigned seed=0)
const
199template<
class T1,
class T2>
200struct Hash<std::pair<T1, T2>>
202 unsigned operator()(
const std::pair<T1, T2>& obj,
unsigned seed=0)
const
204 return Hash<T2>()(obj.second, Hash<T1>()(obj.first, seed));
224 return (a.first() ==
b.first() && a.second() ==
b.second());
270template<
class T1,
class T2>
271inline Istream&
operator>>(Istream& is, std::pair<T1,T2>& t)
274 is >> t.first >> t.second;
283template<
class T1,
class T2>
virtual bool check(const char *operation) const
Check IOstream status for given operation.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
bool readEnd(const char *funcName)
End read of data chunk, ends with ')'.
bool readBegin(const char *funcName)
Begin read of data chunk, starts with '('.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
An ordered pair of two objects of type <T> with first() and second() elements.
Pair(T &&f, T &&s)
Move construct from components.
Pair()=default
Default construct.
Pair(std::pair< T, T > &&vals)
Move construct from std::pair.
Pair(const T &f, const T &s)
Copy construct from components.
void flip()
Flip the Pair in-place.
void back()=delete
The back() accessor (from FixedList) has no purpose.
void front()=delete
The front() accessor (from FixedList) has no purpose.
bool is_sorted() const
True if first() is less-than-equal second().
T & first() noexcept
Access the first element.
void sort()
Sort so that first() is less-than second().
Pair(const FixedList< T, 2 > &list, const bool doSort)
Copy construct, optionally sorted with first less-than second.
const T & other(const T &a) const
Return other element.
T & second() noexcept
Access the second element.
static int compare(const Pair< T > &a, const Pair< T > &b)
Compare Pairs.
const T & first() const noexcept
Access the first element.
Pair(const std::pair< T, T > &vals)
Copy construct from std::pair.
Pair(const FixedList< T, 2 > &list)
Copy construct FixedList of two items.
Pair(Istream &is)
Construct from Istream.
Pair(const T &f, const T &s, const bool doSort)
Copy construct, optionally sorted with first less-than second.
const T & second() const noexcept
Access the second element.
@ BEGIN_LIST
Begin list [isseparator].
@ END_LIST
End list [isseparator].
OBJstream os(runTime.globalPath()/outputName)
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 operator!=(const eddy &a, const eddy &b)
Pair< label > labelPair
A pair of labels.
bool operator<=(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A same or older than B.
void reverse(UList< T > &list, const label n)
Reverse the first n elements of the list.
bool operator>=(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A same or newer than B.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
Istream & operator>>(Istream &, directionInfo &)
bool operator<(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A older than B.
Pair< word > wordPair
A pair of words.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
bool operator>(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A newer than B.
unsigned operator()(const std::pair< T1, T2 > &obj, unsigned seed=0) const
Hash function class. The default definition is for primitives. Non-primitives used to hash entries on...
unsigned operator()(const T &obj, unsigned seed=0) const
Symmetric hashing functor for Pair, hashes lower value first.
unsigned operator()(const Pair< T > &obj, unsigned seed=0) const
A template class to specify if a data type is composed solely of Foam::label elements.
A template class to specify if a data type is composed solely of Foam::scalar elements.
A template class to specify that a data type can be considered as being contiguous in memory.