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

Unstable LoserTree variant. More...

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

Inheritance graph

List of all members.

Public Member Functions

Protected Attributes


Detailed Description

template<typename T, typename Comparator>
class __gnu_parallel::LoserTree< false, T, Comparator >

Unstable LoserTree variant.

Stability (non-stable here) is selected with partial specialization.

Definition at line 251 of file losertree.h.


Member Function Documentation

template<typename T , typename Comparator >
void __gnu_parallel::LoserTree< false, T, Comparator >::delete_min_insert ( key,
bool  sup 
) [inline]

Delete the key smallest element and insert the element key instead.

Parameters:
key the key to insert
sup true iff key is an explicitly marked supremum

Definition at line 312 of file losertree.h.

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.

template<typename T , typename Comparator >
unsigned int __gnu_parallel::LoserTree< false, T, Comparator >::init_winner ( unsigned int  root  )  [inline]

Computes the winner of the competition at position "root".

Called recursively (starting at 0) to build the initial tree.

Parameters:
root index of the "game" to start.

Definition at line 273 of file losertree.h.

References std::left(), and std::right().

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

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

Comparator to use.

Definition at line 80 of file losertree.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 file losertree.h.

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

LoserTree elements.

Definition at line 77 of file losertree.h.


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

Generated on Tue Apr 21 13:14:06 2009 for libstdc++ by  doxygen 1.5.8