|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectRandomNormal
public class RandomNormal
Class for sampling randomly from the Normal (Gaussian) distribution with a specified mean and standard deviation.
Constructor Summary | |
---|---|
RandomNormal()
Create RNG with all default values: no seed, no limits, standard normal distribution. |
|
RandomNormal(double mean,
double stdev)
Create RNG with no seed, samples from normal distribution with given mean and standard deviation. |
|
RandomNormal(int seed)
Create RNG with specified seed for standard normal distribution. |
|
RandomNormal(int seed,
double mean,
double stdev)
Create RNG with specified seed, samples from normal distribution with given mean and standard deviation. |
Method Summary | |
---|---|
double |
nextDouble()
Take a sample from the distribution. |
double |
nextDouble(double min,
double max)
Take a sample from the distribution. |
int |
nextInt()
Take a sample from the distribution. |
int |
nextInt(int min,
int max)
Take a sample from the distribution. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RandomNormal()
public RandomNormal(int seed)
seed
- int seed value, guarantees fixed sequence.public RandomNormal(double mean, double stdev)
mean
- Mean (average) of the distribution.stdev
- Standard deviation of the distribution.public RandomNormal(int seed, double mean, double stdev)
seed
- int seed value, guarantees fixed sequence.mean
- Mean (average) of the distribution.stdev
- Standard deviation of the distribution.Method Detail |
---|
public double nextDouble()
public double nextDouble(double min, double max)
min
- Low end of range of acceptable values.max
- High end of range of acceptable values.
public int nextInt()
public int nextInt(int min, int max)
min
- Low end of range of acceptable values.max
- High end of range of acceptable values.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |