Class Uniform
java.lang.Object
eduni.distributions.Generator
eduni.distributions.Uniform
- All Implemented Interfaces:
ContinuousGenerator,Seedable
A random number generator based on the uniform distribution.
automatically generated by
MetaGenerator-
Constructor Details
-
Uniform
public Uniform(double min, double max) the seed is aumatically provided by theSeedGenerator -
Uniform
public Uniform(double min, double max, long seed) The constructor with which a specific seed is set for the random number generator- Parameters:
seed- The initial seed for the generator, two instances with the same seed will generate the same sequence of numbers
-
-
Method Details
-
sample
public double sample()Generate a new random number.- Specified by:
samplein interfaceContinuousGenerator- Returns:
- The next random number in the sequence
-