itpp::Gamma_RNG Class Reference
Random Number Generation

Gamma distributionGenerate samples from Gamma(alpha,beta) density, according to the following equation:

. More...

`#include <itpp/base/random.h>`

## Public Member Functions

| Gamma_RNG (double a=1.0, double b=1.0)
| Constructor, which sets alpha (a) and beta (b)
void | setup (double a, double b)
| Set alpha and beta.
double | operator() ()
| Get one sample.
vec | operator() (int n)
| Get a sample vector.
mat | operator() (int r, int c)
| Get a sample matrix.
double | sample ()
| Get a sample.

## Detailed Description

Gamma distribution

Generate samples from Gamma(alpha,beta) density, according to the following equation:

.

For the Gamma distribution is equivalent to the Exponential distribution.

Note
  The implementation of the sample() function was adapted from the R statistical language.

Author
  Vasek Smidl

Definition at line 510 of file random.h.

The documentation for this class was generated from the following files:

- itpp/base/random.h
- itpp/base/random.cpp

Generated on Thu Mar 20 2014 12:26:46 for IT++ by Doxygen 1.8.6