public double inverseCumulativeDistribution ( double x ) { double p = Math . exp ( - lambda ) ; double dp = p ; int k = 0 ; while ( x > p ) { k ++ ; dp *= lambda / k ; p += dp ; } return k ; }
Return the inverse cumulative distribution function at x .