__GNU_PARALLEL::LOSERTREE(3)
πΈ NAME πΈ
okay so bestie, welcome to the __gnu_para...::LoserTree(3) page from the Library Functions Manual β this one is all about __gnu_parallel::LoserTree, and it is the Stable LoserTree variant. π
β¨ SYNOPSIS β¨
Inherits LoserTreeBase< T, Comparator >.
π 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_kComparator compbool first_insertunsigned int ikunsigned int kLoser * losersunsigned int offset
π Detailed Description π
template<bool stable, typename T, typename Comparator> class
__gnu_parallel::LoserTree< stable, T, Comparator >
Stable LoserTree variant.
Provides the stable implementations of insert_start, init_winner, init and delete_min_insert.
Unstable variant is done using partial specialisation below. π«Ά
Definition at line 165 of file losertree.h.
π Member Function Documentation π
delete_min_insert β the stable main character β¨
template<bool stable, typename T , typename Comparator > void
__gnu_parallel::LoserTree< stable, T, Comparator >::delete_min_insert (T
key, bool sup) [inline]
Delete the smallest element and insert a new element from the previously smallest element's sequence.
This implementation is stable. π
Definition at line 215 of file losertree.h.
get_min_source β inherited icon behavior π
int __gnu_parallel::LoserTreeBase< T , Comparator >::get_min_source ()
[inline, inherited]
Returns: the index of the sequence with the smallest element.
Definition at line 152 of file losertree.h.
References __gnu_parallel::LoserTreeBase< T, Comparator >::losers, and __gnu_parallel::LoserTreeBase< T, Comparator >::LoserTreeBase::Loser::source.
insert_start β inherited setup bestie π§
void __gnu_parallel::LoserTreeBase< T , Comparator >::insert_start (const T
& key, int source, bool sup) [inline, inherited]
Initializes the sequence 'source' with the element 'key'. π
Parameters:
keythe element to insertsourceindex of the source sequencesupflag 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 >::LoserTreeBase::Loser::key, __gnu_parallel::LoserTreeBase< T, Comparator >::losers, __gnu_parallel::LoserTreeBase< T, Comparator >::LoserTreeBase::Loser::source, and __gnu_parallel::LoserTreeBase< T, Comparator >::LoserTreeBase::Loser::sup.
π¦ Member Data Documentation π¦
unsigned int __gnu_parallel::LoserTreeBase< T , Comparator >::_M_log_k [protected, inherited]βlog_2{k}. Definition at line 74 of filelosertree.h.Comparator __gnu_parallel::LoserTreeBase< T , Comparator >::comp [protected, inherited]β Comparator to use. Definition at line 80 of filelosertree.h.bool __gnu_parallel::LoserTreeBase< T , Comparator >::first_insert [protected, inherited]β State flag that determines whether the LoserTree is empty. Only used for building the LoserTree. Definition at line 87 of filelosertree.h.Loser* __gnu_parallel::LoserTreeBase< T, Comparator >::losers [protected, inherited]β LoserTree elements. Definition at line 77 of filelosertree.h.
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. π
xoxo bestie π β this cutie came from libstdc++, dated 21 Apr 2009, and we're on the __gnu_para...::LoserTree(3) page. ππ¦
π¦ where this page comes from
- nixpkgs unstable: std-man-pages 4.4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms