public abstract class StableMSBRadixSorter extends MSBRadixSorter
HISTOGRAM_SIZE, maxLength| Constructor and Description |
|---|
StableMSBRadixSorter(int maxLength) |
| Modifier and Type | Method and Description |
|---|---|
protected Sorter |
getFallbackSorter(int k)
Get a fall-back sorter which may assume that the first k bytes of all compared strings are equal.
|
protected void |
reorder(int from,
int to,
int[] startOffsets,
int[] endOffsets,
int k)
Reorder elements in stable way, since Dutch sort does not guarantee ordering for same values.
|
protected abstract void |
restore(int i,
int j)
Restore values between i-th and j-th(excluding) in temporary storage into original storage.
|
protected abstract void |
save(int i,
int j)
Save the i-th value into the j-th position in temporary storage.
|
byteAt, compare, getBucket, sort, sortcomparePivot, setPivot, swapprotected abstract void save(int i,
int j)
protected abstract void restore(int i,
int j)
protected Sorter getFallbackSorter(int k)
MSBRadixSortergetFallbackSorter in class MSBRadixSorterprotected void reorder(int from,
int to,
int[] startOffsets,
int[] endOffsets,
int k)
When this method returns, startOffsets and endOffsets are equal.
reorder in class MSBRadixSorterstartOffsets - start offsets per bucketendOffsets - end offsets per bucketCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.