Here you can find the source of gaussian(double[] d, double sigma, double mean)
public static double[] gaussian(double[] d, double sigma, double mean)
//package com.java2s; //License from project: Open Source License public class Main { public static double[] gaussian(double[] d, double sigma, double mean) { double[] ret = new double[d.length]; for (int i = 0; i < d.length; i++) { ret[i] = gaussian(d[i], sigma, mean); }/*from w w w .j a v a 2 s .c om*/ return ret; } public static double gaussian(double x, double sigma, double mean) { double ret = Math .exp(-(Math.pow(x - mean, 2) / (2 * sigma * sigma))); return ret; } }