Thrill  0.1
LoserTreePointerUnguardedBase< ValueType, Comparator > Class Template Reference

Detailed Description

template<typename ValueType, typename Comparator = std::less<ValueType>>
class tlx::LoserTreePointerUnguardedBase< ValueType, Comparator >

Unguarded loser tree, keeping only pointers to the elements in the tree structure.

This is a base class for the LoserTreePointerUnguarded<true> and <false> classes.

No guarding is done, therefore not a single input sequence must run empty. This is a very fast variant.

Definition at line 704 of file loser_tree.hpp.

+ Inheritance diagram for LoserTreePointerUnguardedBase< ValueType, Comparator >:
+ Collaboration diagram for LoserTreePointerUnguardedBase< ValueType, Comparator >:

#include <loser_tree.hpp>

Classes

struct  Loser
 Internal representation of a loser tree player/node. More...
 

Public Types

using Source = uint32_t
 size of counters and array indexes More...
 

Public Member Functions

 LoserTreePointerUnguardedBase (const Source &k, const ValueType &sentinel, const Comparator &cmp=Comparator())
 
 LoserTreePointerUnguardedBase (const LoserTreePointerUnguardedBase &other)=delete
 
void init ()
 
Source init_winner (const Source &root)
 
void insert_start (const ValueType *keyp, const Source &source, bool sup)
 
Source min_source ()
 
LoserTreePointerUnguardedBaseoperator= (const LoserTreePointerUnguardedBase &)=delete
 

Static Public Attributes

static constexpr Source invalid_ = Source(-1)
 sentinel for invalid or finished Sources More...
 

Protected Attributes

Comparator cmp_
 the comparator object More...
 
Source ik_
 number of nodes More...
 
Source k_
 log_2(ik) next greater power of 2 More...
 
SimpleVector< Loserlosers_
 array containing loser tree nodes More...
 

The documentation for this class was generated from the following file: