9 #ifndef ThePEG_Triplet_H 10 #define ThePEG_Triplet_H 12 #include "ThePEG/Config/ThePEG.h" 20 template <
typename T1,
typename T2,
typename T3>
38 Triplet() : first(T1()), second(T2()), third(T3()) {}
41 Triplet(
const T1 & t1,
const T2 & t2,
const T3 & t3)
42 : first(t1), second(t2), third(t3) {}
46 : first(t.first), second(t.second), third(t.third) {}
49 template <
typename U1,
typename U2,
typename U3>
51 : first(u.first), second(u.second), third(u.third) {}
62 bool operator<(const Triplet<T1,T2,T3> & t)
const {
63 return first < t.first ||
64 ( !(t.first <
first) &&
65 ( second < t.second ||
66 ( !(t.second < second) && third < t.third )));
72 template <
typename T1,
typename T2,
typename T3>
80 template <
typename OStream,
typename T1,
typename T2,
typename T3>
81 OStream & operator<<(OStream & os, const Triplet<T1,T2,T3> & t) {
82 return os << t.first << t.second << t.third;
86 template <
typename IStream,
typename T1,
typename T2,
typename T3>
Triplet()
Default construcotr.
Triplet(const Triplet< T1, T2, T3 > &t)
Copy constructor.
T3 third_type
The type of the third member.
T2 second
The second member.
T1 first_type
The type of the first member.
T3 third
The third member.
This is the main namespace within which all identifiers in ThePEG are declared.
Triplet(const T1 &t1, const T2 &t2, const T3 &t3)
Constructor specifying the three members.
Triplet(const Triplet< U1, U2, U3 > &u)
Copy constructor from other Triplet type.
T2 second_type
The type of the second member.
vector< T > & operator>>(vector< T > &tv, U &u)
Overload the right shift operator for vector to pop objects from a vector.
Triplet< T1, T2, T3 > makeTriplet(const T1 &t1, const T2 &t2, const T3 &t3)
Helper function returning a Triplet with template parameters determined by the arguments.
bool operator==(const Triplet< T1, T2, T3 > &t) const
Test for equality.
The Triplet class represents a general triplet of objects completely analogous to std::pair...
T1 first
The first member.