V
- vector type.public class IndexSorter<V extends ValueVector> extends Object
Modifier and Type | Field and Description |
---|---|
static int |
CHANGE_ALGORITHM_THRESHOLD
If the number of items is smaller than this threshold, we will use another algorithm to sort the data.
|
Constructor and Description |
---|
IndexSorter() |
Modifier and Type | Method and Description |
---|---|
static <T extends ValueVector> |
partition(int low,
int high,
IntVector indices,
VectorValueComparator<T> comparator)
Partition a range of values in a vector into two parts, with elements in one part smaller than
elements from the other part.
|
void |
sort(V vector,
IntVector indices,
VectorValueComparator<V> comparator)
Sorts indices, by quick-sort.
|
public static final int CHANGE_ALGORITHM_THRESHOLD
public void sort(V vector, IntVector indices, VectorValueComparator<V> comparator)
vector
- the vector whose indices need to be sorted.indices
- the vector for storing the sorted indices.comparator
- the comparator to sort indices.public static <T extends ValueVector> int partition(int low, int high, IntVector indices, VectorValueComparator<T> comparator)
T
- the vector type.low
- the lower bound of the range.high
- the upper bound of the range.indices
- vector element indices.comparator
- criteria for comparison.Copyright © 2023 The Apache Software Foundation. All rights reserved.