1 #ifndef __JTOOLS__JMULTIKEY__
2 #define __JTOOLS__JMULTIKEY__
18 namespace JPP {
using namespace JTOOLS; }
28 template<
unsigned int N,
class JKey_t>
36 template<
unsigned int N,
class JKey_t>
42 template<
unsigned int N,
class JKey_t>
43 struct JArgument<N, const JKey_t> {
60 template<
unsigned int N,
class JKey_t>
62 public std::pair<JKey_t, JMultiKey<N-1, JKey_t> >,
102 pair(__first, __second)
112 pair(key.first, key.second)
124 if (this->first == key.first)
125 return this->second.less(key.second);
127 return this->first < key.first;
138 return this->first*this->first + this->second.getLengthSquared();
160 return JMultiKey<N-1, JKey_t>(this->first, this->second.front());
171 return this->second.back();
198 friend inline std::ostream& operator<<(std::ostream& out, const JMultiKey<N, JKey_t>& key)
212 template<
class JKey_t>
214 public std::pair<JKey_t, JMultiKey<1, JKey_t> >,
241 pair(__first.first, __second)
254 pair(__first, __second.first)
264 pair(key.first, key.second)
276 if (this->first == key.first)
277 return this->second.less(key.second);
279 return this->first < key.first;
290 return this->first*this->first + this->second.getLengthSquared();
323 return this->second.back();
350 friend inline std::ostream& operator<<(std::ostream& out, const JMultiKey<2, JKey_t>& key)
364 template<
class JKey_t>
436 return this->first < key.
first;
447 return this->first*this->first;
495 friend inline std::ostream& operator<<(std::ostream& out, const JMultiKey<1, JKey_t>& key)
510 template<
class JKey_t>
JArgument< T >::argument_type argument_type
Template definition of auxiliary base class for comparison of data structures.
Template for generic class types.