Class Geometric
java.lang.Object
eduni.distributions.Generator
eduni.distributions.Geometric
- All Implemented Interfaces:
DiscreteGenerator,Seedable
A random number generator based on the geometric distribution.
automatically generated by the
MetaGenerator-
Constructor Details
-
Geometric
public Geometric(double prob) the seed is aumatically provided by theSeedGenerator -
Geometric
public Geometric(double prob, 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 long sample()Generate a new random number.- Specified by:
samplein interfaceDiscreteGenerator- Returns:
- The next random number in the sequence
-