STXXL
1.4.0
|
Loser tree from Knuth, "Sorting and Searching", Section 5.4.1.
KNKMAX | maximum arity of loser tree, has to be a power of two |
Definition at line 38 of file pq_losertree.h.
Public Types | |
typedef Cmp_ | comparator_type |
typedef value_type | Element |
typedef ValTp_ | value_type |
Public Member Functions | |
loser_tree () | |
~loser_tree () | |
void | init () |
void | insert_segment (Element *target, unsigned_type length) |
bool | is_sentinel (const Element &a) |
bool | is_space_available () const |
unsigned_type | mem_cons () const |
void | multi_merge (Element *begin, Element *end) |
void | multi_merge (Element *, unsigned_type length) |
bool | not_sentinel (const Element &a) |
unsigned_type | size () const |
void | swap (loser_tree &obj) |
Private Member Functions | |
void | compactTree () |
void | deallocate_segment (unsigned_type slot) |
void | doubleK () |
unsigned_type | initWinner (unsigned_type root) |
bool | is_segment_empty (unsigned_type slot) |
void | multi_merge_k (Element *target, unsigned_type length) |
void | rebuildLoserTree () |
void | update_on_insert (unsigned_type node, const Element &newKey, unsigned_type newIndex, Element *winnerKey, unsigned_type *winnerIndex, unsigned_type *mask) |
Private Member Functions inherited from stxxl::noncopyable | |
noncopyable () | |
Private Attributes | |
comparator_type | cmp |
Element * | current [KNKMAX] |
Element * | current_end [KNKMAX] |
internal_bounded_stack < unsigned_type, KNKMAX > | free_slots |
unsigned_type | k |
unsigned_type | logK |
unsigned_type | mem_cons_ |
Element * | segment [KNKMAX] |
unsigned_type | segment_size [KNKMAX] |
Element | sentinel |
unsigned_type | size_ |
typedef Cmp_ stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::comparator_type |
Definition at line 42 of file pq_losertree.h.
typedef value_type stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::Element |
Definition at line 43 of file pq_losertree.h.
typedef ValTp_ stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::value_type |
Definition at line 41 of file pq_losertree.h.
stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::loser_tree | ( | ) |
Definition at line 208 of file pq_losertree.h.
References stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::current, stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::current_end, stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::free_slots, stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::init(), stxxl::priority_queue_local::internal_bounded_stack< Tp_, max_size_ >::push(), stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::segment, and stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::sentinel.
stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::~loser_tree | ( | ) |
Definition at line 463 of file pq_losertree.h.
References STXXL_VERBOSE1, and STXXL_VERBOSE2.
|
private |
Definition at line 359 of file pq_losertree.h.
References STXXL_VERBOSE3.
|
private |
Definition at line 481 of file pq_losertree.h.
References STXXL_VERBOSE2.
|
private |
Definition at line 328 of file pq_losertree.h.
References STXXL_VERBOSE3.
void stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::init | ( | ) |
Definition at line 220 of file pq_losertree.h.
Referenced by stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::loser_tree().
|
private |
void stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::insert_segment | ( | Element * | target, |
unsigned_type | length | ||
) |
Definition at line 416 of file pq_losertree.h.
References STXXL_VERBOSE2.
|
inlineprivate |
Definition at line 683 of file pq_losertree.h.
|
inline |
Definition at line 157 of file pq_losertree.h.
|
inline |
Definition at line 197 of file pq_losertree.h.
|
inline |
Definition at line 195 of file pq_losertree.h.
|
inline |
Definition at line 189 of file pq_losertree.h.
void stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::multi_merge | ( | Element * | target, |
unsigned_type | length | ||
) |
Definition at line 506 of file pq_losertree.h.
References stxxl::priority_queue_local::merge3_iterator(), stxxl::priority_queue_local::merge4_iterator(), stxxl::priority_queue_local::merge_iterator(), and STXXL_VERBOSE3.
|
private |
|
inline |
Definition at line 161 of file pq_losertree.h.
|
private |
Definition at line 233 of file pq_losertree.h.
|
inline |
Definition at line 203 of file pq_losertree.h.
|
inline |
Definition at line 171 of file pq_losertree.h.
|
private |
|
private |
Definition at line 54 of file pq_losertree.h.
Referenced by stxxl::priority_queue_local::loser_tree< value_type, comparator_type, IntKMAX >::swap().
|
private |
Definition at line 73 of file pq_losertree.h.
Referenced by stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::loser_tree(), and stxxl::priority_queue_local::loser_tree< value_type, comparator_type, IntKMAX >::swap().
|
private |
Definition at line 74 of file pq_losertree.h.
Referenced by stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::loser_tree(), and stxxl::priority_queue_local::loser_tree< value_type, comparator_type, IntKMAX >::swap().
|
private |
Definition at line 56 of file pq_losertree.h.
Referenced by stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::loser_tree(), and stxxl::priority_queue_local::loser_tree< value_type, comparator_type, IntKMAX >::swap().
|
private |
Definition at line 60 of file pq_losertree.h.
Referenced by stxxl::priority_queue_local::loser_tree< value_type, comparator_type, IntKMAX >::swap().
|
private |
Definition at line 59 of file pq_losertree.h.
Referenced by stxxl::priority_queue_local::loser_tree< value_type, comparator_type, IntKMAX >::swap().
|
private |
Definition at line 78 of file pq_losertree.h.
Referenced by stxxl::priority_queue_local::loser_tree< value_type, comparator_type, IntKMAX >::swap().
|
private |
Definition at line 75 of file pq_losertree.h.
Referenced by stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::loser_tree(), and stxxl::priority_queue_local::loser_tree< value_type, comparator_type, IntKMAX >::swap().
|
private |
Definition at line 76 of file pq_losertree.h.
Referenced by stxxl::priority_queue_local::loser_tree< value_type, comparator_type, IntKMAX >::swap().
|
private |
Definition at line 62 of file pq_losertree.h.
Referenced by stxxl::priority_queue_local::loser_tree< ValTp_, Cmp_, KNKMAX >::loser_tree(), and stxxl::priority_queue_local::loser_tree< value_type, comparator_type, IntKMAX >::swap().
|
private |
Definition at line 58 of file pq_losertree.h.
Referenced by stxxl::priority_queue_local::loser_tree< value_type, comparator_type, IntKMAX >::swap().