\hypertarget{classeEmp}{ \section{eEmp Class Reference} \label{classeEmp}\index{eEmp@{eEmp}} } Weighted empirical density. {\tt \#include $<$libEF.h$>$} Inheritance diagram for eEmp:\nopagebreak \begin{figure}[H] \begin{center} \leavevmode \includegraphics[width=43pt]{classeEmp__inherit__graph} \end{center} \end{figure} Collaboration diagram for eEmp:\nopagebreak \begin{figure}[H] \begin{center} \leavevmode \includegraphics[width=43pt]{classeEmp__coll__graph} \end{center} \end{figure} \subsection*{Public Member Functions} \begin{CompactItemize} \item \hypertarget{classeEmp_0c04b073ecd0dae3d498e680ae27e9e4}{ \hyperlink{classeEmp_0c04b073ecd0dae3d498e680ae27e9e4}{eEmp} (const \hyperlink{classRV}{RV} \&rv0, int n0)} \label{classeEmp_0c04b073ecd0dae3d498e680ae27e9e4} \begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item \hypertarget{classeEmp_eab03bd3381aaea11ce34d5a26556353}{ void \hyperlink{classeEmp_eab03bd3381aaea11ce34d5a26556353}{set\_\-parameters} (const vec \&w0, const \hyperlink{classepdf}{epdf} $\ast$pdf0)} \label{classeEmp_eab03bd3381aaea11ce34d5a26556353} \begin{CompactList}\small\item\em Set samples and weights. \item\end{CompactList}\item \hypertarget{classeEmp_e31bc9e6196173c3480b06a761a3e716}{ void \hyperlink{classeEmp_e31bc9e6196173c3480b06a761a3e716}{set\_\-samples} (const \hyperlink{classepdf}{epdf} $\ast$pdf0)} \label{classeEmp_e31bc9e6196173c3480b06a761a3e716} \begin{CompactList}\small\item\em Set sample. \item\end{CompactList}\item \hypertarget{classeEmp_31b2bfb73b72486a5c89f2ab850c7a9b}{ vec \& \hyperlink{classeEmp_31b2bfb73b72486a5c89f2ab850c7a9b}{\_\-w} ()} \label{classeEmp_31b2bfb73b72486a5c89f2ab850c7a9b} \begin{CompactList}\small\item\em Potentially dangerous, use with care. \item\end{CompactList}\item \hypertarget{classeEmp_31b747eca73b16f30370827ba4cc3575}{ Array$<$ vec $>$ \& \hyperlink{classeEmp_31b747eca73b16f30370827ba4cc3575}{\_\-samples} ()} \label{classeEmp_31b747eca73b16f30370827ba4cc3575} \begin{CompactList}\small\item\em access function \item\end{CompactList}\item \hypertarget{classeEmp_77268292fc4465cb73ddbfb1f2932a59}{ ivec \hyperlink{classeEmp_77268292fc4465cb73ddbfb1f2932a59}{resample} (\hyperlink{libEF_8h_99497a3ff630f761cf6bff7babd23212}{RESAMPLING\_\-METHOD} method=SYSTEMATIC)} \label{classeEmp_77268292fc4465cb73ddbfb1f2932a59} \begin{CompactList}\small\item\em Function performs resampling, i.e. removal of low-weight samples and duplication of high-weight samples such that the new samples represent the same density. \item\end{CompactList}\item \hypertarget{classeEmp_83f9283f92b805508d896479dc1ccf12}{ vec \hyperlink{classeEmp_83f9283f92b805508d896479dc1ccf12}{sample} () const } \label{classeEmp_83f9283f92b805508d896479dc1ccf12} \begin{CompactList}\small\item\em inherited operation : NOT implemneted \item\end{CompactList}\item \hypertarget{classeEmp_23e7358995400865ad2e278945922fb3}{ double \hyperlink{classeEmp_23e7358995400865ad2e278945922fb3}{evalpdflog} (const vec \&val) const } \label{classeEmp_23e7358995400865ad2e278945922fb3} \begin{CompactList}\small\item\em inherited operation : NOT implemneted \item\end{CompactList}\item \hypertarget{classeEmp_ba055c19038cc72628d98e25197e982d}{ vec \hyperlink{classeEmp_ba055c19038cc72628d98e25197e982d}{mean} () const } \label{classeEmp_ba055c19038cc72628d98e25197e982d} \begin{CompactList}\small\item\em return expected value \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_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{classeEmp_8c33034de0e35f03f8bb85d3d67438fd}{ int \hyperlink{classeEmp_8c33034de0e35f03f8bb85d3d67438fd}{n}} \label{classeEmp_8c33034de0e35f03f8bb85d3d67438fd} \begin{CompactList}\small\item\em Number of particles. \item\end{CompactList}\item \hypertarget{classeEmp_ae78d144404ddba843c93b171b215de8}{ vec \hyperlink{classeEmp_ae78d144404ddba843c93b171b215de8}{w}} \label{classeEmp_ae78d144404ddba843c93b171b215de8} \begin{CompactList}\small\item\em Sample weights $w$. \item\end{CompactList}\item \hypertarget{classeEmp_a4d6f4bbd6a6824fc39f14676701279a}{ Array$<$ vec $>$ \hyperlink{classeEmp_a4d6f4bbd6a6824fc39f14676701279a}{samples}} \label{classeEmp_a4d6f4bbd6a6824fc39f14676701279a} \begin{CompactList}\small\item\em Samples $x^{(i)}, i=1..n$. \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} Weighted empirical density. Used e.g. in particle filters. 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}