tlx
|
Guarded loser tree, using pointers to the elements instead of copying them into the tree nodes. More...
#include <loser_tree.hpp>
Public Types | |
using | Super |
using | Source |
![]() | |
using | Source |
size of counters and array indexes | |
Public Member Functions | |
LoserTreePointer (Source k, const Comparator &cmp=Comparator()) | |
void | delete_min_insert (const ValueType *keyp, bool sup) |
![]() | |
LoserTreePointerBase (Source k, const Comparator &cmp=Comparator()) | |
LoserTreePointerBase (const LoserTreePointerBase &)=delete | |
LoserTreePointerBase (LoserTreePointerBase &&)=default | |
LoserTreePointerBase & | operator= (const LoserTreePointerBase &)=delete |
LoserTreePointerBase & | operator= (LoserTreePointerBase &&)=default |
Source | min_source () |
return the index of the player with the smallest element. | |
void | insert_start (const ValueType *keyp, const Source &source, bool sup) |
Initializes the player source with the element key. | |
Source | init_winner (const Source &root) |
Computes the winner of the competition at player root. | |
void | init () |
Additional Inherited Members | |
![]() | |
static constexpr Source | invalid_ |
sentinel for invalid or finished Sources | |
![]() | |
const Source | ik_ |
number of nodes | |
const Source | k_ |
log_2(ik) next greater power of 2 | |
SimpleVector< Loser > | losers_ |
array containing loser tree nodes | |
Comparator | cmp_ |
the comparator object | |
Guarded loser tree, using pointers to the elements instead of copying them into the tree nodes.
Unstable specialization of LoserTreeCopyBase.
Guarding is done explicitly through one flag sup per element, inf is not needed due to a better initialization routine. This is a well-performing variant.
Definition at line 478 of file loser_tree.hpp.
using Source |
Definition at line 483 of file loser_tree.hpp.
using Super |
Definition at line 482 of file loser_tree.hpp.
|
inlineexplicit |
Definition at line 491 of file loser_tree.hpp.
|
inline |
Definition at line 494 of file loser_tree.hpp.