poisson
public int poisson(double L,
java.util.Random random)
This function generates a random variate with the Poisson distribution.
Uses inversion by chop-down method for L < 17, and ratio-of-uniforms
method for L >= 17.
For L < 1.E-6 numerical inaccuracy is avoided by direct calculation.
For L > 2E9 too big--throws IllegalArgumentException
Note this was a static method before 2018-08-28 (v2018a_8), so Jython calls
should be PoissonDistribution().poisson().
- Parameters:
L
- the real value
random
- a random number source
- Returns:
- the integer value.