Java Gauss gaussian(double[] d, double sigma, double mean)

Here you can find the source of gaussian(double[] d, double sigma, double mean)

Description

gaussian

License

Open Source License

Declaration

public static double[] gaussian(double[] d, double sigma, double mean) 

Method Source Code

//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;
    }
}

Related

  1. gaussian(double a[][], int index[])
  2. gaussian(double mu, double sigma, double x)
  3. gaussian(double mu, double sigma, double x)
  4. gaussian(double t)
  5. gaussian(double x, double sigma)
  6. gaussian(double[][] A, double[] b)
  7. gaussian(float x, float mean, float sd)
  8. gaussian(int size, double sigma)
  9. gaussianBlur(int[][] pixels, float sigma)