Alex Herbert created NUMBERS-206:
------------------------------------

             Summary: Selection API
                 Key: NUMBERS-206
                 URL: https://issues.apache.org/jira/browse/NUMBERS-206
             Project: Commons Numbers
          Issue Type: New Feature
          Components: arrays
            Reporter: Alex Herbert


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.
{code:java}
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)
{code}

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).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to