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 >.
template<class T, class Compare>
class tpie::ami::Internal_Sorter_Obj< T, Compare >
Comparision object based Internal_Sorter_base subclass implementation; uses quick_sort_obj().
Definition at line 166 of file internal_sort.h.
◆ Internal_Sorter_Obj()
template<class T , class Compare >
◆ ~Internal_Sorter_Obj()
template<class T , class Compare >
◆ allocate()
Allocate ItemArray as array that can hold nItems.
Definition at line 128 of file internal_sort.h.
◆ deallocate()
◆ MaxItemCount()
Returns maximum number of items that can be sorted using memSize bytes.
Definition at line 140 of file internal_sort.h.
◆ sort()
template<class T , class Compare >
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.
206 tp_assert ( nItems <=
len,
"Internal buffer overfull (nItems > len)");
209 TPIE_OS_SIZE_T i = 0;
212 if (
ItemArray.
size() == 0)
throw stream_exception(
"NULL_POINTER");
214 tp_assert ( nItems <=
len,
"Internal buffer overfull (nItems > len)");
216 fractional_progress fp(pi);
217 fp.id() << __FILE__ << __FUNCTION__ <<
typeid(T) <<
typeid(Compare);
218 fractional_subindicator read_progress(fp,
"read",
TPIE_FSI, nItems,
"Reading");
219 fractional_subindicator sort_progress(fp,
"sort",
TPIE_FSI, nItems,
"Sorting");
220 fractional_subindicator write_progress(fp,
"write",
TPIE_FSI, nItems,
"Writing");
223 read_progress.init(nItems);
225 for (i = 0; i < nItems; i++) {
227 read_progress.step();
229 read_progress.done();
240 write_progress.init(nItems);
242 for (i = 0; i < nItems; i++) {
244 write_progress.step();
246 write_progress.done();
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::progress_indicator_base::step(), tp_assert, and TPIE_FSI.
◆ space_overhead()
Returns fixed memory usage overhead in bytes per class instantiation.
Definition at line 150 of file internal_sort.h.
◆ space_per_item()
Returns memory usage in bytes per sort item.
Definition at line 157 of file internal_sort.h.
◆ cmp_o
template<class T , class Compare >
◆ ItemArray
◆ len
The documentation for this class was generated from the following file: