VF_median | VD_median | VE_median |
|
Function | Median of a one-dimensional distribution |
|
Syntax C/C++ | #include <VFmath.h>
float VF_median( fVector X, ui size ); |
C++ VecObj | #include <OptiVec.h>
T vector<T>::median(); |
Pascal/Delphi | uses VFmath;
function VF_median( X:fVector; size:UIntSize ): Single; |
|
CUDA function C/C++ | #include <cudaVFstd.h>
int cudaVF_median( float *h_RetVal, fVector d_X, ui size );
int cusdVF_median( float *d_RetVal, fVector d_X, ui size );
float VFcu_median( fVector h_X, ui size );
|
CUDA function Pascal/Delphi | uses VFstd;
function cudaVF_median( var h_RetVal:Single; d_X:fVector; size:UIntSize ): IntBool;
function cusdVF_median( d_RetVal:PSingle; d_X:fVector; size:UIntSize ): IntBool;
function VFcu_median( h_X:fVector; size:UIntSize ): Single;
|
|
Description | The median of a distribution is defined as the value for which values above and below are equally probable, i.e., for which the number of elements greater and less than the median is equal. If the table X is ordered, the median is simply the element with the index (size+1)/2 (if size is odd) or the mean of the two central elements (if size is even). If a table is not ordered, VF_median finds its median by repeatedly scanning the table through, without actually sorting it. |
|
|
Return value | The median is returned. |
|
|