Method: ERV::GammaDistribution#sample
- Defined in:
- lib/erv/gamma_distribution.rb
#sample ⇒ Object
We use Marsaglia and Tsang’s sampling algorithm
For more details, see [KROESE11], section 4.2.6, algorithm 4.33 and www.hongliangjie.com/2012/12/19/how-to-generate-gamma-random-variables/
34 35 36 |
# File 'lib/erv/gamma_distribution.rb', line 34 def sample gamrand(@shape, @scale) end |