00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00030 #include <cassert>
00031
00032
00037 template<class K, class Comp>
00038 claw::avl<K,Comp>::avl()
00039 {
00040
00041 }
00042
00043
00048 template<class K, class Comp>
00049 claw::avl<K,Comp>::avl( const avl<K, Comp>& that )
00050 : m_tree(that.m_tree)
00051 {
00052
00053 }
00054
00055
00061 template<class K, class Comp>
00062 template<typename InputIterator>
00063 claw::avl<K,Comp>::avl( InputIterator first, InputIterator last )
00064 {
00065 m_tree.insert(first, last);
00066 }
00067
00068
00074 template<class K, class Comp>
00075 void claw::avl<K,Comp>::insert( const K& key )
00076 {
00077 m_tree.insert(key);
00078 }
00079
00080
00088 template<class K, class Comp>
00089 template<typename InputIterator>
00090 void claw::avl<K,Comp>::insert( InputIterator first, InputIterator last )
00091 {
00092 m_tree.insert(first, last);
00093 }
00094
00095
00101 template<class K, class Comp>
00102 void claw::avl<K,Comp>::erase( const K& key )
00103 {
00104 m_tree.erase(key);
00105 }
00106
00107
00112 template<class K, class Comp>
00113 void claw::avl<K,Comp>::clear()
00114 {
00115 m_tree.clear();
00116 }
00117
00118
00123 template<class K, class Comp>
00124 inline unsigned int claw::avl<K,Comp>::size() const
00125 {
00126 return m_tree.size();
00127 }
00128
00129
00134 template<class K, class Comp>
00135 inline bool claw::avl<K,Comp>::empty() const
00136 {
00137 return m_tree.empty();
00138 }
00139
00140
00144 template<class K, class Comp>
00145 typename claw::avl<K,Comp>::const_iterator
00146 claw::avl<K,Comp>::begin() const
00147 {
00148 return m_tree.begin();
00149 }
00150
00151
00155 template<class K, class Comp>
00156 typename claw::avl<K,Comp>::const_iterator claw::avl<K,Comp>::end() const
00157 {
00158 return m_tree.end();
00159 }
00160
00161
00166 template<class K, class Comp>
00167 typename claw::avl<K,Comp>::const_iterator
00168 claw::avl<K,Comp>::find( const K& key ) const
00169 {
00170 return m_tree.find(key);
00171 }
00172
00173
00179 template<class K, class Comp>
00180 typename claw::avl<K,Comp>::const_iterator
00181 claw::avl<K,Comp>::find_nearest_greater( const K& key ) const
00182 {
00183 return m_tree.find_nearest_greater(key);
00184 }
00185
00186
00192 template<class K, class Comp>
00193 typename claw::avl<K,Comp>::const_iterator
00194 claw::avl<K,Comp>::find_nearest_lower( const K& key ) const
00195 {
00196 return m_tree.find_nearest_lower(key);
00197 }
00198
00199
00203 template<class K, class Comp>
00204 typename claw::avl<K,Comp>::const_iterator
00205 claw::avl<K,Comp>::lower_bound() const
00206 {
00207 return m_tree.lower_bound();
00208 }
00209
00210
00214 template<class K, class Comp>
00215 typename claw::avl<K,Comp>::const_iterator
00216 claw::avl<K,Comp>::upper_bound() const
00217 {
00218 return m_tree.upper_bound();
00219 }
00220
00221
00226 template<class K, class Comp>
00227 claw::avl<K, Comp>& claw::avl<K,Comp>::operator=( const avl<K, Comp>& that )
00228 {
00229 m_tree = that.m_tree;
00230 return *this;
00231 }
00232
00233
00238 template<class K, class Comp>
00239 bool claw::avl<K,Comp>::operator==( const avl<K, Comp>& that ) const
00240 {
00241 return m_tree == that.m_tree;
00242 }
00243
00244
00249 template<class K, class Comp>
00250 bool claw::avl<K,Comp>::operator!=( const avl<K, Comp>& that ) const
00251 {
00252 return m_tree != that.m_tree;
00253 }
00254
00255
00260 template<class K, class Comp>
00261 bool claw::avl<K,Comp>::operator<( const avl<K, Comp>& that ) const
00262 {
00263 return m_tree < that.m_tree;
00264 }
00265
00266
00271 template<class K, class Comp>
00272 bool claw::avl<K,Comp>::operator>( const avl<K, Comp>& that ) const
00273 {
00274 return m_tree > that.m_tree;
00275 }
00276
00277
00282 template<class K, class Comp>
00283 bool claw::avl<K,Comp>::operator<=( const avl<K, Comp>& that ) const
00284 {
00285 return m_tree <= that.m_tree;
00286 }
00287
00288
00293 template<class K, class Comp>
00294 bool claw::avl<K,Comp>::operator>=( const avl<K, Comp>& that ) const
00295 {
00296 return m_tree >= that.m_tree;
00297 }