71 | | <h1>itpp::Gamma_RNG Class Reference</h1><!-- doxytag: class="itpp::Gamma_RNG" -->Gamma distribution. |
| 71 | <h1>itpp::Gamma_RNG Class Reference<br> |
| 72 | <small> |
| 73 | [<a class="el" href="group__randgen.html">Random Number Generation</a>]</small> |
| 74 | </h1><!-- doxytag: class="itpp::Gamma_RNG" -->Gamma distribution<p> |
| 75 | Generate samples from Gamma(alpha,beta) density, according to the following equation: <p class="formulaDsp"> |
| 76 | <img class="formulaDsp" alt="\[ x \sim \Gamma(\alpha,\beta) = \frac{\beta^\alpha}{\Gamma(\alpha)}x^{\alpha-1} \exp(-\beta x) \]" src="form_184.png"> |
| 77 | <p> |
| 78 | . |
84 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">constructor. Set lambda. <br></td></tr> |
85 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dfaae19411e39aa87e1f72e409b6babe"></a><!-- doxytag: member="itpp::Gamma_RNG::setup" ref="dfaae19411e39aa87e1f72e409b6babe" args="(double a0, double b0)" --> |
86 | | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Gamma__RNG.html#dfaae19411e39aa87e1f72e409b6babe">setup</a> (double a0, double b0)</td></tr> |
| 91 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor, which sets alpha (a) and beta (b). <br></td></tr> |
| 92 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cced56e9bb421619b7ff32fbf794d501"></a><!-- doxytag: member="itpp::Gamma_RNG::setup" ref="cced56e9bb421619b7ff32fbf794d501" args="(double a, double b)" --> |
| 93 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Gamma__RNG.html#cced56e9bb421619b7ff32fbf794d501">setup</a> (double a, double b)</td></tr> |
101 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7b82b9d6c35579ab04f1a86a17571b47"></a><!-- doxytag: member="itpp::Gamma_RNG::operator()" ref="7b82b9d6c35579ab04f1a86a17571b47" args="(int h, int w)" --> |
102 | | mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Gamma__RNG.html#7b82b9d6c35579ab04f1a86a17571b47">operator()</a> (int h, int w)</td></tr> |
| 104 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="394c84c73fe7e507c04fe6a9f64067ac"></a><!-- doxytag: member="itpp::Gamma_RNG::operator()" ref="394c84c73fe7e507c04fe6a9f64067ac" args="(int r, int c)" --> |
| 105 | mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Gamma__RNG.html#394c84c73fe7e507c04fe6a9f64067ac">operator()</a> (int r, int c)</td></tr> |
107 | | Gamma distribution. <hr>The documentation for this class was generated from the following files:<ul> |
108 | | <li><a class="el" href="itpp__ext_8h-source.html">itpp_ext.h</a><li>itpp_ext.cpp</ul> |
| 114 | Gamma distribution<p> |
| 115 | Generate samples from Gamma(alpha,beta) density, according to the following equation: <p class="formulaDsp"> |
| 116 | <img class="formulaDsp" alt="\[ x \sim \Gamma(\alpha,\beta) = \frac{\beta^\alpha}{\Gamma(\alpha)}x^{\alpha-1} \exp(-\beta x) \]" src="form_184.png"> |
| 117 | <p> |
| 118 | . |
| 119 | <p> |
| 120 | For <img class="formulaInl" alt="$\alpha=1$" src="form_185.png"> the Gamma distribution is equivalent to the Exponential distribution.<p> |
| 121 | <dl class="note" compact><dt><b>Note:</b></dt><dd>The implementation of the <a class="el" href="classitpp_1_1Gamma__RNG.html#d79da7d042746e5aeb1a5b03976dda75" title="Get a sample.">sample()</a> function was adapted from the R statistical language. </dd></dl> |
| 122 | <dl class="author" compact><dt><b>Author:</b></dt><dd>Vasek Smidl </dd></dl> |
| 123 | <hr>The documentation for this class was generated from the following files:<ul> |
| 124 | <li><a class="el" href="random_8h-source.html">random.h</a><li><a class="el" href="random_8cpp.html">random.cpp</a></ul> |