Utilizes the Box-Muller transformation approach to generate the requested number of random samples from a normal distribution of the specified mean and standard deviation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | mu |
The mean of the distribution. |
||
| real(kind=real64), | intent(in) | :: | sigma |
The standard deviation of the distribution. |
||
| integer(kind=int32), | intent(in) | :: | n |
The number of random samples to generate. |
An N-element array containing the values.
Uses rejection sampling to randomly sample a target distribution.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(distribution), | intent(in) | :: | tdist |
The distribution to sample |
||
| integer(kind=int32), | intent(in) | :: | n |
The number of samples to make. |
||
| real(kind=real64), | intent(in) | :: | xmin |
The minimum range to explore. |
||
| real(kind=real64), | intent(in) | :: | xmax |
The maximum range to explore. |
An N-element array containing the N samples from the distribution.
Samples a multivariate normal distribution such that , where is the lower form of the Cholesky factorization of the covariance matrix, and is a randomly generated vector that exists on the set
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(multivariate_normal_distribution), | intent(in) | :: | dist |
The multivariate normal distribution to sample. |
The resulting vector.