\section{egamma Class Reference}
\label{classegamma}\index{egamma@{egamma}}
Gamma posterior density.  


{\tt \#include $<$libEF.h$>$}

Inheritance diagram for egamma:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=49pt]{classegamma__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for egamma:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=49pt]{classegamma__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf egamma} (const {\bf RV} \&{\bf rv})\label{classegamma_4b1d34f3b244ea51a58ec10c468788c1}

\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
void {\bf set\_\-parameters} (const vec \&a, const vec \&b)\label{classegamma_8e348b89be82b70471fe8c5630f61339}

\begin{CompactList}\small\item\em Sets parameters. \item\end{CompactList}\item 
vec {\bf sample} () const 
\begin{CompactList}\small\item\em Returns the required moment of the \doxyref{epdf}{p.}{classepdf}. \item\end{CompactList}\item 
double {\bf evalpdflog} (const vec \&val) const \label{classegamma_de84faac8f9799dfe2777ddbedf997ef}

\begin{CompactList}\small\item\em TODO: is it used anywhere? \item\end{CompactList}\item 
double {\bf lognc} () const \label{classegamma_d6dbbdb72360f9e54d64501f80318bb6}

\begin{CompactList}\small\item\em logarithm of the normalizing constant, $\mathcal{I}$ \item\end{CompactList}\item 
void {\bf \_\-param} (vec $\ast$\&a, vec $\ast$\&b)\label{classegamma_44445c56e60b91b377f207f8d5089790}

\begin{CompactList}\small\item\em Returns poiter to alpha and beta. Potentially dengerous: use with care! \item\end{CompactList}\item 
vec {\bf mean} () const \label{classegamma_6ab5ba56f7cdb2e5921c3e77524fa50a}

\begin{CompactList}\small\item\em return expected value \item\end{CompactList}\item 
virtual void {\bf tupdate} (double phi, mat \&vbar, double nubar)\label{classeEF_fd88bc35550ec8fe9281d358216d0fcf}

\begin{CompactList}\small\item\em TODO decide if it is really needed. \item\end{CompactList}\item 
virtual void {\bf dupdate} (mat \&v, double nu=1.0)\label{classeEF_5863718c3b2fb1496dece10c5b745d5c}

\begin{CompactList}\small\item\em TODO decide if it is really needed. \item\end{CompactList}\item 
virtual mat {\bf sampleN} (int N) const \label{classepdf_54d7dd53a641b618771cd9bee135181f}

\begin{CompactList}\small\item\em Returns N samples from density $epdf(rv)$. \item\end{CompactList}\item 
virtual double {\bf eval} (const vec \&val) const \label{classepdf_3ea597362e11a0040fe7c990269d072c}

\begin{CompactList}\small\item\em Compute probability of argument {\tt val}. \item\end{CompactList}\item 
{\bf RV} \& {\bf \_\-rv} ()\label{classepdf_4778ea61ef400813e47750e024e9fc2f}

\begin{CompactList}\small\item\em access function, possibly dangerous! \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
vec {\bf alpha}\label{classegamma_376cebd8932546c440f21b182910b01b}

\begin{CompactList}\small\item\em Vector $\alpha$. \item\end{CompactList}\item 
vec {\bf beta}\label{classegamma_cfc5f136467488a421ab22f886323790}

\begin{CompactList}\small\item\em Vector $\beta$. \item\end{CompactList}\item 
{\bf RV} {\bf rv}\label{classepdf_74da992e3f5d598da8850b646b79b9d9}

\begin{CompactList}\small\item\em Identified of the random variable. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Gamma posterior density. 

Multvariate Gamma density as product of independent univariate densities. \[ f(x|\alpha,\beta) = \prod f(x_i|\alpha_i,\beta_i) \] 

\subsection{Member Function Documentation}
\index{egamma@{egamma}!sample@{sample}}
\index{sample@{sample}!egamma@{egamma}}
\subsubsection[sample]{\setlength{\rightskip}{0pt plus 5cm}vec egamma::sample () const\hspace{0.3cm}{\tt  [virtual]}}\label{classegamma_8e10c0021b5dfdd9cb62c6959b5ef425}


Returns the required moment of the \doxyref{epdf}{p.}{classepdf}. 

Returns a sample, $x$ from density $epdf(rv)$ 

Implements {\bf epdf} \doxyref{}{p.}{classepdf_8019654e494bf5e458f6fb947e11b262}.

References alpha, beta, RV::count(), epdf::rv, and itpp::Gamma\_\-RNG::setup().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
work/git/mixpp/bdm/stat/{\bf libEF.h}\item 
work/git/mixpp/bdm/stat/libEF.cpp\end{CompactItemize}
