Main Page | Directories | File List | Globals | Related Pages

median.h File Reference

Go to the source code of this file.

Functions

double d_kth_smallest (double *data, int n, int k)
double dmedian (double *data, int n)


Function Documentation

double d_kth_smallest double *  data,
int  n,
int  k
 

Returns the kth smallest value in data[0..n]. Array is partially sorted. Algorithm is based on the book Wirth N. Algorithms + data structures = programs. Englewood Cliffs, Prentice-Hall, 1976.

Returns:
Returns the kth smallest value in data[0..n].
Parameters:
data  Pointer to data; array is partially sorted
n  Length of data array
k  kth smallest value will be returned

double dmedian double *  data,
int  n
 

Returns the median in array data[0..n]. Array is partially sorted. Algorithm is based on the book Wirth N. Algorithms + data structures = programs. Englewood Cliffs, Prentice-Hall, 1976.

Returns:
Returns the median in array data[0..n].
Parameters:
data  Pointer to data; array is partially sorted
n  Length of data array


Generated on Fri Jan 7 14:49:35 2005 for libROB by  doxygen 1.3.9.1