Class OrderStatisticSelector<K>

java.lang.Object
org.drip.graph.selection.OrderStatisticSelector<K>
Direct Known Subclasses:
HashSelector, PartialSortSelector, QuickSelector

public abstract class OrderStatisticSelector<K>
extends java.lang.Object
OrderStatisticSelector exposes the Functionality to Select the kth Extremum Order Statistic. The References are:

  • Eppstein, D. (2007): Blum-style Analysis of Quickselect https://11011110.github.io/blog/2007/10/09/blum-style-analysis-of.html
  • Hoare, C. A. R. (1961): Algorithm 65: Find Communications of the ACM 4 (1) 321-322
  • Knuth, D. (1997): The Art of Computer Programming 3rd Edition Addison-Wesley
  • Wikipedia (2019): Quickselect https://en.wikipedia.org/wiki/Quickselect
  • Wikipedia (2019): Selection Algorithm https://en.wikipedia.org/wiki/Selection_algorithm




Author:
Lakshmi Krishnamurthy
  • Method Summary

    Modifier and Type Method Description
    K[] elementArray()
    Retrieve the Array of Elements
    boolean inPlace()
    Indicate of the Selection is In-place
    abstract K select​(int k)
    Perform a Selection for the kth Order Statistic on the Array
    java.util.List<K> sort()
    Retrieve the Sorted List of the Elements

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • elementArray

      public K[] elementArray()
      Retrieve the Array of Elements
      Returns:
      The Array of Elements
    • inPlace

      public boolean inPlace()
      Indicate of the Selection is In-place
      Returns:
      TRUE - The Selection is In-place
    • sort

      public java.util.List<K> sort()
      Retrieve the Sorted List of the Elements
      Returns:
      Sorted List of the Elements
    • select

      public abstract K select​(int k)
      Perform a Selection for the kth Order Statistic on the Array
      Parameters:
      k - The Order Statistic
      Returns:
      The kth Order Statistic