Public Types | Public Member Functions | Protected Types | Protected Member Functions

stream::basic_runs_merger< RunsType_, Cmp_, AllocStr_ > Class Template Reference
[Stream package]

Merges sorted runs. More...

#include <sort_stream.h>

Inheritance diagram for stream::basic_runs_merger< RunsType_, Cmp_, AllocStr_ >:
Inheritance graph
[legend]
Collaboration diagram for stream::basic_runs_merger< RunsType_, Cmp_, AllocStr_ >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef
sorted_runs_type::value_type 
value_type
 Standard stream typedef.

Public Member Functions

 basic_runs_merger (const sorted_runs_type &r, value_cmp c, unsigned_type memory_to_use)
 Creates a runs merger object.
bool empty () const
 Standard stream method.
const value_typeoperator* () const
 Standard stream method.
const value_typeoperator-> () const
 Standard stream method.
basic_runs_mergeroperator++ ()
 Standard stream method.
virtual ~basic_runs_merger ()
 Destructor.

Protected Types

typedef RunsType_ sorted_runs_type
typedef AllocStr_ alloc_strategy
typedef sorted_runs_type::size_type size_type
typedef Cmp_ value_cmp
typedef sorted_runs_type::run_type run_type
typedef
sorted_runs_type::block_type 
block_type
typedef block_type out_block_type
typedef run_type::value_type trigger_entry_type
typedef block_prefetcher
< block_type, typename
run_type::iterator > 
prefetcher_type
typedef run_cursor2
< block_type, prefetcher_type
run_cursor_type
typedef
sort_helper::run_cursor2_cmp
< block_type, prefetcher_type,
value_cmp > 
run_cursor2_cmp_type
typedef loser_tree
< run_cursor_type,
run_cursor2_cmp_type > 
loser_tree_type
typedef stxxl::int64 diff_type
typedef std::pair< typename
block_type::iterator, typename
block_type::iterator > 
sequence
typedef std::vector< sequence >
::size_type 
seqs_size_type

Protected Member Functions

void initialize (const sorted_runs_type &r, unsigned_type memory_to_use)

Detailed Description

template<class RunsType_, class Cmp_, class AllocStr_ = stxxl::RC>
class stream::basic_runs_merger< RunsType_, Cmp_, AllocStr_ >

Merges sorted runs.

Template Parameters:
RunsType_ type of the sorted runs, available as runs_creator::sorted_runs_type ,
Cmp_ type of comparison object used for merging
AllocStr_ allocation strategy used to allocate the blocks for storing intermediate results if several merge passes are required

Member Typedef Documentation

template<class RunsType_, class Cmp_, class AllocStr_ = stxxl::RC>
typedef sorted_runs_type::value_type stream::basic_runs_merger< RunsType_, Cmp_, AllocStr_ >::value_type

Standard stream typedef.


Constructor & Destructor Documentation

template<class RunsType_, class Cmp_, class AllocStr_ = stxxl::RC>
stream::basic_runs_merger< RunsType_, Cmp_, AllocStr_ >::basic_runs_merger ( const sorted_runs_type &  r,
value_cmp  c,
unsigned_type  memory_to_use 
) [inline]

Creates a runs merger object.

Parameters:
r input sorted runs object
c comparison object
memory_to_use amount of memory available for the merger in bytes
template<class RunsType_, class Cmp_, class AllocStr_ = stxxl::RC>
virtual stream::basic_runs_merger< RunsType_, Cmp_, AllocStr_ >::~basic_runs_merger (  )  [inline, virtual]

Destructor.

Remarks:
Deallocates blocks of the input sorted runs object

Member Function Documentation

template<class RunsType_, class Cmp_, class AllocStr_ = stxxl::RC>
bool stream::basic_runs_merger< RunsType_, Cmp_, AllocStr_ >::empty (  )  const [inline]
template<class RunsType_, class Cmp_, class AllocStr_ = stxxl::RC>
const value_type& stream::basic_runs_merger< RunsType_, Cmp_, AllocStr_ >::operator* (  )  const [inline]
template<class RunsType_, class Cmp_, class AllocStr_ = stxxl::RC>
basic_runs_merger& stream::basic_runs_merger< RunsType_, Cmp_, AllocStr_ >::operator++ (  )  [inline]

Standard stream method.

template<class RunsType_, class Cmp_, class AllocStr_ = stxxl::RC>
const value_type* stream::basic_runs_merger< RunsType_, Cmp_, AllocStr_ >::operator-> (  )  const [inline]

Standard stream method.


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