00001 #ifndef DUNE_TRIPEL_HH
00002 #define DUNE_TRIPEL_HH
00003
00004 namespace Dune
00005 {
00006
00007 template<typename T1, typename T2, typename T3>
00008 struct tripel
00009 {
00010 typedef T1 first_type;
00011 typedef T2 second_type;
00012 typedef T3 third_type;
00013 T1 first;
00014 T2 second;
00015 T3 third;
00016 tripel() {}
00017 tripel (const T1& t1, const T2& t2, const T3& t3)
00018 : first(t1), second(t2), third(t3)
00019 {}
00020 bool operator< (const tripel<T1,T2,T3>& y) const
00021 {
00022 if (first<y.first) return true;
00023 if (y.first<first) return false;
00024
00025 if (second<y.second) return true;
00026 if (y.second<second) return false;
00027
00028 if (third<y.third) return true;
00029 return false;
00030 }
00031 bool operator== (const tripel<T1,T2,T3>& y) const
00032 {
00033 if (first==y.first && second==y.second && third==y.third) return true;
00034 return false;
00035 }
00036 };
00037
00038 }
00039
00040 #endif