Stxxl  1.3.2
Public Types | Public Member Functions | List of all members
stream::sort< Input_, Cmp_, BlockSize_, AllocStr_, runs_creator_type > Class Template Reference

Produces sorted stream from input stream. More...

#include <sort_stream.h>

Inherits noncopyable.

Public Types

typedef Input_::value_type value_type
 Standard stream typedef. More...
 

Public Member Functions

 sort (Input_ &in, Cmp_ c, unsigned_type memory_to_use)
 Creates the object. More...
 
 sort (Input_ &in, Cmp_ c, unsigned_type memory_to_use_rc, unsigned_type memory_to_use_m)
 Creates the object. More...
 
bool empty () const
 Standard stream method. More...
 
const value_typeoperator* () const
 Standard stream method. More...
 
const value_typeoperator-> () const
 
sortoperator++ ()
 Standard stream method. More...
 

Detailed Description

template<class Input_, class Cmp_, unsigned BlockSize_ = STXXL_DEFAULT_BLOCK_SIZE(typename Input_::value_type), class AllocStr_ = STXXL_DEFAULT_ALLOC_STRATEGY, class runs_creator_type = runs_creator<Input_, Cmp_, BlockSize_, AllocStr_>>
class stream::sort< Input_, Cmp_, BlockSize_, AllocStr_, runs_creator_type >

Produces sorted stream from input stream.

Template Parameters
Input_type of the input stream
Cmp_type of comparison object used for sorting the runs
BlockSize_size of blocks used to store the runs
AllocStr_functor that defines allocation strategy for the runs
Remarks
Implemented as the composition of runs_creator and runs_merger .

Member Typedef Documentation

template<class Input_ , class Cmp_ , unsigned BlockSize_ = STXXL_DEFAULT_BLOCK_SIZE(typename Input_::value_type), class AllocStr_ = STXXL_DEFAULT_ALLOC_STRATEGY, class runs_creator_type = runs_creator<Input_, Cmp_, BlockSize_, AllocStr_>>
typedef Input_::value_type stream::sort< Input_, Cmp_, BlockSize_, AllocStr_, runs_creator_type >::value_type

Standard stream typedef.

Constructor & Destructor Documentation

template<class Input_ , class Cmp_ , unsigned BlockSize_ = STXXL_DEFAULT_BLOCK_SIZE(typename Input_::value_type), class AllocStr_ = STXXL_DEFAULT_ALLOC_STRATEGY, class runs_creator_type = runs_creator<Input_, Cmp_, BlockSize_, AllocStr_>>
stream::sort< Input_, Cmp_, BlockSize_, AllocStr_, runs_creator_type >::sort ( Input_ &  in,
Cmp_  c,
unsigned_type  memory_to_use 
)
inline

Creates the object.

Parameters
ininput stream
ccomparator object
memory_to_usememory amount that is allowed to used by the sorter in bytes
template<class Input_ , class Cmp_ , unsigned BlockSize_ = STXXL_DEFAULT_BLOCK_SIZE(typename Input_::value_type), class AllocStr_ = STXXL_DEFAULT_ALLOC_STRATEGY, class runs_creator_type = runs_creator<Input_, Cmp_, BlockSize_, AllocStr_>>
stream::sort< Input_, Cmp_, BlockSize_, AllocStr_, runs_creator_type >::sort ( Input_ &  in,
Cmp_  c,
unsigned_type  memory_to_use_rc,
unsigned_type  memory_to_use_m 
)
inline

Creates the object.

Parameters
ininput stream
ccomparator object
memory_to_use_rcmemory amount that is allowed to used by the runs creator in bytes
memory_to_use_mmemory amount that is allowed to used by the merger in bytes

Member Function Documentation

template<class Input_ , class Cmp_ , unsigned BlockSize_ = STXXL_DEFAULT_BLOCK_SIZE(typename Input_::value_type), class AllocStr_ = STXXL_DEFAULT_ALLOC_STRATEGY, class runs_creator_type = runs_creator<Input_, Cmp_, BlockSize_, AllocStr_>>
bool stream::sort< Input_, Cmp_, BlockSize_, AllocStr_, runs_creator_type >::empty ( ) const
inline
template<class Input_ , class Cmp_ , unsigned BlockSize_ = STXXL_DEFAULT_BLOCK_SIZE(typename Input_::value_type), class AllocStr_ = STXXL_DEFAULT_ALLOC_STRATEGY, class runs_creator_type = runs_creator<Input_, Cmp_, BlockSize_, AllocStr_>>
const value_type& stream::sort< Input_, Cmp_, BlockSize_, AllocStr_, runs_creator_type >::operator* ( ) const
inline
template<class Input_ , class Cmp_ , unsigned BlockSize_ = STXXL_DEFAULT_BLOCK_SIZE(typename Input_::value_type), class AllocStr_ = STXXL_DEFAULT_ALLOC_STRATEGY, class runs_creator_type = runs_creator<Input_, Cmp_, BlockSize_, AllocStr_>>
sort& stream::sort< Input_, Cmp_, BlockSize_, AllocStr_, runs_creator_type >::operator++ ( )
inline

Standard stream method.


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