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 = LoserTreePointerBase< ValueType, Comparator > |
using | Source = typename Super::Source |
![]() | |
using | Source = uint32_t |
size of counters and array indexes More... | |
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 & | operator= (const LoserTreePointerBase &)=delete |
LoserTreePointerBase (LoserTreePointerBase &&)=default | |
LoserTreePointerBase & | operator= (LoserTreePointerBase &&)=default |
Source | min_source () |
return the index of the player with the smallest element. More... | |
void | insert_start (const ValueType *keyp, const Source &source, bool sup) |
Initializes the player source with the element key. More... | |
Source | init_winner (const Source &root) |
Computes the winner of the competition at player root. More... | |
void | init () |
Protected Attributes | |
const Source | k_ |
log_2(ik) next greater power of 2 More... | |
SimpleVector< Loser > | losers_ |
array containing loser tree nodes More... | |
Comparator | cmp_ |
the comparator object More... | |
![]() | |
const Source | ik_ |
number of nodes More... | |
const Source | k_ |
log_2(ik) next greater power of 2 More... | |
SimpleVector< Loser > | losers_ |
array containing loser tree nodes More... | |
Comparator | cmp_ |
the comparator object More... | |
Additional Inherited Members | |
![]() | |
static constexpr Source | invalid_ |
sentinel for invalid or finished Sources More... | |
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 493 of file loser_tree.hpp.
|
protected |
the comparator object
Definition at line 347 of file loser_tree.hpp.
|
protected |
log_2(ik) next greater power of 2
Definition at line 343 of file loser_tree.hpp.
|
protected |
array containing loser tree nodes
Definition at line 345 of file loser_tree.hpp.