ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/utils/Tuple.hpp
(Generate patch)

Comparing trunk/OOPSE-4/src/utils/Tuple.hpp (file contents):
Revision 2506 by tim, Mon Dec 5 18:23:30 2005 UTC vs.
Revision 2507 by tim, Sat Dec 10 16:54:40 2005 UTC

# Line 84 | Line 84 | namespace oopse {
84      return tuple4<T1,T2,T3,T4>( t1, t2, t3, t4 );
85    }
86  
87 + template<class T1, class T2, class T3>
88 + inline bool operator < (const tuple3<T1, T2, T3>& t1, const tuple3<T1, T2, T3>& t2) {
89  
90 +        return t1.first < t2.first
91 +             || (!(t2.first < t1.first) && t1.second < t2.second)
92 +             || (!(t2.first < t1.first) && !(t2.second < t2.second) && t1.third < t2.third);
93 + }
94 +
95 + template<class T1, class T2, class T3, class T4>
96 + inline bool operator < (const tuple4<T1, T2, T3, T4>& t1, const tuple4<T1, T2, T3, T4>& t2) {
97 +
98 +        return t1.first < t2.first
99 +             || (!(t2.first < t1.first) && t1.second < t2.second)
100 +             || (!(t2.first < t1.first) && !(t2.second < t2.second) && t1.third < t2.third)
101 +             ||(!(t2.first < t1.first) && !(t2.second < t2.second) && !(t2.third < t1.third) && t1.fourth < t2.fourth);
102 + }
103   typedef tuple3<int, int, int> IntTuple3;
104   typedef tuple4<int, int, int, int> IntTuple4;
105  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines