#ifndef quadrupletINCLUDE #define quadrupletINCLUDE namespace NICE { /** @brief quadruplet extension, similar to pair */ template struct quadruplet { T1 first; T2 second; T3 third; T4 fourth; quadruplet (); quadruplet (const T1& x, const T2& y, const T3& z, const T4 & q) { first = x; second = y; third = z; fourth = q; } template quadruplet (const quadruplet& x) { first = x.first; second = x.second; third = x.third; fourth = x.fourth; } // Two keys are equivalent if the comparison function for the keys is false in both directions bool operator< ( const quadruplet & t ) const { if (first < t.first) return true; else if ( first > t.first ) return false; else { if (second < t.second) return true; else if ( second > t.second ) return false; else { if (third < t.third) return true; else if (third > t.third) return false; else { if (fourth < t.fourth) return true; else return false; } } } } bool operator== ( const quadruplet & t ) const { return ( (t.first == first) && (t.second == second) && (t.third == third) && (t.fourth == fourth) ); } }; } #endif