/** * Returns a random number from the distribution. */ public double nextDouble() { return nextDouble(this.mean, this.standardDeviation); }
/** * Constructs a normal (gauss) distribution. Example: mean=0.0, * standardDeviation=1.0. */ public Normal(double mean, double standardDeviation, DoubleRandomEngine randomGenerator) { setRandomGenerator(randomGenerator); setState(mean, standardDeviation); }
/** * Sets the uniform random number generated shared by all <b>static</b> * methods. * * @param randomGenerator * the new uniform random number generator to be shared. */ private static void xstaticSetRandomGenerator(DoubleRandomEngine randomGenerator) { synchronized (shared) { shared.setRandomGenerator(randomGenerator); } } }
/** * Sets the uniform random number generated shared by all <b>static</b> * methods. * * @param randomGenerator * the new uniform random number generator to be shared. */ private static void xstaticSetRandomGenerator(DoubleRandomEngine randomGenerator) { synchronized (shared) { shared.setRandomGenerator(randomGenerator); } } }
/** * Constructs a normal (gauss) distribution. Example: mean=0.0, * standardDeviation=1.0. */ public Normal(double mean, double standardDeviation, DoubleRandomEngine randomGenerator) { setRandomGenerator(randomGenerator); setState(mean, standardDeviation); }
/** * Returns a random number from the distribution with the given mean and * standard deviation. */ public static double staticNextDouble(double mean, double standardDeviation) { synchronized (shared) { return shared.nextDouble(mean, standardDeviation); } }
/** * Returns a random number from the distribution. */ public double nextDouble() { return nextDouble(this.mean, this.standardDeviation); }
/** * Returns a random number from the distribution with the given mean and * standard deviation. */ public static double staticNextDouble(double mean, double standardDeviation) { synchronized (shared) { return shared.nextDouble(mean, standardDeviation); } }