List of utility methods to do Gauss
double | gauss(double mean, double deviation, double x) Returns value of Normal/Gaussian distribution for double exp = (x - mean) * (x - mean) * (-1) / (2 * deviation * deviation); double denom = deviation * Math.sqrt(2 * Math.PI); return Math.exp(exp) / denom; |
void | gauss(double[] A, int m, int n) Performs gaussian elimination on the m by n matrix A. int i = 0; int j = 0; while (i < m && j < n) { int rowstart = i * n; int maxi = i; double maxpivot = A[rowstart + j]; for (int k = i + 1; k < m; k++) { double newpivot = A[k * n + j]; ... |
double | gauss(final double mean, final double sigma, final double x) gauss return Math.exp(-0.5 * Math.pow((x - mean) / sigma, 2.0)) / (sigma * ROOT2PI);
|
double[] | gauss(int N, long seed) gauss int i; double[] uniftmp = uniform(2 * N, seed); double[] g = new double[N]; for (i = 0; i < N; i++) { g[i] = Math.sqrt(-2 * Math.log(uniftmp[i])) * Math.cos(2 * Math.PI * uniftmp[N + i]); if (g[i] == 0.0) { g[i] = 1e-99; return g; |
double[] | GaussElimination(double a[][]) Implements a Gaussian elimination on the given matrix. int n = a.length; return GaussElimination(n, a); |
void | gaussian(double a[][], int index[]) gaussian int n = index.length; double c[] = new double[n]; for (int i = 0; i < n; ++i) { index[i] = i; for (int i = 0; i < n; ++i) { double c1 = 0; for (int j = 0; j < n; ++j) { ... |
double | gaussian(double mu, double sigma, double x) gaussian return Math.exp(-0.5 * Math.pow((x - mu), 2) / Math.pow(sigma, 2))
/ (Math.sqrt(2 * Math.PI * Math.pow(sigma, 2)));
|
double | gaussian(double mu, double sigma, double x) Gaussian probabilty density function return (1 / (sigma * Math.sqrt(2.0 * Math.PI))) * Math.exp(-0.5 * Math.pow(((x - mu) / sigma), 2));
|
double | gaussian(double t) Satisfies Integral[gaussian(t),t,0,1] == 1D Therefore can distribute a value as a bell curve over the intervel 0 to 1 t = 10D * t - 5D;
return 1D / (Math.sqrt(5D) * Math.sqrt(2D * Math.PI)) * Math.exp(-t * t / 20D);
|
double | gaussian(double x, double sigma) gaussian sigma = sigma * sigma;
return (1.0 / (2 * Math.PI * sigma)) * Math.exp(-x * x / (2 * sigma));
|