3 #ifndef CDSUNIT_PQUEUE_ITEM_H
4 #define CDSUNIT_PQUEUE_ITEM_H
10 typedef size_t key_type;
12 struct key_extractor {
13 void operator()( key_type& k, SimpleValue const& s ) const
19 SimpleValue(): key(0) {}
20 SimpleValue( size_t n ): key(n) {}
26 struct less<pqueue::SimpleValue>
28 bool operator()( pqueue::SimpleValue const& k1, pqueue::SimpleValue const& k2 ) const
30 return k1.key < k2.key;
33 bool operator()( pqueue::SimpleValue const& k1, size_t k2 ) const
38 bool operator()( size_t k1, pqueue::SimpleValue const& k2 ) const
43 bool operator()( size_t k1, size_t k2 ) const
50 struct greater<pqueue::SimpleValue>
52 bool operator()( pqueue::SimpleValue const& k1, pqueue::SimpleValue const& k2 ) const
54 return k1.key > k2.key;
57 bool operator()( pqueue::SimpleValue const& k1, size_t k2 ) const
62 bool operator()( size_t k1, pqueue::SimpleValue const& k2 ) const
67 bool operator()( size_t k1, size_t k2 ) const
75 #endif // #ifndef CDSUNIT_PQUEUE_ITEM_H