Class Gamma
java.lang.Object
eduni.distributions.Generator
eduni.distributions.Gamma
- All Implemented Interfaces:
ContinuousGenerator,Seedable
A random number generator based on the normal distribution.
-
Constructor Details
-
Gamma
public Gamma(double scale, double shape) the seed is automatically provided by theSeedGenerator- Parameters:
scale- The scale of the distributionshape- The shape of the distribution
-
Gamma
public Gamma(double scale, double shape, long seed) The constructor with which a specific seed is set for the random number generator- Parameters:
scale- The scale of the distributionshape- The shape of the distributionseed- 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
-