Indirectly find the 'k'-median ('k'-th smallest element) of array 'a'.
Indirectly find the 'k'-median ('k'-th smallest element) of array 'a'.
the type of median (e.g., k = (n+1)/2 is the median)
Indirectly sort array 'a' using QuickSort, returning the rank order.
Determine whether the array 'a' is indirectly sorted.
Determine whether the array 'a' is indirectly sorted.
the rank order
Determine whether the array 'a' is sorted.
Indirectly sort array 'a' using SelectionSort, returning the rank order.
Indirectly find the 'k'-median of the 'p' to 'r' partition of array 'a' using the QuickSelect algorithm.
Indirectly find the 'k'-median of the 'p' to 'r' partition of array 'a' using the QuickSelect algorithm.
the rank order
the left cursor
the right cursor
the type of median (k-th smallest element)
http://en.wikipedia.org/wiki/Quickselect
Find the 'k'-median ('k'-th smallest element) of array 'a'.
Find the 'k'-median ('k'-th smallest element) of array 'a'.
the type of median (e.g., k = (n+1)/2 is the median)
Find the 'k'-median of the 'p' to 'r' partition of array 'a' using the QuickSelect algorithm.
Find the 'k'-median of the 'p' to 'r' partition of array 'a' using the QuickSelect algorithm.
the left cursor
the right cursor
the type of median (k-th smallest element)
http://en.wikipedia.org/wiki/Quickselect
Indirectly partition the array from 'p' to 'r' into a left partition (<= 'x') and a right partition (>= 'x').
Indirectly partition the array from 'p' to 'r' into a left partition (<= 'x') and a right partition (>= 'x').
the rank order
the left cursor
the right cursor
Partition the array from 'p' to 'q' into a left partition (<= 'x') and a right partition (>= 'x').
Partition the array from 'p' to 'q' into a left partition (<= 'x') and a right partition (>= 'x').
the left cursor
Recursively and indirectly sort the 'p' to 'r' partition of array 'a' using QuickSort.
Recursively and indirectly sort the 'p' to 'r' partition of array 'a' using QuickSort.
the rank order
the left cursor
the right cursor
Sort array 'a' using QuickSort.
Recursively sort the 'p' to 'r' partition of array 'a' using QuickSort.
Recursively sort the 'p' to 'r' partition of array 'a' using QuickSort.
the left cursor
the right cursor
http://mitpress.mit.edu/books/introduction-algorithms
Indirectly sort the 'p' to 'r' partition of array 'a' using SelectionSort.
Indirectly sort the 'p' to 'r' partition of array 'a' using SelectionSort.
the rank order
the left cursor
the right cursor
Sort array 'a' using SelectionSort.
Sort the 'p' to 'r' partition of array 'a' using SelectionSort.
Sort the 'p' to 'r' partition of array 'a' using SelectionSort.
the left cursor
the right cursor
The
Sorting
class provides direct and indirect methods to:find 'k'-th median ('k'-th smallest element) using QuickSelect sort large arrays using QuickSort sort small arrays using SelectionSort
Direct methods are faster, but modify the array, while indirect methods are slower, but do not modify the array. This class is generic.
SortingD
for a version of this class specialized for Doubles.