\hypertarget{classeDirich}{
\section{eDirich Class Reference}
\label{classeDirich}\index{eDirich@{eDirich}}
}
Dirichlet posterior density.  


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

Inheritance diagram for eDirich:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=46pt]{classeDirich__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for eDirich:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=46pt]{classeDirich__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\hypertarget{classeDirich_ac7e6116f3575c3860d07355e96cd4af}{
\hyperlink{classeDirich_ac7e6116f3575c3860d07355e96cd4af}{eDirich} (const \hyperlink{classRV}{RV} \&\hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}, const vec \&beta0)}
\label{classeDirich_ac7e6116f3575c3860d07355e96cd4af}

\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
\hypertarget{classeDirich_55cccbc5eb44764dce722567acf5fd58}{
\hyperlink{classeDirich_55cccbc5eb44764dce722567acf5fd58}{eDirich} (const \hyperlink{classeDirich}{eDirich} \&D0)}
\label{classeDirich_55cccbc5eb44764dce722567acf5fd58}

\begin{CompactList}\small\item\em Copy constructor. \item\end{CompactList}\item 
\hypertarget{classeDirich_23dff79110822e9639343fe8e177fd80}{
vec \hyperlink{classeDirich_23dff79110822e9639343fe8e177fd80}{sample} () const }
\label{classeDirich_23dff79110822e9639343fe8e177fd80}

\begin{CompactList}\small\item\em Returns a sample, $x$ from density $epdf(rv)$. \item\end{CompactList}\item 
\hypertarget{classeDirich_4206e1da149d51ff3b663c9241096b73}{
vec \hyperlink{classeDirich_4206e1da149d51ff3b663c9241096b73}{mean} () const }
\label{classeDirich_4206e1da149d51ff3b663c9241096b73}

\begin{CompactList}\small\item\em return expected value \item\end{CompactList}\item 
\hypertarget{classeDirich_eaf157ad4c0d191bc17061f29fb76da1}{
vec \hyperlink{classeDirich_eaf157ad4c0d191bc17061f29fb76da1}{variance} () const }
\label{classeDirich_eaf157ad4c0d191bc17061f29fb76da1}

\begin{CompactList}\small\item\em return expected variance (not covariance!) \item\end{CompactList}\item 
\hypertarget{classeDirich_bb4b14ed7794777386de10608a83d142}{
double \hyperlink{classeDirich_bb4b14ed7794777386de10608a83d142}{evallog\_\-nn} (const vec \&val) const }
\label{classeDirich_bb4b14ed7794777386de10608a83d142}

\begin{CompactList}\small\item\em In this instance, val is ... \item\end{CompactList}\item 
\hypertarget{classeDirich_7ce60be7119ffc639ede4e583c1f6e77}{
double \hyperlink{classeDirich_7ce60be7119ffc639ede4e583c1f6e77}{lognc} () const }
\label{classeDirich_7ce60be7119ffc639ede4e583c1f6e77}

\begin{CompactList}\small\item\em logarithm of the normalizing constant, $\mathcal{I}$ \item\end{CompactList}\item 
\hypertarget{classeDirich_6409d0362143a23976b43641ff19e53a}{
vec \& \hyperlink{classeDirich_6409d0362143a23976b43641ff19e53a}{\_\-beta} ()}
\label{classeDirich_6409d0362143a23976b43641ff19e53a}

\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
\hypertarget{classeDirich_c842acb2e1cce5cc9000769ff06c086d}{
void \hyperlink{classeDirich_c842acb2e1cce5cc9000769ff06c086d}{set\_\-parameters} (const vec \&beta0)}
\label{classeDirich_c842acb2e1cce5cc9000769ff06c086d}

\begin{CompactList}\small\item\em Set internal parameters. \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_357512dd565e199904d367294b7dd862}{
virtual double \hyperlink{classeEF_357512dd565e199904d367294b7dd862}{evallog} (const vec \&val) const }
\label{classeEF_357512dd565e199904d367294b7dd862}

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

\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_76608914c3b19e150292d5c56e93e508}{
virtual mat \hyperlink{classepdf_76608914c3b19e150292d5c56e93e508}{sample\_\-m} (int N) const }
\label{classepdf_76608914c3b19e150292d5c56e93e508}

\begin{CompactList}\small\item\em Returns N samples from density $epdf(rv)$. \item\end{CompactList}\item 
\hypertarget{classepdf_2495a04bbacb9b55fe5a3a59b78affca}{
virtual vec \hyperlink{classepdf_2495a04bbacb9b55fe5a3a59b78affca}{evallog\_\-m} (const mat \&Val) const }
\label{classepdf_2495a04bbacb9b55fe5a3a59b78affca}

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

\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_38de9f59b65ee06028554f3f74b66025}{
virtual \hyperlink{classepdf}{epdf} $\ast$ \hyperlink{classepdf_38de9f59b65ee06028554f3f74b66025}{marginal} (const \hyperlink{classRV}{RV} \&\hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}) const }
\label{classepdf_38de9f59b65ee06028554f3f74b66025}

\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{classeDirich_15e6b65e9595eedc8a1286c6cecd36d7}{
vec \hyperlink{classeDirich_15e6b65e9595eedc8a1286c6cecd36d7}{beta}}
\label{classeDirich_15e6b65e9595eedc8a1286c6cecd36d7}

\begin{CompactList}\small\item\em sufficient statistics \item\end{CompactList}\item 
\hypertarget{classeDirich_a4f34a1b98ee6d09688b8d0f043ac10d}{
double \hyperlink{classeDirich_a4f34a1b98ee6d09688b8d0f043ac10d}{gamma}}
\label{classeDirich_a4f34a1b98ee6d09688b8d0f043ac10d}

\begin{CompactList}\small\item\em speedup variable \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}
Dirichlet posterior density. 

Continuous Dirichlet density of $n$-dimensional variable $x$ \[ f(x|\beta) = \frac{\Gamma[\gamma]}{\prod_{i=1}^{n}\Gamma(\beta_i)} \prod_{i=1}^{n}x_i^{\beta_i-1} \] where $\gamma=\sum_i \beta_i$. 

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