TPIE

v1.1rc1-6-g0c97303
merge.h File Reference

Merge management objects. More...

#include <tpie/portability.h>
#include <cmath>
#include <tpie/stream.h>
#include <tpie/memory.h>
#include <tpie/tpie_assert.h>

Go to the source code of this file.

Classes

class  tpie::ami::merge_base< T >
 Superclass for merge management objects. More...
 
class  tpie::ami::merge_base< T >
 Superclass for merge management objects. More...
 

Namespaces

 tpie
 TPIE's namespace.
 
 tpie::ami
 The namespace within TPIE for the Access Method Interface elements.
 

Macros

#define CONST   const
 

Typedefs

typedef int tpie::merge_flag
 Intended to signal in a merge which of the input streams are non-empty. More...
 
typedef TPIE_OS_SIZE_T tpie::arity_t
 Intended to signal the number of input streams in a merge. More...
 

Enumerations

enum  tpie::ami::merge_output_type { MERGE_OUTPUT_OVERWRITE = 1, MERGE_OUTPUT_APPEND }
 

Functions

template<class T , class M >
err tpie::ami::merge (stream< T > **instreams, arity_t arity, stream< T > *outstream, M *m_obj)
 Merges arity streams using a merge management object and writes result into outstream. More...
 
template<class T , class M >
err tpie::ami::partition_and_merge (stream< T > *instream, stream< T > *outstream, M *m_obj)
 Partitions a stream into substreams small enough to fit. More...
 
template<class T , class M >
err tpie::ami::single_merge (stream< T > **instreams, arity_t arity, stream< T > *outstream, M *m_obj)
 Merges arity streams in memory using a merge management object and write result into outstream. More...
 
template<class T , class M >
err tpie::ami::main_mem_merge (stream< T > *instream, stream< T > *outstream, M *m_obj)
 Reads instream in memory and merges it using m_obj->main_mem_operate(); if instream does not fit in main memory returns INSUFFICIENT_MAIN_MEMORY;. More...
 

Detailed Description

Merge management objects.

Definition in file merge.h.