\hypertarget{classegamma}{
\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 
\hypertarget{classegamma_4b1d34f3b244ea51a58ec10c468788c1}{
\hyperlink{classegamma_4b1d34f3b244ea51a58ec10c468788c1}{egamma} (const \hyperlink{classRV}{RV} \&\hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv})}
\label{classegamma_4b1d34f3b244ea51a58ec10c468788c1}

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

\begin{CompactList}\small\item\em Sets parameters. \item\end{CompactList}\item 
\hypertarget{classegamma_8e10c0021b5dfdd9cb62c6959b5ef425}{
vec \hyperlink{classegamma_8e10c0021b5dfdd9cb62c6959b5ef425}{sample} () const }
\label{classegamma_8e10c0021b5dfdd9cb62c6959b5ef425}

\begin{CompactList}\small\item\em Returns a sample, $x$ from density $epdf(rv)$. \item\end{CompactList}\item 
\hypertarget{classegamma_de84faac8f9799dfe2777ddbedf997ef}{
double \hyperlink{classegamma_de84faac8f9799dfe2777ddbedf997ef}{evalpdflog} (const vec \&val) const }
\label{classegamma_de84faac8f9799dfe2777ddbedf997ef}

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

\begin{CompactList}\small\item\em logarithm of the normalizing constant, $\mathcal{I}$ \item\end{CompactList}\item 
\hypertarget{classegamma_44445c56e60b91b377f207f8d5089790}{
void \hyperlink{classegamma_44445c56e60b91b377f207f8d5089790}{\_\-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 
\hypertarget{classegamma_6ab5ba56f7cdb2e5921c3e77524fa50a}{
vec \hyperlink{classegamma_6ab5ba56f7cdb2e5921c3e77524fa50a}{mean} () const }
\label{classegamma_6ab5ba56f7cdb2e5921c3e77524fa50a}

\begin{CompactList}\small\item\em return expected value \item\end{CompactList}\item 
\hypertarget{classeEF_a89bef8996410609004fa019b5b48964}{
virtual void \hyperlink{classeEF_a89bef8996410609004fa019b5b48964}{dupdate} (mat \&v)}
\label{classeEF_a89bef8996410609004fa019b5b48964}

\begin{CompactList}\small\item\em TODO decide if it is really needed. \item\end{CompactList}\item 
\hypertarget{classeEF_48cdd33d0e20d1a1aa45683c956bc61c}{
virtual double \hyperlink{classeEF_48cdd33d0e20d1a1aa45683c956bc61c}{evalpdflog\_\-nn} (const vec \&val) const }
\label{classeEF_48cdd33d0e20d1a1aa45683c956bc61c}

\begin{CompactList}\small\item\em Evaluate normalized log-probability. \item\end{CompactList}\item 
\hypertarget{classeEF_c71faf4b2d153efda14bf1f87dca1507}{
virtual vec \hyperlink{classeEF_c71faf4b2d153efda14bf1f87dca1507}{evalpdflog} (const mat \&Val) const }
\label{classeEF_c71faf4b2d153efda14bf1f87dca1507}

\begin{CompactList}\small\item\em Evaluate normalized log-probability for many samples. \item\end{CompactList}\item 
\hypertarget{classeEF_4f8385dd1cc9740522dc373b1dc3cbf5}{
virtual void \hyperlink{classeEF_4f8385dd1cc9740522dc373b1dc3cbf5}{pow} (double p)}
\label{classeEF_4f8385dd1cc9740522dc373b1dc3cbf5}

\begin{CompactList}\small\item\em Power of the density, used e.g. to flatten the density. \item\end{CompactList}\item 
\hypertarget{classepdf_54d7dd53a641b618771cd9bee135181f}{
virtual mat \hyperlink{classepdf_54d7dd53a641b618771cd9bee135181f}{sampleN} (int N) const }
\label{classepdf_54d7dd53a641b618771cd9bee135181f}

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

\begin{CompactList}\small\item\em Compute probability of argument {\tt val}. \item\end{CompactList}\item 
\hypertarget{classepdf_cebbdd7a85e6328f7358fc0ba8eee06c}{
virtual vec \hyperlink{classepdf_cebbdd7a85e6328f7358fc0ba8eee06c}{evalpdflog\_\-m} (const mat \&Val) const }
\label{classepdf_cebbdd7a85e6328f7358fc0ba8eee06c}

\begin{CompactList}\small\item\em Compute log-probability of multiple values argument {\tt val}. \item\end{CompactList}\item 
\hypertarget{classepdf_3ba08c0e788deff22134c049b9269666}{
\hyperlink{classmpdf}{mpdf} $\ast$ \hyperlink{classepdf_3ba08c0e788deff22134c049b9269666}{condition} (const \hyperlink{classRV}{RV} \&\hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv})}
\label{classepdf_3ba08c0e788deff22134c049b9269666}

\begin{CompactList}\small\item\em Return conditional density on the given \hyperlink{classRV}{RV}, the remaining rvs will be in conditioning. \item\end{CompactList}\item 
\hypertarget{classepdf_bc0c171b6dafacd78d26263913b1d0c0}{
\hyperlink{classepdf}{epdf} $\ast$ \hyperlink{classepdf_bc0c171b6dafacd78d26263913b1d0c0}{marginal} (const \hyperlink{classRV}{RV} \&\hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv})}
\label{classepdf_bc0c171b6dafacd78d26263913b1d0c0}

\begin{CompactList}\small\item\em Return marginal density on the given \hyperlink{classRV}{RV}, the remainig rvs are intergrated out. \item\end{CompactList}\item 
\hypertarget{classepdf_ca0d32aabb4cbba347e0c37fe8607562}{
const \hyperlink{classRV}{RV} \& \hyperlink{classepdf_ca0d32aabb4cbba347e0c37fe8607562}{\_\-rv} () const }
\label{classepdf_ca0d32aabb4cbba347e0c37fe8607562}

\begin{CompactList}\small\item\em access function, possibly dangerous! \item\end{CompactList}\item 
\hypertarget{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5}{
void \hyperlink{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5}{\_\-renewrv} (const \hyperlink{classRV}{RV} \&in\_\-rv)}
\label{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5}

\begin{CompactList}\small\item\em modifier function - useful when copying epdfs \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
\hypertarget{classegamma_376cebd8932546c440f21b182910b01b}{
vec \hyperlink{classegamma_376cebd8932546c440f21b182910b01b}{alpha}}
\label{classegamma_376cebd8932546c440f21b182910b01b}

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

\begin{CompactList}\small\item\em Vector $\beta$. \item\end{CompactList}\item 
\hypertarget{classepdf_74da992e3f5d598da8850b646b79b9d9}{
\hyperlink{classRV}{RV} \hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{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. 

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

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