Claw
1.7.3
|
A class to manage sets of ordered items. More...
#include <ordered_set.hpp>
Public Types | |
typedef super::const_iterator | const_iterator |
The type of the iterator used to access non modifiable values. | |
typedef super::value_type | value_type |
The type of the values in the set. | |
typedef super::referent_type | referent_type |
The type passed to the template. | |
typedef super::const_reference | const_reference |
The type of a const reference on the values. | |
Public Types inherited from claw::avl< K, Comp > | |
typedef K | value_type |
The type of the values in the tree. | |
typedef K | key_type |
The type of the keys in the tree. | |
typedef K | referent_type |
The type passed to the template. | |
typedef Comp | key_less |
The comparator to use to compare the keys. | |
typedef const K & | const_reference |
The type of a const reference on the values. | |
typedef impl_type::avl_const_iterator | const_iterator |
The type of the iterator on the values of the tree. |
Public Member Functions | |
ordered_set & | operator*= (const ordered_set &that) |
Intersection. | |
ordered_set & | operator+= (const ordered_set &that) |
Union. | |
ordered_set & | operator-= (const ordered_set &that) |
Difference. | |
ordered_set & | operator/= (const ordered_set &that) |
Symetric difference. | |
bool | operator> (const ordered_set &that) const |
Inclusion. | |
bool | operator>= (const ordered_set &that) const |
Inclusion or equality. | |
bool | operator< (const ordered_set &that) const |
Inclusion. | |
bool | operator<= (const ordered_set &that) const |
Inclusion or equality. | |
ordered_set & | intersection (const ordered_set &that) |
Intersection. | |
ordered_set & | join (const ordered_set &that) |
Union. | |
ordered_set & | difference (const ordered_set &that) |
Difference. | |
ordered_set & | symetric_difference (const ordered_set &that) |
Symetric difference. | |
bool | contains (const ordered_set &that) const |
Inclusion or equality. | |
bool | strictly_contains (const ordered_set &that) const |
Inclusion. | |
Public Member Functions inherited from claw::avl< K, Comp > | |
avl () | |
AVL constructor. | |
avl (const avl< K, Comp > &that) | |
AVL copy constructor. | |
template<typename InputIterator > | |
avl (InputIterator first, InputIterator last) | |
Constructor from a range. | |
void | insert (const K &key) |
Add a value in a tree. | |
template<typename InputIterator > | |
void | insert (InputIterator first, InputIterator last) |
Add a range of items in the tree. | |
void | erase (const K &key) |
Delete a value in a tree. | |
void | clear () |
Clear a tree. | |
unsigned int | size () const |
Get the size of a tree. | |
bool | empty () const |
Tell if a tree is empty or not. | |
const_iterator | begin () const |
Get an iterator on the nodes of the tree. | |
const_iterator | end () const |
Get an iterator after the end of the tree. | |
const_iterator | find (const K &key) const |
Get an iterator on the nodes of the tree from a specified key. | |
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. | |
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. | |
const_iterator | lower_bound () const |
Get an iterator on the lowest value of the tree. | |
const_iterator | upper_bound () const |
Get an iterator on the gratest value of the tree. | |
avl< K, Comp > & | operator= (const avl< K, Comp > &that) |
Assignment. | |
bool | operator== (const avl< K, Comp > &that) const |
Equality. | |
bool | operator!= (const avl< K, Comp > &that) const |
Disequality. | |
bool | operator< (const avl< K, Comp > &that) const |
Less than operator. | |
bool | operator> (const avl< K, Comp > &that) const |
Greater than operator. | |
bool | operator<= (const avl< K, Comp > &that) const |
Less or equal operator. | |
bool | operator>= (const avl< K, Comp > &that) const |
Greater or equal operator. |
A class to manage sets of ordered items.
Definition at line 44 of file ordered_set.hpp.
bool claw::math::ordered_set< K, Comp >::contains | ( | const ordered_set< K, Comp > & | that | ) | const |
Inclusion or equality.
that | The instance that should be contained. |
Definition at line 223 of file ordered_set.tpp.
References claw::avl< K, Comp >::begin(), claw::avl< K, Comp >::end(), and claw::avl< K, Comp >::size().
Referenced by claw::math::ordered_set< K, Comp >::operator<=().
claw::math::ordered_set< K, Comp > & claw::math::ordered_set< K, Comp >::difference | ( | const ordered_set< K, Comp > & | that | ) |
Difference.
that | The instance from which to remove items. |
Definition at line 184 of file ordered_set.tpp.
References claw::avl< K, Comp >::end(), and claw::avl< K, Comp >::find().
Referenced by claw::math::ordered_set< K, Comp >::symetric_difference().
claw::math::ordered_set< K, Comp > & claw::math::ordered_set< K, Comp >::intersection | ( | const ordered_set< K, Comp > & | that | ) |
Intersection.
that | The instance to intersect from. |
Definition at line 143 of file ordered_set.tpp.
References claw::avl< K, Comp >::end(), and claw::avl< K, Comp >::find().
claw::math::ordered_set< K, Comp > & claw::math::ordered_set< K, Comp >::join | ( | const ordered_set< K, Comp > & | that | ) |
Union.
that | The instance to join with. |
Definition at line 167 of file ordered_set.tpp.
References claw::avl< K, Comp >::begin(), and claw::avl< K, Comp >::end().
claw::math::ordered_set< K, Comp > & claw::math::ordered_set< K, Comp >::operator*= | ( | const ordered_set< K, Comp > & | that | ) |
Intersection.
that | The instance to intersect from. |
Definition at line 43 of file ordered_set.tpp.
claw::math::ordered_set< K, Comp > & claw::math::ordered_set< K, Comp >::operator+= | ( | const ordered_set< K, Comp > & | that | ) |
claw::math::ordered_set< K, Comp > & claw::math::ordered_set< K, Comp >::operator-= | ( | const ordered_set< K, Comp > & | that | ) |
Difference.
that | The instance from which to remove items. |
Definition at line 67 of file ordered_set.tpp.
claw::math::ordered_set< K, Comp > & claw::math::ordered_set< K, Comp >::operator/= | ( | const ordered_set< K, Comp > & | that | ) |
Symetric difference.
that | The instance to differ from. |
Definition at line 79 of file ordered_set.tpp.
bool claw::math::ordered_set< K, Comp >::operator< | ( | const ordered_set< K, Comp > & | that | ) | const |
Inclusion.
that | The instance that should contain. |
Definition at line 118 of file ordered_set.tpp.
References claw::math::ordered_set< K, Comp >::strictly_contains().
bool claw::math::ordered_set< K, Comp >::operator<= | ( | const ordered_set< K, Comp > & | that | ) | const |
Inclusion or equality.
that | The instance that should be contained. |
Definition at line 131 of file ordered_set.tpp.
References claw::math::ordered_set< K, Comp >::contains().
bool claw::math::ordered_set< K, Comp >::operator> | ( | const ordered_set< K, Comp > & | that | ) | const |
Inclusion.
that | The instance that should be contained. |
Definition at line 92 of file ordered_set.tpp.
bool claw::math::ordered_set< K, Comp >::operator>= | ( | const ordered_set< K, Comp > & | that | ) | const |
Inclusion or equality.
that | The instance that should be contained. |
Definition at line 105 of file ordered_set.tpp.
bool claw::math::ordered_set< K, Comp >::strictly_contains | ( | const ordered_set< K, Comp > & | that | ) | const |
Inclusion.
that | The instance that should contain. |
Definition at line 252 of file ordered_set.tpp.
References claw::avl< K, Comp >::size().
Referenced by claw::math::ordered_set< K, Comp >::operator<().
claw::math::ordered_set< K, Comp > & claw::math::ordered_set< K, Comp >::symetric_difference | ( | const ordered_set< K, Comp > & | that | ) |
Symetric difference.
that | The instance to differ from. |
Definition at line 208 of file ordered_set.tpp.
References claw::math::ordered_set< K, Comp >::difference().