ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
gsl_ran_gamma.cpp File Reference

(Last Changed on August 08, 2016 for git-revision a94e19f33cf3c9f5bdb05b1df544447b98ef6fff.)

#include <admodel.h>

Go to the source code of this file.

Functions

double rgamma (double alpha, random_number_generator &rng)
 Copyright (c) 2016 ADMB Foundation. More...
 

Function Documentation

double rgamma ( double  alpha,
random_number_generator rng 
)

Copyright (c) 2016 ADMB Foundation.

Compute random gamma number using Marsaglia and Tsang’s method.

Parameters
alphaShape parameter
rngRandom number genertor
Returns
Computed random gamma number.

Function code modified from GNU Scientific Library http://git.savannah.gnu.org/cgit/gsl.git/tree/randist/gamma.c

Definition at line 17 of file gsl_ran_gamma.cpp.

Referenced by rbeta(), rdirichlet(), and rgamma().