public class UniformRandomGenerator extends java.lang.Object implements NormalizedRandomGenerator
Since it is a normalized random generator, it generates values from a uniform distribution with mean equal to 0 and standard deviation equal to 1. Generated values fall in the range [-√3, +√3].
| Modifier and Type | Field and Description |
|---|---|
private RandomGenerator |
generator
Underlying generator.
|
private static long |
serialVersionUID
Serializable version identifier.
|
private static double |
SQRT3
Square root of three.
|
| Constructor and Description |
|---|
UniformRandomGenerator(RandomGenerator generator)
Create a new generator.
|
| Modifier and Type | Method and Description |
|---|---|
double |
nextNormalizedDouble()
Generate a random scalar with null mean and unit standard deviation.
|
private static final long serialVersionUID
private static final double SQRT3
private final RandomGenerator generator
public UniformRandomGenerator(RandomGenerator generator)
generator - underlying random generator to usepublic double nextNormalizedDouble()
The number generated is uniformly distributed between -&sqrt;(3) and +&sqrt;(3).
nextNormalizedDouble in interface NormalizedRandomGeneratorCopyright (c) 2003-2013 Apache Software Foundation