Class PartialSortSelector<K extends java.lang.Comparable<K>>

java.lang.Object
org.drip.graph.selection.OrderStatisticSelector<K>
org.drip.graph.selection.PartialSortSelector<K>

public class PartialSortSelector<K extends java.lang.Comparable<K>>
extends OrderStatisticSelector<K>
PartialSortSelector implements the Partial Sorting Based Selection Algorithm. 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
  • Constructor Summary

    Constructors
    Constructor Description
    PartialSortSelector​(K[] elementArray)
    PartialSortSelector Constructor
  • Method Summary

    Modifier and Type Method Description
    K select​(int k)
    Perform a Selection for the kth Order Statistic on the Array

    Methods inherited from class org.drip.graph.selection.OrderStatisticSelector

    elementArray, inPlace, sort

    Methods inherited from class java.lang.Object

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

    • PartialSortSelector

      public PartialSortSelector​(K[] elementArray) throws java.lang.Exception
      PartialSortSelector Constructor
      Parameters:
      elementArray - Array of Elements
      Throws:
      java.lang.Exception - Thrown if the Input is Invalid
  • Method Details

    • select

      public K select​(int k)
      Description copied from class: OrderStatisticSelector
      Perform a Selection for the kth Order Statistic on the Array
      Specified by:
      select in class OrderStatisticSelector<K extends java.lang.Comparable<K>>
      Parameters:
      k - The Order Statistic
      Returns:
      The kth Order Statistic