30 #ifndef __CLAW_AVL_HPP__
31 #define __CLAW_AVL_HPP__
42 template <
class K,
class Comp = std::less<K> >
71 template<
typename InputIterator>
72 avl( InputIterator
first, InputIterator last );
74 void insert(
const K& key );
75 template<
typename InputIterator>
76 void insert( InputIterator
first, InputIterator last );
78 void erase(
const K& key );
81 unsigned int size()
const;
95 bool operator<( const avl<K, Comp>& that )
const;
97 bool operator<=( const avl<K, Comp>& that )
const;
109 #endif // __CLAW_AVL_HPP__
void insert(const K &key)
Add a value in a tree.
unsigned int size() const
Get the size of a tree.
const_iterator upper_bound() const
Get an iterator on the gratest value of the tree.
bool operator!=(const avl< K, Comp > &that) const
Disequality.
Binary search tree AVL implementation.
const_iterator end() const
Get an iterator after the end of the tree.
void erase(const K &key)
Delete a value in a tree.
Binary search tree base AVL implementation.
bool operator>(const avl< K, Comp > &that) const
Greater than operator.
Base implementation for the AVL Binary search tree.
impl_type::avl_const_iterator const_iterator
The type of the iterator on the values of the tree.
void clear()
Clear a tree.
K key_type
The type of the keys in the tree.
bool empty() const
Tell if a tree is empty or not.
Fuction object to get the first element of a std::pair.
bool operator==(const avl< K, Comp > &that) const
Equality.
K referent_type
The type passed to the template.
const K & const_reference
The type of a const reference on the values.
bool operator>=(const avl< K, Comp > &that) const
Greater or equal operator.
const_iterator find_nearest_greater(const K &key) const
Get an iterator on the nodes of the tree on the key imediatly after from a specified key...
The avl class implementation.
const_iterator find_nearest_lower(const K &key) const
Get an iterator on the nodes of the tree on the key imediatly before from a specified key...
Comp key_less
The comparator to use to compare the keys.
const_iterator find(const K &key) const
Get an iterator on the nodes of the tree from a specified key.
avl< K, Comp > & operator=(const avl< K, Comp > &that)
Assignment.
const_iterator lower_bound() const
Get an iterator on the lowest value of the tree.
K value_type
The type of the values in the tree.
const_iterator begin() const
Get an iterator on the nodes of the tree.