public class Random
extends com.google.gwt.core.client.JavaScriptObject
Random instances are created using static factory methods of this class, such
as normal()
.
The generate()
method is then used to generate numbers.
Modifier | Constructor and Description |
---|---|
protected |
Random() |
Modifier and Type | Method and Description |
---|---|
double |
generate()
Generate a new number with this distribution.
|
static Random |
irwinHall(int count)
Returns a function for generating random number with a Irwin-Hall distribution.
|
static Random |
logNormal()
Returns a function for generating random number with a log-normal
distribution, with a mean of 0 and a deviation of 1.
|
static Random |
logNormal(double mean)
Returns a function for generating random number with a log-normal
distribution, with the given mean, and a deviation of 1.
|
static Random |
logNormal(double mean,
double deviation)
Returns a function for generating random number with a log-normal
distribution, with the given mean, and the given deviation.
|
static Random |
normal()
Returns a function for generating random number with a normal (Gaussian)
distribution, with a mean of 0 and a deviation of 1.
|
static Random |
normal(double mean)
Returns a function for generating random number with a normal (Gaussian)
distribution, with the given mean, and a deviation of 1.
|
static Random |
normal(double mean,
double deviation)
Returns a function for generating random number with a normal (Gaussian)
distribution, with the given mean, and the given deviation.
|
public static final Random irwinHall(int count)
count
- the number of independant variablespublic static final Random normal()
public static final Random normal(double mean)
The expected value of the generated pseudorandom numbers is mean, with the standard deviation of 1.
mean
- the meanpublic static final Random normal(double mean, double deviation)
mean
- the meandeviation
- the deviationpublic static final Random logNormal()
public static final Random logNormal(double mean)
The expected value of the generated pseudorandom numbers is mean, with the standard deviation of 1.
mean
- the meanpublic static final Random logNormal(double mean, double deviation)
mean
- the meandeviation
- the deviationpublic final double generate()
Copyright © 2015 gwt-d3. All rights reserved.