Package org.uncommons.maths.random
Class ContinuousUniformGenerator
- java.lang.Object
-
- org.uncommons.maths.random.ContinuousUniformGenerator
-
- All Implemented Interfaces:
NumberGenerator<java.lang.Double>
public class ContinuousUniformGenerator extends java.lang.Object implements NumberGenerator<java.lang.Double>
Continuous, uniformly distributed random sequence. Generates values in the range mininum (inclusive) ... maximum (exclusive).
-
-
Field Summary
Fields Modifier and Type Field Description private double
minimumValue
private double
range
private java.util.Random
rng
-
Constructor Summary
Constructors Constructor Description ContinuousUniformGenerator(double minimumValue, double maximumValue, java.util.Random rng)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Double
nextValue()
-
-
-
Method Detail
-
nextValue
public java.lang.Double nextValue()
- Specified by:
nextValue
in interfaceNumberGenerator<java.lang.Double>
- Returns:
- The next value from the generator.
-
-