TPIE

2362a60
merge_sorted_runs.h File Reference

merge_sorted_runs as used in several of TPIE's merge variants More...

#include <tpie/portability.h>
#include <tpie/mergeheap.h>
#include <tpie/progress_indicator_base.h>
#include <tpie/file_stream.h>

Go to the source code of this file.

Namespaces

 tpie
 pipelining/factory_base.h Base class of pipelining factories
 
 tpie::ami
 A version of sort that takes an input stream of elements of type T, and an output stream, and and uses the < operator to sort, see also Sorting in TPIE.
 

Typedefs

typedef TPIE_OS_SIZE_T tpie::ami::arity_t
 Intended to signal the number of input streams in a merge. More...
 

Functions

template<class T , class M >
void tpie::ami::merge_sorted_runs (typename tpie::array< tpie::unique_ptr< file_stream< T > > >::iterator start, typename tpie::array< tpie::unique_ptr< file_stream< T > > >::iterator end, file_stream< T > *outStream, M *MergeHeap, TPIE_OS_OFFSET cutoff=-1, progress_indicator_base *indicator=NULL)
 This is a common merge routine for all of the AMI_merge_sorted, AMI_ptr_merge_sorted and AMI_key_merge_sorted entry points. More...
 
template<class T , class CMPR >
void tpie::ami::merge_sorted (typename tpie::array< std::unique_ptr< file_stream< T > > >::iterator start, typename tpie::array< std::unique_ptr< file_stream< T > > >::iterator end, file_stream< T > *outStream, CMPR *cmp)
 Merging with a heap that contains the records to be merged. More...
 
template<class T , class CMPR >
void tpie::ami::ptr_merge_sorted (typename tpie::array< tpie::unique_ptr< file_stream< T > > >::iterator start, typename tpie::array< tpie::unique_ptr< file_stream< T > > >::iterator end, file_stream< T > *outStream, CMPR *cmp)
 Merging with a heap that keeps a pointer to the records rather than the records themselves: CMPR is the class of the comparison object, and must contain the method compare() which is called from within the merge. More...
 

Detailed Description

merge_sorted_runs as used in several of TPIE's merge variants

See also
sorted_stream_merging

Definition in file merge_sorted_runs.h.