|
libstdc++
|

Public Member Functions | |
| void | delete_min_insert (T key, bool sup) |
| int | get_min_source () |
| void | init () |
| unsigned int | init_winner (unsigned int root) |
| void | insert_start (const T &key, int source, bool sup) |
| LoserTree (unsigned int _k, Comparator _comp) | |
Protected Attributes | |
| unsigned int | _M_log_k |
| Comparator | comp |
| bool | first_insert |
| unsigned int | ik |
| unsigned int | k |
| Loser * | losers |
| unsigned int | offset |
Unstable LoserTree variant.
Stability (non-stable here) is selected with partial specialization.
Definition at line 251 of file losertree.h.
|
inline |
Delete the key smallest element and insert the element key instead.
| key | the key to insert |
| sup | true iff key is an explicitly marked supremum |
Definition at line 312 of file losertree.h.
|
inlineinherited |
Definition at line 152 of file losertree.h.
References __gnu_parallel::LoserTreeBase< T, Comparator >::losers, and __gnu_parallel::LoserTreeBase< T, Comparator >::Loser::source.
|
inline |
Computes the winner of the competition at position "root".
Called recursively (starting at 0) to build the initial tree.
| root | index of the "game" to start. |
Definition at line 273 of file losertree.h.
References std::left(), and std::right().
|
inlineinherited |
Initializes the sequence "source" with the element "key".
| key | the element to insert |
| source | index of the source sequence |
| sup | flag that determines whether the value to insert is an explicit supremum. |
Definition at line 131 of file losertree.h.
References __gnu_parallel::LoserTreeBase< T, Comparator >::first_insert, __gnu_parallel::LoserTreeBase< T, Comparator >::Loser::key, __gnu_parallel::LoserTreeBase< T, Comparator >::losers, __gnu_parallel::LoserTreeBase< T, Comparator >::Loser::source, and __gnu_parallel::LoserTreeBase< T, Comparator >::Loser::sup.
|
protectedinherited |
log_2{k}
Definition at line 74 of file losertree.h.
Referenced by __gnu_parallel::LoserTreeBase< T, Comparator >::LoserTreeBase().
|
protectedinherited |
Comparator to use.
Definition at line 80 of file losertree.h.
|
protectedinherited |
State flag that determines whether the LoserTree is empty.
Only used for building the LoserTree.
Definition at line 87 of file losertree.h.
Referenced by __gnu_parallel::LoserTreeBase< T, Comparator >::insert_start(), and __gnu_parallel::LoserTreeBase< T, Comparator >::LoserTreeBase().
|
protectedinherited |
LoserTree elements.
Definition at line 77 of file losertree.h.
Referenced by __gnu_parallel::LoserTreeBase< T, Comparator >::get_min_source(), __gnu_parallel::LoserTreeBase< T, Comparator >::insert_start(), __gnu_parallel::LoserTreeBase< T, Comparator >::LoserTreeBase(), and __gnu_parallel::LoserTreeBase< T, Comparator >::~LoserTreeBase().