Comparision object based Internal_Sorter_base subclass implementation; uses quick_sort_obj(). More...
#include <tpie/internal_sort.h>
Inherits tpie::ami::Internal_Sorter_Base< T >.
Public Member Functions | |
| Internal_Sorter_Obj (Compare cmp) | |
| Empty constructor. More... | |
| ~Internal_Sorter_Obj () | |
| Empty destructor. More... | |
| void | sort (file_stream< T > *InStr, file_stream< T > *OutStr, TPIE_OS_SIZE_T nItems, progress_indicator_base *pi=0) |
| Reads nItems sequentially from InStr, starting at the current file position; writes the sorted output to OutStr, starting from the current file position. More... | |
| void | allocate (TPIE_OS_SIZE_T nItems) |
Allocate ItemArray as array that can hold nItems. More... | |
| void | deallocate (void) |
| Clean up internal array ItemArray. More... | |
| TPIE_OS_SIZE_T | MaxItemCount (TPIE_OS_SIZE_T memSize) |
Returns maximum number of items that can be sorted using memSize bytes. More... | |
| TPIE_OS_SIZE_T | space_per_item () |
| Returns memory usage in bytes per sort item. More... | |
| TPIE_OS_SIZE_T | space_overhead () |
| Returns fixed memory usage overhead in bytes per class instantiation. More... | |
Protected Attributes | |
| Compare | cmp_o |
| Comparison object used for sorting. More... | |
| array< T > | ItemArray |
| Array that holds items to be sorted. More... | |
| TPIE_OS_SIZE_T | len |
| length of ItemArray More... | |
Comparision object based Internal_Sorter_base subclass implementation; uses quick_sort_obj().
Definition at line 166 of file internal_sort.h.
|
inline |
Empty constructor.
Definition at line 177 of file internal_sort.h.
|
inline |
|
inlineinherited |
Allocate ItemArray as array that can hold nItems.
Definition at line 128 of file internal_sort.h.
|
inlineinherited |
Clean up internal array ItemArray.
Definition at line 134 of file internal_sort.h.
|
inlineinherited |
Returns maximum number of items that can be sorted using memSize bytes.
Definition at line 140 of file internal_sort.h.
| void tpie::ami::Internal_Sorter_Obj< T, Compare >::sort | ( | file_stream< T > * | InStr, |
| file_stream< T > * | OutStr, | ||
| TPIE_OS_SIZE_T | nItems, | ||
| progress_indicator_base * | pi = 0 |
||
| ) |
Reads nItems sequentially from InStr, starting at the current file position; writes the sorted output to OutStr, starting from the current file position.
Definition at line 202 of file internal_sort.h.
References tpie::fractional_subindicator::done(), tpie::fractional_progress::done(), tpie::fractional_progress::id(), tpie::fractional_subindicator::init(), tpie::fractional_progress::init(), tpie::file_stream< T >::read(), tpie::file_stream< T >::seek(), tpie::progress_indicator_base::step(), tp_assert, TPIE_FSI, and tpie::file_stream< T >::truncate().
|
inlineinherited |
Returns fixed memory usage overhead in bytes per class instantiation.
Definition at line 150 of file internal_sort.h.
|
inlineinherited |
Returns memory usage in bytes per sort item.
Definition at line 157 of file internal_sort.h.
|
protected |
Comparison object used for sorting.
Definition at line 171 of file internal_sort.h.
|
protectedinherited |
Array that holds items to be sorted.
Definition at line 82 of file internal_sort.h.
|
protectedinherited |
length of ItemArray
Definition at line 84 of file internal_sort.h.