Description
Create a selection API to select the k-th largest element in an array. This places at k the same value that would be at k in a fully sorted array.
public final class Selection { public static void select(double[] a, int k); public static void select(double[] a, int from, int to, int k); public static void select(double[] a, int[] k); public static void select(double[] a, int from, int to, int[] k); // Extend to other primitive data types that are not easily sorted (e.g. long, float, int)
Note: This API will support multiple points (int[] k) for use in quantile estimation of array data by interpolation of neighbouring values (see STATISTICS-85).
Attachments
Attachments
Issue Links
- is related to
-
STATISTICS-85 Quantile implementation
- Closed
- links to