Package org.apache.hadoop.util
Class HeapSort
java.lang.Object
org.apache.hadoop.util.HeapSort
- All Implemented Interfaces:
IndexedSorter
An implementation of the core algorithm of HeapSort.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsort(IndexedSortable s, int p, int r) Sort the given range of items using heap sort.voidsort(IndexedSortable s, int p, int r, Progressable rep) Same asIndexedSorter.sort(IndexedSortable,int,int), but indicate progress periodically.
-
Constructor Details
-
HeapSort
public HeapSort()
-
-
Method Details
-
sort
Sort the given range of items using heap sort. Sort the items accessed through the given IndexedSortable over the given range of logical indices. From the perspective of the sort algorithm, each index between l (inclusive) and r (exclusive) is an addressable entry.- Specified by:
sortin interfaceIndexedSorter- Parameters:
s- s.p- l.r- r.- See Also:
-
sort
Description copied from interface:IndexedSorterSame asIndexedSorter.sort(IndexedSortable,int,int), but indicate progress periodically.- Specified by:
sortin interfaceIndexedSorter- Parameters:
s- s.p- l.r- r.rep- rep.- See Also:
-