CSAccessSkipList.h

Go to the documentation of this file.
00001 
00007 
00008 
00055 template <class K, class T, class A=XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG >
00056 class AccessSkipList
00057 {
00058 public:
00059   class T0;
00060   class T1;
00061   friend class T0;
00062   friend class T1;
00064   typedef size_t size_type;
00066 
00069   typedef ptrdiff_t difference_type;
00071   typedef AccessSkipList<K,T,A,Pr,R> container_type;
00073   typedef K key_type;
00075   typedef T value_type;
00077   typedef BidiNode<value_type> node_type;
00079 
00084   typedef T0 iterator;
00086   typedef value_type* pointer;
00088   typedef value_type& reference;
00090   typedef T data_type;
00092   typedef T mapped_type;
00094   typedef T& mapped_type_reference;
00096   typedef const T const_mapped_type;
00098   typedef const T& const_mapped_type_reference;
00100   typedef const T& const_reference;
00102   typedef T1 const_iterator;
00104 
00107   typedef std::reverse_iterator<iterator> reverse_iterator;
00109   typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
00111   typedef std::pair<iterator, bool> slpair;
00113   typedef std::pair<iterator, iterator> ipair;
00115   typedef std::pair<const_iterator, const_iterator> const_ipair;
00117   typedef Pr key_compare;
00118 
00120   class value_compare
00121     : public std::binary_function<value_type, value_type, bool>
00122   {
00123   friend class AutoAccessSkipList<K,T,A,Pr,R>;
00124   public:
00125     bool operator()(const value_type& left, const value_type& right) const
00126       {return (comp(a(left), a(right))); }
00127   protected:
00128     value_compare(const key_compare &pr) : comp(pr) {}
00129     key_compare comp;
00130     A a;
00131   };
00132 
00133 private:
00134   R rng; 
00135   A a;  
00136   key_compare KeyCompare; 
00137   value_compare ValueCompare; 
00138   unsigned int maxLevel; 
00139   unsigned int level;    
00140   node_type *head;  
00141   node_type *tail; 
00142   double probability; 
00143   size_type items; 
00144   mutable std::pair<size_type,node_type*> *update; 
00145 
00147 
00151   void Init(double probability, unsigned int maxLevel) {}
00152 
00154 
00159   node_type* Alloc(unsigned int level, const T &obj) {}
00160 
00162 
00166   node_type* Alloc(unsigned int level) {}
00167 
00169 
00172   void Free(node_type *item) {}
00173 
00175 
00178   unsigned int GenerateRandomLevel() const {}
00179 
00181   void adjust_levels() {}
00182 
00184 
00190   void scan(const key_type &val) const{}
00191 
00193 
00199   void scan(const value_type &val) const{}
00200 
00202 
00208   void scan(const node_type *nodex) const{}
00209 
00211 
00218   void scan(const iterator &where) const{}
00219 public:
00220 
00222 
00225   class T0 : public std::iterator<std::bidirectional_iterator_tag, value_type>
00226   {
00227   public:
00228     typedef std::iterator<std::bidirectional_iterator_tag, value_type> baseclass;
00229     typedef std::random_acces_iterator_tag iterator_category;
00230     typedef typename baseclass::value_type value_type;
00231     typedef typename baseclass::value_type* pointer;
00232     typedef typename baseclass::value_type& reference;
00233     typedef ptrdiff_t difference_type;
00234 
00235     friend T1;
00236     friend container_type;
00237   private:
00238     container_type *container; 
00239     node_type* node; 
00240   public:
00242     T0() {}
00243 
00245 
00248     T0(const T0 &t0){}
00249 
00251 
00254     T0(const T1 &t1){}
00255 
00257 
00261     T0(container_type *container, node_type* p){}
00262 
00264 
00267     bool operator==(const T0& other) const{}
00268 
00270 
00273     bool operator!=(const T0& other) const{}
00274 
00276 
00279     bool operator==(const T1& other) const{}
00280 
00282 
00285     bool operator!=(const T1& other) const{}
00286 
00288 
00293     T0& operator++(){}
00294 
00296 
00301     T0 operator++(int){}
00302 
00304 
00309     T0& operator--(){}
00310 
00312 
00317     T0 operator--(int){}
00318 
00320 
00325     reference operator*() const{}
00326 
00328 
00333     pointer operator->() const{}
00334 
00336 
00339     bool operator<(const T0 &other) const{}
00340 
00342 
00345     bool operator<=(const T0 &other) const{}
00346 
00348 
00351     bool operator>(const T0 &other) const{}
00352 
00354 
00357     bool operator>=(const T0 &other) const{}
00358 
00360 
00363     bool operator<(const T1 &other) const{}
00364 
00366 
00369     bool operator<=(const T1 &other) const{}
00370 
00372 
00375     bool operator>(const T1 &other) const{}
00376 
00378 
00381     bool operator>=(const T1 &other) const{}
00382   };
00383 
00385 
00388   class T1 : public std::iterator<std::bidirectional_iterator_tag, value_type, ptrdiff_t, const value_type*, const value_type&>
00389   {
00390   public:
00391     typedef std::iterator<std::bidirectional_iterator_tag, value_type> baseclass;
00392     typedef std::random_acces_iterator_tag iterator_category;
00393     typedef typename baseclass::value_type value_type;
00394     typedef typename const baseclass::value_type* pointer;
00395     typedef typename const baseclass::value_type& reference;
00396     typedef ptrdiff_t difference_type;
00397 
00398     friend T0;
00399     friend container_type;
00400   private:
00401     const container_type *container; 
00402     const node_type* node; 
00403   public:
00405     T1() {}
00406 
00408 
00411     T1(const T1 &t1){}
00412 
00414 
00417     T1(const T0 &t0){}
00418 
00420 
00424     T1(container_type *container, node_type* p){}
00425 
00427 
00430     bool operator==(const T0& other) const{}
00431 
00433 
00436     bool operator!=(const T0& other) const{}
00437 
00439 
00442     bool operator==(const T1& other) const{}
00443 
00445 
00448     bool operator!=(const T1& other) const{}
00449 
00451 
00456     T1& operator++(){}
00457 
00459 
00464     T1 operator++(int){}
00465 
00467 
00472     T1& operator--(){}
00473 
00475 
00480     T1 operator--(int){}
00481 
00483 
00488     reference operator*() const{}
00489 
00491 
00496     pointer operator->() const{}
00497 
00499 
00502     bool operator<(const T0 &other) const{}
00503 
00505 
00508     bool operator<=(const T0 &other) const{}
00509 
00511 
00514     bool operator>(const T0 &other) const{}
00515 
00517 
00520     bool operator>=(const T0 &other) const{}
00521 
00523 
00526     bool operator<(const T1 &other) const{}
00527 
00529 
00532     bool operator<=(const T1 &other) const{}
00533 
00535 
00538     bool operator>(const T1 &other) const{}
00539 
00541 
00544     bool operator>=(const T1 &other) const{}
00545   };
00546 
00548 
00552   AccessSkipList(){}
00553 
00555 
00561   explicit AccessSkipList(size_type maxNodes){}
00562 
00564 
00568   AccessSkipList(double probability, unsigned int maxLevel){}
00569 
00571 
00576   AccessSkipList(const container_type &source){}
00577 
00579 
00586   template<class InIt> AccessSkipList(InIt first, InIt last){}
00587 
00589 
00595   template<class InIt> AccessSkipList(InIt first, InIt last, double probability, unsigned int maxLevel){}
00596 
00598 
00606   template<class InIt> AccessSkipList(InIt first, InIt last, size_type maxNodes){}
00607 
00609 
00615   explicit AccessSkipList(const key_compare& comp){}
00616 
00618 
00626   template<class InIt> AccessSkipList(InIt first, InIt last, const key_compare& comp){}
00627 
00629 
00636   template<class InIt> AccessSkipList(InIt first, InIt last, const key_compare& comp, double probability, unsigned int maxLevel){}
00637 
00639 
00648   template<class InIt> AccessSkipList(InIt first, InIt last, const key_compare& comp, size_type maxNodes) : Compare(comp){}
00649 
00651 
00654   ~AccessSkipList(){}
00655 
00656 
00658 
00664   container_type& operator=(const container_type &source){}
00665 
00667 
00670   iterator begin(){}
00671 
00673 
00676   iterator end(){}
00677 
00679 
00682   const_iterator begin() const{}
00683 
00685 
00688   const_iterator end() const{}
00689 
00691 
00694   reverse_iterator rbegin(){}
00695 
00697 
00700   reverse_iterator rend(){}
00701 
00703 
00706   const_reverse_iterator rbegin() const{}
00707 
00709 
00712   const_reverse_iterator rend() const{}
00713 
00715 
00718   size_type size() const{}
00719 
00721 
00724   bool empty() const{}
00725 
00727 
00730   reference front(){}
00731 
00733 
00736   const_reference front() const{}
00737 
00739 
00742   reference back(){}
00743 
00745 
00748   const_reference back() const{}
00749 
00751   void pop_front(){}
00752 
00754   void destroy_front(){}
00755 
00757   void pop_back(){}
00758 
00760   void destroy_back(){}
00761 
00763 
00767   template<class InIt> void assign(InIt first, InIt last){}
00768 
00770 
00780   slpair insert(const value_type& val){}
00781 
00783 
00789   iterator insert(const iterator &where, const value_type& val) {}
00790 
00792 
00796   template<class InIt> void insert(InIt first, InIt last) {}
00797 
00799   void clear(){}
00800 
00802   void destroy(){}
00803 
00805   iterator erase(const iterator &where){}
00806 
00808   iterator destroy(const iterator &where){}
00809 
00811 
00818   iterator erase(const iterator &first, const iterator &last){}
00819 
00821 
00828   iterator destroy(const iterator &first, const iterator &last){}
00829 
00831 
00835   size_type erase(const key_type &keyval){}
00836 
00838 
00842   size_type destroy(const key_type &keyval){}
00843 
00845 
00848   void swap(container_type& right) {}
00849 
00851 
00854   template<class Pr1> void erase_if(Pr1 pred);
00855 
00857 
00860   template<class Pr4> void destroy_if(Pr4 pred);
00861 
00863 
00874   void cut(const iterator &first, const iterator &last, container_type& right);
00875 
00877 
00883   mapped_type_reference operator[](const key_type& key){}
00884 
00886 
00892   const_mapped_type_reference operator[](const key_type& key) const{}
00893 
00895 
00901   mapped_type_reference operator()(const key_type& key){}
00902 
00904 
00910   const_mapped_type_reference operator()(const key_type& key) const{}
00911 
00913   key_compare key_comp() const { }
00914 
00916   value_compare value_comp() const { }
00917 
00919   size_type max_size() const{}
00920 
00922 
00929   const key_type& key(const value_type& value) const {}
00930 
00932 
00939   mapped_type& value(value_type& value) {}
00940 
00942 
00946   iterator find(const key_type& keyval) {}
00947 
00949 
00953   const_iterator find(const key_type& keyval) const {}
00954 
00956 
00960   size_type count(const key_type& keyval) const {}
00961 
00962 
00964 
00968   iterator lower_bound(const key_type& keyval) {}
00969 
00971 
00975   const_iterator lower_bound(const key_type& keyval) const {}
00976 
00978 
00982   iterator upper_bound(const key_type& keyval) {}
00983 
00985 
00989   const_iterator upper_bound(const key_type& keyval) const {}
00990 
00992 
00996   ipair equal_range(const key_type& keyval) {}
00997 
00999 
01003   const_ipair equal_range(const key_type& keyval) const {}
01004 };
01005 
01007 
01012 template <class K, class T, class A, class Pr, class R>
01013 bool operator==(const AccessSkipList<K,T,A,Pr,R> &left, const AccessSkipList<K,T,A,Pr,R> &right)
01014 {
01015   return ((left.size() == right.size()) &&
01016           (std::equal(left.begin(), left.end(), right.begin())));
01017 
01018 }
01019 
01021 
01026 template <class K, class T, class A, class Pr, class R>
01027 bool operator!=(const AccessSkipList<K,T,A,Pr,R> &left, const AccessSkipList<K,T,A,Pr,R> &right)
01028 {
01029   return !(left==right);
01030 }
01031 
01033 
01038 template <class K, class T, class A, class Pr, class R>
01039 bool operator<(const AccessSkipList<K,T,A,Pr,R> &left, const AccessSkipList<K,T,A,Pr,R> &right)
01040 {
01041   return lexicographical_compare(left.begin(),left.end(),right.begin(),right.end(),left.value_comp());
01042 }
01043 
01045 
01050 template <class K, class T, class A, class Pr, class R>
01051 bool operator<=(const AccessSkipList<K,T,A,Pr,R> &left, const AccessSkipList<K,T,A,Pr,R> &right)
01052 {
01053   return !(right < left);
01054 }
01055 
01057 
01062 template <class K, class T, class A, class Pr, class R>
01063 bool operator>(const AccessSkipList<K,T,A,Pr,R> &left, const AccessSkipList<K,T,A,Pr,R> &right)
01064 {
01065   return (right < left);
01066 }
01067 
01069 
01074 template <class K, class T, class A, class Pr, class R>
01075 bool operator>=(const AccessSkipList<K,T,A,Pr,R> &left, const AccessSkipList<K,T,A,Pr,R> &right)
01076 {
01077   return !(left < right);
01078 }
01079 
01080 /*#define csarg1 template <class T, class Pr, class R>
01081 #define csarg2 AccessSkipList<K,T,A,Pr,R>
01082 CSDefineCompOps(csarg1, csarg2)
01083 #undef csarg1
01084 #undef csarg2
01085 
01086 #undef CSUNIQUE
01087 #define CSUNIQUE(a,b) b
01088 */
01089 
01091 
01138 template <class K, class T, class A=XAccessSelf<K,T>, class Pr = std::less<K>, class R = RNG >
01139 class MultiAccessSkipList
01140 {
01141 public:
01142   class T0;
01143   class T1;
01144   friend class T0;
01145   friend class T1;
01147   typedef size_t size_type;
01149 
01152   typedef ptrdiff_t difference_type;
01154   typedef MultiAccessSkipList<K,T,A,Pr,R> container_type;
01156   typedef K key_type;
01158   typedef T value_type;
01160   typedef BidiNode<value_type> node_type;
01162 
01167   typedef T0 iterator;
01169   typedef value_type* pointer;
01171   typedef value_type& reference;
01173   typedef T data_type;
01175   typedef T mapped_type;
01177   typedef T& mapped_type_reference;
01179   typedef const T const_mapped_type;
01181   typedef const T& const_mapped_type_reference;
01183   typedef const T& const_reference;
01185   typedef T1 const_iterator;
01187 
01190   typedef std::reverse_iterator<iterator> reverse_iterator;
01192   typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
01194   typedef std::pair<iterator, iterator> ipair;
01196   typedef std::pair<const_iterator, const_iterator> const_ipair;
01198   typedef Pr key_compare;
01199 
01201   class value_compare
01202     : public std::binary_function<value_type, value_type, bool>
01203   {
01204   friend class MultiAccessSkipList<K,T,A,Pr,R>;
01205   public:
01206     bool operator()(const value_type& left, const value_type& right) const
01207       {return (comp(a(left), a(right))); }
01208   protected:
01209     value_compare(const key_compare &pr) : comp(pr) {}
01210     key_compare comp;
01211     A a;
01212   };
01213 
01214 private:
01215   R rng; 
01216   A a;  
01217   key_compare KeyCompare; 
01218   value_compare ValueCompare; 
01219   unsigned int maxLevel; 
01220   unsigned int level;    
01221   node_type *head;  
01222   node_type *tail; 
01223   double probability; 
01224   size_type items; 
01225   mutable std::pair<size_type,node_type*> *update; 
01226 
01228 
01232   void Init(double probability,unsigned int maxLevel) {}
01233 
01235 
01240   node_type* Alloc(unsigned int level, const T &obj) {}
01241 
01243 
01247   node_type* Alloc(unsigned int level) {}
01248 
01250 
01253   void Free(node_type *item) {}
01254 
01256 
01259   unsigned int GenerateRandomLevel() const {}
01260 
01262   void adjust_levels() {}
01263 
01265 
01271   void scan(const key_type &val) const{}
01272 
01274 
01280   void scan(const value_type &val) const{}
01281 
01283 
01289   void scan(const node_type *nodex) const{}
01290 
01292 
01299   void scan(const iterator &where) const{}
01300 
01301 public:
01303 
01306   class T0 : public std::iterator<std::bidirectional_iterator_tag, value_type>
01307   {
01308   public:
01309     typedef std::iterator<std::bidirectional_iterator_tag, value_type> baseclass;
01310     typedef std::random_acces_iterator_tag iterator_category;
01311     typedef typename baseclass::value_type value_type;
01312     typedef typename baseclass::value_type* pointer;
01313     typedef typename baseclass::value_type& reference;
01314     typedef ptrdiff_t difference_type;
01315 
01316     friend T1;
01317     friend container_type;
01318   private:
01319     container_type *container; 
01320     node_type* node; 
01321   public:
01323     T0() {}
01324 
01326 
01329     T0(const T0 &t0){}
01330 
01332 
01335     T0(const T1 &t1){}
01336 
01338 
01342     T0(container_type *container, node_type* p){}
01343 
01345 
01348     bool operator==(const T0& other) const{}
01349 
01351 
01354     bool operator!=(const T0& other) const{}
01355 
01357 
01360     bool operator==(const T1& other) const{}
01361 
01363 
01366     bool operator!=(const T1& other) const{}
01367 
01369 
01374     T0& operator++(){}
01375 
01377 
01382     T0 operator++(int){}
01383 
01385 
01390     T0& operator--(){}
01391 
01393 
01398     T0 operator--(int){}
01399 
01401 
01406     reference operator*() const{}
01407 
01409 
01414     pointer operator->() const{}
01415 
01417 
01420     bool operator<(const T0 &other) const{}
01421 
01423 
01426     bool operator<=(const T0 &other) const{}
01427 
01429 
01432     bool operator>(const T0 &other) const{}
01433 
01435 
01438     bool operator>=(const T0 &other) const{}
01439 
01441 
01444     bool operator<(const T1 &other) const{}
01445 
01447 
01450     bool operator<=(const T1 &other) const{}
01451 
01453 
01456     bool operator>(const T1 &other) const{}
01457 
01459 
01462     bool operator>=(const T1 &other) const{}
01463   };
01464 
01466 
01469   class T1 : public std::iterator<std::bidirectional_iterator_tag, value_type, ptrdiff_t, const value_type*, const value_type&>
01470   {
01471   public:
01472     typedef std::iterator<std::bidirectional_iterator_tag, value_type> baseclass;
01473     typedef std::random_acces_iterator_tag iterator_category;
01474     typedef typename baseclass::value_type value_type;
01475     typedef typename const baseclass::value_type* pointer;
01476     typedef typename const baseclass::value_type& reference;
01477     typedef ptrdiff_t difference_type;
01478 
01479     friend T0;
01480     friend container_type;
01481   private:
01482     const container_type *container; 
01483     const node_type* node; 
01484   public:
01486     T1() {}
01487 
01489 
01492     T1(const T1 &t1){}
01493 
01495 
01498     T1(const T0 &t0){}
01499 
01501 
01505     T1(container_type *container, node_type* p){}
01506 
01508 
01511     bool operator==(const T0& other) const{}
01512 
01514 
01517     bool operator!=(const T0& other) const{}
01518 
01520 
01523     bool operator==(const T1& other) const{}
01524 
01526 
01529     bool operator!=(const T1& other) const{}
01530 
01532 
01537     T1& operator++(){}
01538 
01540 
01545     T1 operator++(int){}
01546 
01548 
01553     T1& operator--(){}
01554 
01556 
01561     T1 operator--(int){}
01562 
01564 
01569     reference operator*() const{}
01570 
01572 
01577     pointer operator->() const{}
01578 
01580 
01583     bool operator<(const T0 &other) const{}
01584 
01586 
01589     bool operator<=(const T0 &other) const{}
01590 
01592 
01595     bool operator>(const T0 &other) const{}
01596 
01598 
01601     bool operator>=(const T0 &other) const{}
01602 
01604 
01607     bool operator<(const T1 &other) const{}
01608 
01610 
01613     bool operator<=(const T1 &other) const{}
01614 
01616 
01619     bool operator>(const T1 &other) const{}
01620 
01622 
01625     bool operator>=(const T1 &other) const{}
01626   };
01627 
01628 
01630 
01634   MultiAccessSkipList(){}
01635 
01637 
01643   explicit MultiAccessSkipList(size_type maxNodes){}
01644 
01646 
01650   MultiAccessSkipList(double probability, unsigned int maxLevel){}
01651 
01653 
01658   MultiAccessSkipList(const container_type &source){}
01659 
01661 
01668   template<class InIt> MultiAccessSkipList(InIt first, InIt last){}
01669 
01671 
01677   template<class InIt> MultiAccessSkipList(InIt first, InIt last, double probability, unsigned int maxLevel){}
01678 
01680 
01688   template<class InIt> MultiAccessSkipList(InIt first, InIt last, size_type maxNodes){}
01689 
01691 
01697   explicit MultiAccessSkipList(const key_compare& comp){}
01698 
01700 
01708   template<class InIt> MultiAccessSkipList(InIt first, InIt last, const key_compare& comp){}
01709 
01711 
01718   template<class InIt> MultiAccessSkipList(InIt first, InIt last, const key_compare& comp, double probability, unsigned int maxLevel){}
01719 
01721 
01730   template<class InIt> MultiAccessSkipList(InIt first, InIt last, const key_compare& comp, size_type maxNodes) : Compare(comp){}
01731 
01733 
01736   ~MultiAccessSkipList(){}
01737 
01738 
01740 
01746   container_type& operator=(const container_type &source){}
01747 
01749 
01752   iterator begin(){}
01753 
01755 
01758   iterator end(){}
01759 
01761 
01764   const_iterator begin() const{}
01765 
01767 
01770   const_iterator end() const{}
01771 
01773 
01776   reverse_iterator rbegin(){}
01777 
01779 
01782   reverse_iterator rend(){}
01783 
01785 
01788   const_reverse_iterator rbegin() const{}
01789 
01791 
01794   const_reverse_iterator rend() const{}
01795 
01797 
01800   size_type size() const{}
01801 
01803 
01806   bool empty() const{}
01807 
01809 
01812   reference front(){}
01813 
01815 
01818   const_reference front() const{}
01819 
01821 
01824   reference back(){}
01825 
01827 
01830   const_reference back() const{}
01831 
01833   void pop_front(){}
01834 
01836   void destroy_front(){}
01837 
01839   void pop_back(){}
01840 
01842   void destroy_back(){}
01843 
01845 
01849   template<class InIt> void assign(InIt first, InIt last){}
01850 
01852 
01856   iterator insert(const value_type& val){}
01857 
01859 
01865   iterator insert(const iterator &where, const value_type& val) {}
01866 
01868 
01872   template<class InIt> void insert(InIt first, InIt last) {}
01873 
01875   void clear(){}
01876 
01878   void destroy(){}
01879 
01881   iterator erase(const iterator &where){}
01882 
01884   iterator destroy(const iterator &where){}
01885 
01887 
01894   iterator erase(const iterator &first, const iterator &last){}
01895 
01897 
01904   iterator destroy(const iterator &first, const iterator &last){}
01905 
01907 
01911   size_type erase(const key_type &keyval){}
01912 
01914 
01918   size_type destroy(const key_type &keyval){}
01919 
01921 
01924   void swap(container_type& right) {}
01925 
01927 
01930   template<class Pr1> void erase_if(Pr1 pred);
01931 
01933 
01936   template<class Pr4> void destroy_if(Pr4 pred);
01937 
01939 
01950   void cut(const iterator &first, const iterator &last, container_type& right);
01951 
01953   key_compare key_comp() const { }
01954 
01956   value_compare value_comp() const { }
01957 
01959   size_type max_size() const{}
01960 
01962 
01969   const key_type& key(const value_type& value) const {}
01970 
01972 
01979   mapped_type& value(value_type& value) {}
01980 
01982 
01986   iterator find(const key_type& keyval) {}
01987 
01989 
01993   const_iterator find(const key_type& keyval) const {}
01994 
01996 
02000   size_type count(const key_type& keyval) const {}
02001 
02002 
02004 
02008   iterator lower_bound(const key_type& keyval) {}
02009 
02011 
02015   const_iterator lower_bound(const key_type& keyval) const {}
02016 
02018 
02022   iterator upper_bound(const key_type& keyval) {}
02023 
02025 
02029   const_iterator upper_bound(const key_type& keyval) const {}
02030 
02032 
02036   ipair equal_range(const key_type& keyval) {}
02037 
02039 
02043   const_ipair equal_range(const key_type& keyval) const {}
02044 };
02045 
02047 
02052 template <class K, class T, class A, class Pr, class R>
02053 bool operator==(const MultiAccessSkipList<K,T,A,Pr,R> &left, const MultiAccessSkipList<K,T,A,Pr,R> &right)
02054 {
02055   return ((left.size() == right.size()) &&
02056           (std::equal(left.begin(), left.end(), right.begin())));
02057 }
02058 
02060 
02065 template <class K, class T, class A, class Pr, class R>
02066 bool operator!=(const MultiAccessSkipList<K,T,A,Pr,R> &left, const MultiAccessSkipList<K,T,A,Pr,R> &right)
02067 {
02068   return !(left==right);
02069 }
02070 
02072 
02077 template <class K, class T, class A, class Pr, class R>
02078 bool operator<(const MultiAccessSkipList<K,T,A,Pr,R> &left, const MultiAccessSkipList<K,T,A,Pr,R> &right)
02079 {
02080   return lexicographical_compare(left.begin(),left.end(),right.begin(),right.end(),left.value_comp());
02081 }
02082 
02084 
02089 template <class K, class T, class A, class Pr, class R>
02090 bool operator<=(const MultiAccessSkipList<K,T,A,Pr,R> &left, const MultiAccessSkipList<K,T,A,Pr,R> &right)
02091 {
02092   return !(right < left);
02093 }
02094 
02096 
02101 template <class K, class T, class A, class Pr, class R>
02102 bool operator>(const MultiAccessSkipList<K,T,A,Pr,R> &left, const MultiAccessSkipList<K,T,A,Pr,R> &right)
02103 {
02104   return (right < left);
02105 }
02106 
02108 
02113 template <class K, class T, class A, class Pr, class R>
02114 bool operator>=(const MultiAccessSkipList<K,T,A,Pr,R> &left, const MultiAccessSkipList<K,T,A,Pr,R> &right)
02115 {
02116   return !(left < right);
02117 }
02118 
02119 
02120 /*#define csarg1 template <class T, class Pr, class R>
02121 #define csarg2 MultiAccessSkipList<K,T,A,Pr,R>
02122 CSDefineCompOps(csarg1, csarg2)
02123 #undef csarg1
02124 #undef csarg2
02125 */
 All Classes Files Functions Variables Typedefs