public abstract class Selector extends Object
Constructor and Description |
---|
Selector() |
Modifier and Type | Method and Description |
---|---|
abstract void |
select(int from,
int to,
int k)
Reorder elements so that the element at position
k is 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 and (k, to) only contains elements that
are greater than or equal to k . |
protected abstract void |
swap(int i,
int j)
Swap values at slots
i and j . |
public abstract void select(int from, int to, int k)
k
is 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
and (k, to)
only contains elements that
are greater than or equal to k
.protected abstract void swap(int i, int j)
i
and j
.Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.