VF_meanVD_meanVE_mean
VCF_meanVCD_meanVCE_mean
VI_meanVBI_meanVSI_meanVLI_meanVQI_mean 
VU_meanVUB_meanVUS_meanVUL_meanVUQ_meanVUI_mean
FunctionMean 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/Delphiuses 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/Delphiuses 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;
Descriptionmean = (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.
Error handlingnone
Return valueMean of the vector elements (except complex versions in Pascal/Delphi)
See alsoVF_meanwW,   VF_selected_mean,   VF_meanabs,   VF_median,   VF_meanvar,   VF_min_max_mean_stddev,   VI_fsum,   VF_varianceC,   VF_linregress

VectorLib Table of Contents  OptiVec home