VF_GaussVD_GaussVE_Gauss
FunctionGaussian normal distribution function.
Syntax C/C++#include <VFmath.h>
int VF_Gauss( fVector Y, fVector X, ui size, float Wid, float Cent, float C );
C++ VecObj#include <OptiVec.h>
int vector<T>::Gauss( const vector<T>& X, T Wid, const T& Cent, const T& C );
Pascal/Delphiuses VFmath;
function VF_Gauss( Y, X:fVector; size:UIntSize; Wid, Cent, C:Single ): IntBool;
CUDA function C/C++#include <cudaVDstd.h>
int cudaVF_Gauss( fVector d_Y, fVector d_X, ui size, float Wid, float Cent, float C );
int cusdVF_Gauss( fVector d_Y, fVector d_X, ui size, float *d_Wid, float *d_Cent, float *d_C );
int VFcu_Gauss( fVector h_Y, fVector h_X, ui size, float Wid, float Cent, float C );
CUDA function Pascal/Delphiuses VDstd;
function cudaVF_Gauss( d_Y, d_X:fVector; size:UIntSize; Wid, Cent, C:Single ): IntBool;
function cusdVF_Gauss( d_Y, d_X:fVector; size:UIntSize; d_Wid, d_Cent, d_C:PSingle ): IntBool;
function VFcu_Gauss( h_Y, h_X:fVector; size:UIntSize; Wid, Cent, C:Single ): IntBool;
DescriptionYi = C / (Wid * sqrt(2*p)) * exp( −0.5*((Xi−Cent) / Wid)2 )
Wid = width of the distribution
Cent = center of the distribution
C is a scaling factor; for C = 1.0, the distribution is normalized.
For Wid = 0, the normal distribution is in fact a delta distribution with Y = C * INF at X = Cent and Y = 0 at all other values of X.
Since infinities are not supported, the existence of a point X = Cent will lead to a SING error in case Wid is zero.
Error handlingSING errors may occur only for a Wid of zero. They are handled with the default result set to ±HUGE_VAL.
Return valueFALSE (0), if no error occurred, otherwise TRUE (non-zero).
See alsoVF_expmx2,   VF_erf,   VF_sech2,   VF_Lorentz

VectorLib Table of Contents  OptiVec home