Accord.Statistics.Distributions.DensityKernels.GaussianKernel.Function C# (CSharp) Method

Function() public method

Computes the kernel density function.
public Function ( double x ) : double
x double The input point.
return double
        public double Function(double[] x)
        {
            double norm = 0.0;
            for (int i = 0; i < x.Length; i++)
                norm += x[i] * x[i];

            return constant * Math.Exp(-0.5 * norm * norm);
        }