1 | \section{egamma Class Reference} |
---|
2 | \label{classegamma}\index{egamma@{egamma}} |
---|
3 | Gamma posterior density. |
---|
4 | |
---|
5 | |
---|
6 | {\tt \#include $<$libEF.h$>$} |
---|
7 | |
---|
8 | Inheritance diagram for egamma:\nopagebreak |
---|
9 | \begin{figure}[H] |
---|
10 | \begin{center} |
---|
11 | \leavevmode |
---|
12 | \includegraphics[width=49pt]{classegamma__inherit__graph} |
---|
13 | \end{center} |
---|
14 | \end{figure} |
---|
15 | Collaboration diagram for egamma:\nopagebreak |
---|
16 | \begin{figure}[H] |
---|
17 | \begin{center} |
---|
18 | \leavevmode |
---|
19 | \includegraphics[width=49pt]{classegamma__coll__graph} |
---|
20 | \end{center} |
---|
21 | \end{figure} |
---|
22 | \subsection*{Public Member Functions} |
---|
23 | \begin{CompactItemize} |
---|
24 | \item |
---|
25 | {\bf egamma} (const {\bf RV} \&{\bf rv})\label{classegamma_4b1d34f3b244ea51a58ec10c468788c1} |
---|
26 | |
---|
27 | \begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item |
---|
28 | void {\bf set\_\-parameters} (const vec \&a, const vec \&b)\label{classegamma_8e348b89be82b70471fe8c5630f61339} |
---|
29 | |
---|
30 | \begin{CompactList}\small\item\em Sets parameters. \item\end{CompactList}\item |
---|
31 | vec {\bf sample} () const |
---|
32 | \begin{CompactList}\small\item\em Returns the required moment of the \doxyref{epdf}{p.}{classepdf}. \item\end{CompactList}\item |
---|
33 | double {\bf evalpdflog} (const vec \&val) const \label{classegamma_de84faac8f9799dfe2777ddbedf997ef} |
---|
34 | |
---|
35 | \begin{CompactList}\small\item\em TODO: is it used anywhere? \item\end{CompactList}\item |
---|
36 | double {\bf lognc} () const \label{classegamma_d6dbbdb72360f9e54d64501f80318bb6} |
---|
37 | |
---|
38 | \begin{CompactList}\small\item\em logarithm of the normalizing constant, $\mathcal{I}$ \item\end{CompactList}\item |
---|
39 | void {\bf \_\-param} (vec $\ast$\&a, vec $\ast$\&b)\label{classegamma_44445c56e60b91b377f207f8d5089790} |
---|
40 | |
---|
41 | \begin{CompactList}\small\item\em Returns poiter to alpha and beta. Potentially dengerous: use with care! \item\end{CompactList}\item |
---|
42 | vec {\bf mean} () const \label{classegamma_6ab5ba56f7cdb2e5921c3e77524fa50a} |
---|
43 | |
---|
44 | \begin{CompactList}\small\item\em return expected value \item\end{CompactList}\item |
---|
45 | virtual void {\bf tupdate} (double phi, mat \&vbar, double nubar)\label{classeEF_fd88bc35550ec8fe9281d358216d0fcf} |
---|
46 | |
---|
47 | \begin{CompactList}\small\item\em TODO decide if it is really needed. \item\end{CompactList}\item |
---|
48 | virtual void {\bf dupdate} (mat \&v, double nu=1.0)\label{classeEF_5863718c3b2fb1496dece10c5b745d5c} |
---|
49 | |
---|
50 | \begin{CompactList}\small\item\em TODO decide if it is really needed. \item\end{CompactList}\item |
---|
51 | virtual mat {\bf sampleN} (int N) const \label{classepdf_54d7dd53a641b618771cd9bee135181f} |
---|
52 | |
---|
53 | \begin{CompactList}\small\item\em Returns N samples from density $epdf(rv)$. \item\end{CompactList}\item |
---|
54 | virtual double {\bf eval} (const vec \&val) const \label{classepdf_3ea597362e11a0040fe7c990269d072c} |
---|
55 | |
---|
56 | \begin{CompactList}\small\item\em Compute probability of argument {\tt val}. \item\end{CompactList}\item |
---|
57 | {\bf RV} {\bf \_\-rv} () const \label{classepdf_b89143f12c9b49282e30841e4fb5f337} |
---|
58 | |
---|
59 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize} |
---|
60 | \subsection*{Protected Attributes} |
---|
61 | \begin{CompactItemize} |
---|
62 | \item |
---|
63 | vec {\bf alpha}\label{classegamma_376cebd8932546c440f21b182910b01b} |
---|
64 | |
---|
65 | \begin{CompactList}\small\item\em Vector $\alpha$. \item\end{CompactList}\item |
---|
66 | vec {\bf beta}\label{classegamma_cfc5f136467488a421ab22f886323790} |
---|
67 | |
---|
68 | \begin{CompactList}\small\item\em Vector $\beta$. \item\end{CompactList}\item |
---|
69 | {\bf RV} {\bf rv}\label{classepdf_74da992e3f5d598da8850b646b79b9d9} |
---|
70 | |
---|
71 | \begin{CompactList}\small\item\em Identified of the random variable. \item\end{CompactList}\end{CompactItemize} |
---|
72 | |
---|
73 | |
---|
74 | \subsection{Detailed Description} |
---|
75 | Gamma posterior density. |
---|
76 | |
---|
77 | Multvariate Gamma density as product of independent univariate densities. \[ f(x|\alpha,\beta) = \prod f(x_i|\alpha_i,\beta_i) \] |
---|
78 | |
---|
79 | \subsection{Member Function Documentation} |
---|
80 | \index{egamma@{egamma}!sample@{sample}} |
---|
81 | \index{sample@{sample}!egamma@{egamma}} |
---|
82 | \subsubsection[sample]{\setlength{\rightskip}{0pt plus 5cm}vec egamma::sample () const\hspace{0.3cm}{\tt [virtual]}}\label{classegamma_8e10c0021b5dfdd9cb62c6959b5ef425} |
---|
83 | |
---|
84 | |
---|
85 | Returns the required moment of the \doxyref{epdf}{p.}{classepdf}. |
---|
86 | |
---|
87 | Returns a sample, $x$ from density $epdf(rv)$ |
---|
88 | |
---|
89 | Implements {\bf epdf} \doxyref{}{p.}{classepdf_8019654e494bf5e458f6fb947e11b262}. |
---|
90 | |
---|
91 | References alpha, beta, RV::count(), epdf::rv, and itpp::Gamma\_\-RNG::setup(). |
---|
92 | |
---|
93 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
94 | \item |
---|
95 | work/git/mixpp/bdm/stat/{\bf libEF.h}\item |
---|
96 | work/git/mixpp/bdm/stat/libEF.cpp\end{CompactItemize} |
---|