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, sort
comparePivot, setPivot, swap
protected abstract void save(int i, int j)
protected abstract void restore(int i, int j)
protected Sorter getFallbackSorter(int k)
MSBRadixSorter
getFallbackSorter
in class MSBRadixSorter
protected void reorder(int from, int to, int[] startOffsets, int[] endOffsets, int k)
When this method returns, startOffsets and endOffsets are equal.
reorder
in class MSBRadixSorter
startOffsets
- start offsets per bucketendOffsets
- end offsets per bucketCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.