yat
0.20.3pre
|
#include <yat/utility/Ranking.h>
Public Types | |
typedef T | value_type |
value type | |
typedef Compare | key_compare |
type used to compare elements | |
typedef const T & | reference |
reference | |
typedef const T & | const_reference |
reference | |
typedef const T * | pointer |
pointer | |
typedef const T * | const_pointer |
const pointer | |
typedef size_t | size_type |
size type | |
typedef ranking::Iterator< T > | iterator |
iterator | |
typedef ranking::Iterator< T > | const_iterator |
iterator | |
typedef std::reverse_iterator< iterator > | reverse_iterator |
reverse iterator | |
typedef std::reverse_iterator< const_iterator > | const_reverse_iterator |
reverse iterator | |
Public Member Functions | |
Ranking (void)=default | |
Default constructor. | |
~Ranking (void) | |
Destructor. | |
Ranking (const Compare &c) | |
Ranking (const Ranking &other) | |
Copy constructor. | |
Ranking (Ranking &&other) | |
move constructor | |
Ranking & | operator= (const Ranking &other) |
assignment operator | |
Ranking & | operator= (Ranking &&other) |
move assignment | |
iterator | begin (void) |
const_iterator | begin (void) const |
const_iterator | cbegin (void) const |
iterator | end (void) |
const_iterator | end (void) const |
const_iterator | cend (void) const |
reverse_iterator | rbegin (void) |
reverse_iterator | rend (void) |
const_reverse_iterator | rend (void) const |
const_reverse_iterator | rbegin (void) const |
const_reverse_iterator | crbegin (void) const |
const_reverse_iterator | crend (void) const |
void | clear (void) |
const Compare & | compare (void) const |
bool | empty (void) const |
iterator | erase (const_iterator position) |
size_type | erase (const T &value) |
iterator | erase (const_iterator first, const_iterator last) |
const_iterator | find (const T &x) const |
iterator | insert (const T &element) |
insert an element More... | |
iterator | insert (T &&element) |
insert an element More... | |
iterator | insert (const_iterator hint, const T &element) |
insert with hint More... | |
iterator | insert (const_iterator hint, T &&element) |
insert with hint More... | |
template<typename InputIterator > | |
void | insert (InputIterator first, InputIterator last) |
insert range More... | |
const_iterator | lower_bound (const T &x) const |
const_iterator | upper_bound (const T &x) const |
size_t | ranking (const_iterator it) const |
size_t | size (void) const |
Class is a binary tree with the special extension that it allows fast access to the rank of an element in the tree.
|
inline |
Construct empty container with comparison function c
.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Remove all nodes
|
inline |
access comparison function which is used to sort elements
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
iterator theplu::yat::utility::Ranking< T, Compare >::erase | ( | const_iterator | position | ) |
Remove node pointed to by position
.
Complexity: constant time.
size_type theplu::yat::utility::Ranking< T, Compare >::erase | ( | const T & | value | ) |
Erase all elements that are equivalent with value
Complexity: logarithmic in size of container.
iterator theplu::yat::utility::Ranking< T, Compare >::erase | ( | const_iterator | first, |
const_iterator | last | ||
) |
Remove elements in range [first, last).
Complexity: Linear in number of elements erased.
const_iterator theplu::yat::utility::Ranking< T, Compare >::find | ( | const T & | x | ) | const |
Find an element that is equivalent to x.
Complexity: logarithmic in size of container.
|
inline |
insert an element
Complexity: logarithmic in size of container.
|
inline |
insert an element
Same as insert(const T& element) but moves rather than copy element
.
|
inline |
insert with hint
If hint
will follow the inserted element, the insertion is done in constant time. Otherwise, the usual insert function is called which takes logN.
|
inline |
insert with hint
Same as as insert(const_iterator, const T&) but move instead of copy element
.
|
inline |
insert range
Complexity: N log S, where S is size of container and N is number of inserted elements. If inserted range is sorted, complexity linear, N.
|
inline |
x
Complexity: logarithmic in size of container.
|
inline |
it
Complexity: logarithmic in size of container.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Complexity: constant time
|
inline |
x
Complexity: logarithmic in size of container.