I am trying to generate exponentially distributed random numbers btw 0-100. But when I use the below function my variables is assigned value more than even 200 but they should be btw 0-100. Anybody has any idea?
here is my code;
Random rng3 = new Random(85);
ExponentialGenerator exponentialGenerator = new ExponentialGenerator(0.012, rng3 );
and the general usage is ;
public ExponentialGenerator(NumberGenerator<Double> rate,
Random rng)
Parameters:
rate - The rate (lamda) of the exponential distribution.
rng - The source of randomness used to generate the exponential values.
Aucun commentaire:
Enregistrer un commentaire