Weibull distribution. alpha is the scale parameter and beta is the shape parameter.
(self, alpha, beta)
| 769 | return u ** (-1.0 / alpha) |
| 770 | |
| 771 | def weibullvariate(self, alpha, beta): |
| 772 | """Weibull distribution. |
| 773 | |
| 774 | alpha is the scale parameter and beta is the shape parameter. |
| 775 | |
| 776 | """ |
| 777 | # Jain, pg. 499; bug fix courtesy Bill Arms |
| 778 | |
| 779 | u = 1.0 - self.random() |
| 780 | return alpha * (-_log(u)) ** (1.0 / beta) |
| 781 | |
| 782 | |
| 783 | ## ------------------------------------------------------------------ |