LocARNA-1.8.11
tuples.hh
1 #ifndef LOCARNA_TUPLES_HH
2 #define LOCARNA_TUPLES_HH
3 
4 #ifdef HAVE_CONFIG_H
5 # include <config.h>
6 #endif
7 
8 namespace LocARNA {
9 
16  template<class T1,class T2,class T3>
17  class triple: public std::pair<T1,T2> {
18  public:
19  T3 third;
20 
29  triple(const T1 &x1,const T2 &x2,const T3 &x3): std::pair<T1,T2>(x1,x2),third(x3) {
30  }
31  };
32 
39  template<class T1,class T2,class T3,class T4>
40  class quadruple: public triple<T1,T2,T3> {
41  public:
42  T4 fourth;
43 
53  quadruple(const T1 &x1,const T2 &x2,const T3 &x3,const T4 &x4): triple<T1,T2,T3>(x1,x2,x3),fourth(x4) {
54  }
55  };
56 
63  template<class T1,class T2,class T3,class T4,class T5>
64  class quintuple: public quadruple<T1,T2,T3,T4> {
65  public:
66  T5 fifth;
67 
78  quintuple(const T1 &x1,
79  const T2 &x2,
80  const T3 &x3,
81  const T4 &x4,
82  const T5 &x5)
83  : quadruple<T1,T2,T3,T4>(x1,x2,x3,x4),
84  fifth(x5) {
85  }
86 
87  };
88 
89 } // end namespace LocARNA
90 
91 #endif // LOCARNA_TUPLES_HH
STL namespace.
Definition: aligner.cc:17
Represents a 3-tuple.
Definition: tuples.hh:17
Represents a 5-tuple.
Definition: tuples.hh:64
Represents a 4-tuple.
Definition: tuples.hh:40
T3 third
third value
Definition: tuples.hh:19
triple(const T1 &x1, const T2 &x2, const T3 &x3)
Definition: tuples.hh:29
T4 fourth
fourth value
Definition: tuples.hh:42
T5 fifth
fifth value
Definition: tuples.hh:66
quadruple(const T1 &x1, const T2 &x2, const T3 &x3, const T4 &x4)
Construct from four values.
Definition: tuples.hh:53
quintuple(const T1 &x1, const T2 &x2, const T3 &x3, const T4 &x4, const T5 &x5)
Construct from five values.
Definition: tuples.hh:78