Loading .readthedocs.yml +1 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ sphinx: formats: - pdf - htmlzip python: Loading samplespace/repeatablerandom.py +9 −9 Original line number Diff line number Diff line Loading @@ -681,7 +681,7 @@ class RepeatableRandomSequence(object): .. math:: f(x) = \text{P}(x) = \begin{cases} 0 & \text{for } x \lt l, \\ \frac{2(x-l)}{(h-l)(m-l)} & Loading Loading @@ -745,7 +745,7 @@ class RepeatableRandomSequence(object): .. math:: f(x) = \frac{1}{x \sigma \sqrt{2 \pi}} \text{P}(x) = \frac{1}{x \sigma \sqrt{2 \pi}} \exp{\left(- \frac{(\ln{x} - \mu)^2}{2 \sigma ^2}\right)} """ return exp(self.normalvariate(mu, sigma)) Loading @@ -755,7 +755,7 @@ class RepeatableRandomSequence(object): The probability density function for the exponential distribution is defined by :math:`f(x)= \lambda e^{-\lambda x}` where :math:`x\ge 0`""" :math:`\text{P}(x)= \lambda e^{-\lambda x}` where :math:`x\ge 0`""" # 1.0 - random() is here used to prevent taking the log of 0.0 return -log(1.0 - self.random()) / lambd Loading @@ -770,7 +770,7 @@ class RepeatableRandomSequence(object): .. math:: f(x) = \frac{e^{\kappa \cos{(x - \mu)}}}{2 \pi I_0(\kappa)} \text{P}(x) = \frac{e^{\kappa \cos{(x - \mu)}}}{2 \pi I_0(\kappa)} where :math:`I_0(\kappa)` is the modified Bessel function of order 0. Loading Loading @@ -818,7 +818,7 @@ class RepeatableRandomSequence(object): .. math:: f(x) = \frac{x^{\alpha - 1} e^{-\frac{x}{\beta}}} \text{P}(x) = \frac{x^{\alpha - 1} e^{-\frac{x}{\beta}}} {\Gamma(\alpha) \beta^{\alpha}} Caution: Loading Loading @@ -892,7 +892,7 @@ class RepeatableRandomSequence(object): .. math:: f(x) = \frac{1}{\sigma \sqrt{2 \pi}} \text{P}(x) = \frac{1}{\sigma \sqrt{2 \pi}} e^{-\frac{1}{2} \left(\frac{x - \mu}{\sigma}\right)^2} Tip: Loading Loading @@ -924,7 +924,7 @@ class RepeatableRandomSequence(object): .. math:: f(x) = x^{\alpha - 1} (1 - x)^{\beta - 1} \text{P}(x) = x^{\alpha - 1} (1 - x)^{\beta - 1} \frac{\Gamma(\alpha + \beta)}{\Gamma(\alpha)\Gamma(\beta)} Returns: Loading @@ -951,7 +951,7 @@ class RepeatableRandomSequence(object): .. math:: f(x) = \frac{\alpha}{x^{\alpha + 1}} \text{P}(x) = \frac{\alpha}{x^{\alpha + 1}} Raises: ValueError: if `alpha` is zero. Loading @@ -971,7 +971,7 @@ class RepeatableRandomSequence(object): .. math:: f(x) = \frac{\beta}{\alpha} \text{P}(x) = \frac{\beta}{\alpha} \left(\frac{x}{\alpha}\right)^{k-1} e^{-(x/\alpha)^k} Loading Loading
.readthedocs.yml +1 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ sphinx: formats: - pdf - htmlzip python: Loading
samplespace/repeatablerandom.py +9 −9 Original line number Diff line number Diff line Loading @@ -681,7 +681,7 @@ class RepeatableRandomSequence(object): .. math:: f(x) = \text{P}(x) = \begin{cases} 0 & \text{for } x \lt l, \\ \frac{2(x-l)}{(h-l)(m-l)} & Loading Loading @@ -745,7 +745,7 @@ class RepeatableRandomSequence(object): .. math:: f(x) = \frac{1}{x \sigma \sqrt{2 \pi}} \text{P}(x) = \frac{1}{x \sigma \sqrt{2 \pi}} \exp{\left(- \frac{(\ln{x} - \mu)^2}{2 \sigma ^2}\right)} """ return exp(self.normalvariate(mu, sigma)) Loading @@ -755,7 +755,7 @@ class RepeatableRandomSequence(object): The probability density function for the exponential distribution is defined by :math:`f(x)= \lambda e^{-\lambda x}` where :math:`x\ge 0`""" :math:`\text{P}(x)= \lambda e^{-\lambda x}` where :math:`x\ge 0`""" # 1.0 - random() is here used to prevent taking the log of 0.0 return -log(1.0 - self.random()) / lambd Loading @@ -770,7 +770,7 @@ class RepeatableRandomSequence(object): .. math:: f(x) = \frac{e^{\kappa \cos{(x - \mu)}}}{2 \pi I_0(\kappa)} \text{P}(x) = \frac{e^{\kappa \cos{(x - \mu)}}}{2 \pi I_0(\kappa)} where :math:`I_0(\kappa)` is the modified Bessel function of order 0. Loading Loading @@ -818,7 +818,7 @@ class RepeatableRandomSequence(object): .. math:: f(x) = \frac{x^{\alpha - 1} e^{-\frac{x}{\beta}}} \text{P}(x) = \frac{x^{\alpha - 1} e^{-\frac{x}{\beta}}} {\Gamma(\alpha) \beta^{\alpha}} Caution: Loading Loading @@ -892,7 +892,7 @@ class RepeatableRandomSequence(object): .. math:: f(x) = \frac{1}{\sigma \sqrt{2 \pi}} \text{P}(x) = \frac{1}{\sigma \sqrt{2 \pi}} e^{-\frac{1}{2} \left(\frac{x - \mu}{\sigma}\right)^2} Tip: Loading Loading @@ -924,7 +924,7 @@ class RepeatableRandomSequence(object): .. math:: f(x) = x^{\alpha - 1} (1 - x)^{\beta - 1} \text{P}(x) = x^{\alpha - 1} (1 - x)^{\beta - 1} \frac{\Gamma(\alpha + \beta)}{\Gamma(\alpha)\Gamma(\beta)} Returns: Loading @@ -951,7 +951,7 @@ class RepeatableRandomSequence(object): .. math:: f(x) = \frac{\alpha}{x^{\alpha + 1}} \text{P}(x) = \frac{\alpha}{x^{\alpha + 1}} Raises: ValueError: if `alpha` is zero. Loading @@ -971,7 +971,7 @@ class RepeatableRandomSequence(object): .. math:: f(x) = \frac{\beta}{\alpha} \text{P}(x) = \frac{\beta}{\alpha} \left(\frac{x}{\alpha}\right)^{k-1} e^{-(x/\alpha)^k} Loading