Here you can find the source of randomGaussian(int numElements)
public static List<Double> randomGaussian(int numElements)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static List<Double> randomGaussian(int numElements) { return randomGaussian(numElements, 1.0); }//from w w w. j a v a 2 s .c o m public static List<Double> randomGaussian(int numElements, double scaleFactor) { Random r = new Random(System.currentTimeMillis()); List<Double> randomList = new ArrayList<Double>(numElements); for (int i = 0; i < numElements; i++) { randomList.add(r.nextGaussian() * scaleFactor); } return randomList; } }