public abstract class RadixSelector extends Selector
This implementation works similarly to a MSB radix sort except that it only recurses into the sub partition that contains the desired value.
|Modifier||Constructor and Description|
|Modifier and Type||Method and Description|
Return the k-th byte of the entry at index
Get a fall-back selector which may assume that the first
Reorder elements so that the element at position
protected RadixSelector(int maxLength)
maxLength- the maximum length of keys, pass
protected abstract int byteAt(int i, int k)
-1if its length is less than or equal to
k. This may only be called with a value of
protected Selector getFallbackSelector(int d)
dbytes of all compared strings are equal. This fallback selector is used when the range becomes narrow or when the maximum level of recursion has been exceeded.
public void select(int from, int to, int k)
kis the same as if all elements were sorted and all other elements are partitioned around it:
[from, k)only contains elements that are less than or equal to
(k, to)only contains elements that are greater than or equal to
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.