The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information.... |
Home ![]() ![]() ![]() ![]() |
|||||||||||||
See also: Percentile (Vector), Percentile (Matrix), Percentile (Mat4D), PercentileOfArray | |||||||||||||
QuickSelect |
![]() |
||||||||||||
The function QuickSelect returns the value of the kth smallest element of the unsorted array Data and can be used to calculate a particular quantile of a set of values. The parameter k specifies the rank number of the order statistic, the parameters First and Last specify the indices of the first and the last element of the data array to be included in the calculation (valid range is from 0 to length(Data)-1). If the array Data contains a high number (more than 50%) of equal values version [1] becomes prohibitively slow at high k values. In this case version [2] can be used to speed up the calculation by specifying the abundant value by the parameter AbundantVal. Please note that the speed of QuickSelect depends on the distribution of the values, the number of data values (difference between Last and First) and on k. Thus it is recommended to test whether version [1] or version [2] behaves faster in a particular situation.
|