rGamma

Function to generate random observation from a gamma distribution.

References "Computer Generation of Statistical Distributions" by Richard Saucier

  1. T rGamma(T shape)
  2. T rGamma(UniformRNG rng, T shape)
    T
    rGamma
    (
    T = double
    UniformRNG
    )
    (
    ref UniformRNG rng
    ,)
    if (
    isFloatingPoint!T &&
    isUniformRNG!UniformRNG
    )

Examples

auto x = rGamma(2.0) * 5;

Meta