QUEST - Functions to ESTimate Quantiles:
quest returns estimate - use when entire array is in memory
questalloc returns quantile estimator - use before questupdate
questupdate updates and returns current estimate - use for large
numbers of floats, too big to fit in memory at one time
questfree frees quantile estimator
quest:
Input:
p quantile to be estimated (0.0<=p<=1.0 is required)
n number of samples in array x (n>=5 is required)
x array[n] of floats
Returned: the estimate of a specified quantile
questalloc:
Input:
p quantile to be estimated (0.0<=p<=1.0 is required)
n number of samples in array x (n>=5 is required)
x array[n] of floats
Returned: pointer to a quantile estimator
questupdate:
Input:
q pointer to quantile estimator (as returned by questalloc)
n number of samples in array x
x array[n] of floats
Returned: quantile estimate
questfree:
q pointer to quantile estimator (as returned by questalloc)
Notes:
quest:
The estimate should approach the sample quantile in the limit of large n.
The estimate is most accurate for cumulative distribution functions
that are smooth in the neighborhood of the quantile specified by p.
This function is an implementation of the algorithm published by
Jain and Chlamtac (1985).
questalloc:
This function must be called before calling function questupdate.
See also notes in questupdate.
questupdate:
The estimate should approach the sample quantile in the limit of large n.
The estimate is most accurate for cumulative distribution functions
that are smooth in the neighborhood of the quantile specified by p.
This function is an implementation of the algorithm published by
Jain, R. and Chlamtac, I., 1985, The PP algorithm for dynamic
calculation of quantiles and histograms without storing observations:
Comm. ACM, v. 28, n. 10.
Reference:
Jain, R. and Chlamtac, I., 1985, The PP algorithm for dynamic
calculation of quantiles and histograms without storing observations:
Comm. ACM, v. 28, n. 10.
Author: Dave Hale, Colorado School of Mines, 05/07/89