VI_mean | VBI_mean | VSI_mean | VLI_mean | VQI_mean | |
VU_mean | VUB_mean | VUS_mean | VUL_mean | VUQ_mean | VUI_mean |
|
Function | Mean of a one-dimensional distribution |
|
Syntax C/C++ | #include <VFstd.h>
float VF_mean( fVector X, ui size );
(similarly VD_, VE_, VCF_, VCD_, VCE_)
double VI_mean( iVector X, ui size );
(similarly VBI_, VSI_, VLI_, VU_, VUB_, VUS_, VUL_, VUI_)
extended VQI_mean( qiVector X, ui size ); |
C++ VecObj | #include <OptiVec.h>
T vector<T>::mean();
double vector<int>::mean();
extended vector<quad>::mean(); |
Pascal/Delphi | uses VFstd;
function VF_mean( X:fVector; size:UIntSize ): Single;
(similarly VD_, VE_)
function VCF_mean( X:cfVector; size:UIntSize ):fComplex;
Alternative syntax (obsolete, but still supported):
procedure VCF_mean( var Mean:fComplex; X:cfVector; size:UIntSize );
(similarly VCD_, VCE_)
function VI_mean( X:iVector; size:UIntSize ); Double;
(similarly VBI_, VSI_, VLI_, VU_, VUB_, VUS_, VUL_)
function VQI_mean( X:qiVector; size:UIntSize ); Extended; |
|
CUDA function C/C++ | #include <cudaVFstd.h>
int cudaVF_mean( float *h_RetVal, fVector d_X, ui size );
int cusdVF_mean( float *d_RetVal, fVector d_X, ui size );
float VFcu_mean( fVector h_X, ui size );
|
CUDA function Pascal/Delphi | uses VFstd;
function cudaVF_mean( var h_RetVal:Single; d_X:fVector; size:UIntSize ): IntBool;
function cusdVF_mean( d_RetVal:PSingle; d_X:fVector; size:UIntSize ): IntBool;
function VFcu_mean( h_X:fVector; size:UIntSize ): Single;
|
|
Description | mean = (1 / size) * sum( Xi )
Integer versions: the mean of a distribution consisting of whole numbers generally is a fractional, i.e. a floating-point number. Therefore, the return value of the 8, 16, and 32-bit integer versions is a double. For the 64-bit integer version, VQI_mean, the return value is an extended. |
|
|
Return value | Mean of the vector elements (except complex versions in Pascal/Delphi) |
|
|