#include <sort_stream.h>

Public Member Functions | |
| runs_creator (Cmp_ c, unsigned_type memory_to_use) | |
| Creates the object. | |
| void | push (const value_type &val) |
| Adds new element to the current run. | |
| void | finish () |
| Finishes current run and begins new one. | |
| const sorted_runs_type & | result () |
| Returns the sorted runs object. | |
A specialization of runs_creator that allows to create sorted runs data structure usable for runs_merger from sequences of elements in sorted order.
Template parameters:
ValueType_ type of values (parameter for from_sorted_sequences strategy)Cmp_ type of comparison object used for sorting the runsBlockSize_ size of blocks used to store the runsAllocStr_ functor that defines allocation strategy for the runs | stream::runs_creator< from_sorted_sequences< ValueType_ >, Cmp_, BlockSize_, AllocStr_ >::runs_creator | ( | Cmp_ | c, | |
| unsigned_type | memory_to_use | |||
| ) | [inline] |
Creates the object.
| c | comparator object | |
| memory_to_use | memory amount that is allowed to used by the sorter in bytes. Recommended value: 2 * block_size * D |
| void stream::runs_creator< from_sorted_sequences< ValueType_ >, Cmp_, BlockSize_, AllocStr_ >::finish | ( | ) | [inline] |
| void stream::runs_creator< from_sorted_sequences< ValueType_ >, Cmp_, BlockSize_, AllocStr_ >::push | ( | const value_type & | val | ) | [inline] |
Adds new element to the current run.
| val | value to be added to the current run |
References block_manager::new_blocks().
| const sorted_runs_type& stream::runs_creator< from_sorted_sequences< ValueType_ >, Cmp_, BlockSize_, AllocStr_ >::result | ( | ) | [inline] |
Returns the sorted runs object.
runs_merger object as input
1.5.7.1