--- trunk/OOPSE-4/src/utils/Tuple.hpp 2005/12/09 21:18:46 2506 +++ trunk/OOPSE-4/src/utils/Tuple.hpp 2005/12/10 16:54:40 2507 @@ -84,7 +84,22 @@ namespace oopse { return tuple4( t1, t2, t3, t4 ); } +template +inline bool operator < (const tuple3& t1, const tuple3& t2) { + return t1.first < t2.first + || (!(t2.first < t1.first) && t1.second < t2.second) + || (!(t2.first < t1.first) && !(t2.second < t2.second) && t1.third < t2.third); +} + +template +inline bool operator < (const tuple4& t1, const tuple4& t2) { + + return t1.first < t2.first + || (!(t2.first < t1.first) && t1.second < t2.second) + || (!(t2.first < t1.first) && !(t2.second < t2.second) && t1.third < t2.third) + ||(!(t2.first < t1.first) && !(t2.second < t2.second) && !(t2.third < t1.third) && t1.fourth < t2.fourth); +} typedef tuple3 IntTuple3; typedef tuple4 IntTuple4;