Template Function ADS::distributionSort
Defined in File ExternalSorting.h
Function Documentation
-
template<class T, class R, class C = std::less<>>
void ADS::distributionSort(const DiskFile<T> &in, DiskFile<T> &out, R &g, C less = C()) the items of in, sorted, into out, by the distribution with pivots from a random sample drawn by g
- Pre:
M >= 5 B + 2, out empty, the two files on the same memory
- Post:
out sorted, with the items of in (an audit)