|
| GeomAlg.External.OrderStat |
|
|
|
|
| Description |
| Order statistics, see [CLR90, ch. 10.3].
Warning: The suboptimal algorithm naiveSelect shows a much better real-life performance for many inputs.
|
|
| Synopsis |
|
|
|
|
| An optimal version with O(n) running time.
|
|
|
| Select the ith element with respect to the Ordering cmp. The first element has an index of 0. This functions takes O(n) time.
|
|
|
| Select with respect to the class Ord, i. e. the function compare.
|
|
|
| medianBy selects the median of a list with respect to an Ordering relation.
|
|
|
| Selects the median with respect to Ord.
|
|
| Naive version with O(n log n) running time.
|
|
|
| The naive version uses !! and sortBy.
|
|
|
| Naive selection with respect to Ord.
|
|
|
| Naive median with respect to the Ordering cmp.
|
|
|
| Naive median with a worst case running time of O(n log n).
|
|
| Produced by Haddock version 2.4.2 |