org.das2.math
Class PoissonDistribution

java.lang.Object
  extended by org.das2.math.PoissonDistribution

public class PoissonDistribution
extends java.lang.Object


Constructor Summary
PoissonDistribution()
           
 
Method Summary
static int poisson(double L, java.util.Random random)
          This function generates a random variate with the poisson distribution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PoissonDistribution

public PoissonDistribution()
Method Detail

poisson

public static 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