__gnu_parallel::LoserTree< stable, T, Comparator > Class Template Reference

Inheritance diagram for __gnu_parallel::LoserTree< stable, T, Comparator >:

Inheritance graph

List of all members.


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 171 of file losertree.h.

Public Member Functions

Protected Attributes


Member Function Documentation

template<bool stable, typename T, typename Comparator>
void __gnu_parallel::LoserTree< stable, T, Comparator >::delete_min_insert ( 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 221 of file losertree.h.

template<typename T, typename Comparator>
int __gnu_parallel::LoserTreeBase< T, Comparator >::get_min_source (  )  [inline, inherited]

Returns:
the index of the sequence with the smallest element.

Definition at line 158 of file losertree.h.

References __gnu_parallel::LoserTreeBase< T, Comparator >::losers, and __gnu_parallel::LoserTreeBase< T, Comparator >::Loser::source.

template<typename T, typename Comparator>
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:
key the element to insert
source index of the source sequence
sup flag that determines whether the value to insert is an explicit supremum.

Definition at line 137 of file losertree.h.

References __gnu_parallel::LoserTreeBase< T, Comparator >::first_insert, __gnu_parallel::LoserTreeBase< T, Comparator >::Loser::key, __gnu_parallel::LoserTreeBase< T, Comparator >::losers, __gnu_parallel::LoserTreeBase< T, Comparator >::Loser::source, and __gnu_parallel::LoserTreeBase< T, Comparator >::Loser::sup.


Member Data Documentation

template<typename T, typename Comparator>
unsigned int __gnu_parallel::LoserTreeBase< T, Comparator >::_M_log_k [protected, inherited]

log_2{k}

Definition at line 80 of file losertree.h.

Referenced by __gnu_parallel::LoserTreeBase< T, Comparator >::LoserTreeBase().

template<typename T, typename Comparator>
Comparator __gnu_parallel::LoserTreeBase< T, Comparator >::comp [protected, inherited]

Comparator to use.

Definition at line 86 of file losertree.h.

template<typename T, typename Comparator>
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 93 of file losertree.h.

Referenced by __gnu_parallel::LoserTreeBase< T, Comparator >::insert_start(), and __gnu_parallel::LoserTreeBase< T, Comparator >::LoserTreeBase().

template<typename T, typename Comparator>
Loser* __gnu_parallel::LoserTreeBase< T, Comparator >::losers [protected, inherited]


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

Generated on Sat Dec 12 09:40:30 2009 for libstdc++ by  doxygen 1.5.6