Class KthSelector

java.lang.Object
org.apache.commons.math4.util.KthSelector
All Implemented Interfaces:
java.io.Serializable

public class KthSelector
extends java.lang.Object
implements java.io.Serializable
A Simple Kth selector implementation to pick up the Kth ordered element from a work array containing the input numbers.
Since:
3.4
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    KthSelector()
    Constructor with default median of 3 pivoting strategy
    KthSelector​(PivotingStrategyInterface pivotingStrategy)
    Constructor with specified pivoting strategy
  • Method Summary

    Modifier and Type Method Description
    PivotingStrategyInterface getPivotingStrategy()
    Get the pivotin strategy.
    double select​(double[] work, int[] pivotsHeap, int k)
    Select Kth value in the array.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait