| 1 | \hypertarget{classmprod}{ |
|---|
| 2 | \section{mprod Class Reference} |
|---|
| 3 | \label{classmprod}\index{mprod@{mprod}} |
|---|
| 4 | } |
|---|
| 5 | Chain rule decomposition of \hyperlink{classepdf}{epdf}. |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | {\tt \#include $<$emix.h$>$} |
|---|
| 9 | |
|---|
| 10 | Inheritance diagram for mprod:\nopagebreak |
|---|
| 11 | \begin{figure}[H] |
|---|
| 12 | \begin{center} |
|---|
| 13 | \leavevmode |
|---|
| 14 | \includegraphics[width=91pt]{classmprod__inherit__graph} |
|---|
| 15 | \end{center} |
|---|
| 16 | \end{figure} |
|---|
| 17 | Collaboration diagram for mprod:\nopagebreak |
|---|
| 18 | \begin{figure}[H] |
|---|
| 19 | \begin{center} |
|---|
| 20 | \leavevmode |
|---|
| 21 | \includegraphics[width=102pt]{classmprod__coll__graph} |
|---|
| 22 | \end{center} |
|---|
| 23 | \end{figure} |
|---|
| 24 | \subsection*{Public Member Functions} |
|---|
| 25 | \begin{CompactItemize} |
|---|
| 26 | \item |
|---|
| 27 | \hypertarget{classmprod_419b303581a91ad85200bdcb4b3186f4}{ |
|---|
| 28 | \hyperlink{classmprod_419b303581a91ad85200bdcb4b3186f4}{mprod} (Array$<$ \hyperlink{classmpdf}{mpdf} $\ast$ $>$ mFacs)} |
|---|
| 29 | \label{classmprod_419b303581a91ad85200bdcb4b3186f4} |
|---|
| 30 | |
|---|
| 31 | \begin{CompactList}\small\item\em Constructor from list of mFacs, Additional parameter overlap is left for future use. Do not set to true for \hyperlink{classmprod}{mprod}. \item\end{CompactList}\item |
|---|
| 32 | \hypertarget{classmprod_c15df5d0c7bb9dc82dd78f037b2550a8}{ |
|---|
| 33 | double \textbf{evalpdflog} (const vec \&val) const } |
|---|
| 34 | \label{classmprod_c15df5d0c7bb9dc82dd78f037b2550a8} |
|---|
| 35 | |
|---|
| 36 | \item |
|---|
| 37 | vec \hyperlink{classmprod_a48887eb8738a9e5550bfc38eb8e9d68}{samplecond} (const vec \&cond, double \&ll) |
|---|
| 38 | \begin{CompactList}\small\item\em Returns the required moment of the \hyperlink{classepdf}{epdf}. \item\end{CompactList}\item |
|---|
| 39 | mat \hyperlink{classmprod_e171c40e210539c2af01d6237785620b}{samplecond} (const vec \&cond, vec \&ll, int N) |
|---|
| 40 | \begin{CompactList}\small\item\em Returns. \item\end{CompactList}\item |
|---|
| 41 | \hyperlink{classRV}{RV} \hyperlink{classcompositepdf_635d219fb3e32852400d6f98aa4bdc93}{getrv} (bool checkoverlap=false) |
|---|
| 42 | \begin{CompactList}\small\item\em find common rv, flag \item\end{CompactList}\item |
|---|
| 43 | \hypertarget{classcompositepdf_5a4479785c1fdb2cc351fbea07b899ac}{ |
|---|
| 44 | void \hyperlink{classcompositepdf_5a4479785c1fdb2cc351fbea07b899ac}{setrvc} (const \hyperlink{classRV}{RV} \&\hyperlink{classmpdf_f6687c07ff07d47812dd565368ca59eb}{rv}, \hyperlink{classRV}{RV} \&\hyperlink{classmpdf_acb7dda792b3cd5576f39fa3129abbab}{rvc})} |
|---|
| 45 | \label{classcompositepdf_5a4479785c1fdb2cc351fbea07b899ac} |
|---|
| 46 | |
|---|
| 47 | \begin{CompactList}\small\item\em common rvc of all mpdfs is written to rvc \item\end{CompactList}\item |
|---|
| 48 | \hypertarget{classcompositepdf_08958c8f76d65de94ecc37b8d90bc77a}{ |
|---|
| 49 | void \hyperlink{classcompositepdf_08958c8f76d65de94ecc37b8d90bc77a}{setindices} (const \hyperlink{classRV}{RV} \&\hyperlink{classmpdf_f6687c07ff07d47812dd565368ca59eb}{rv})} |
|---|
| 50 | \label{classcompositepdf_08958c8f76d65de94ecc37b8d90bc77a} |
|---|
| 51 | |
|---|
| 52 | \begin{CompactList}\small\item\em fill all rv$\ast$inrv$\ast$ according to \item\end{CompactList}\item |
|---|
| 53 | \hypertarget{classcompositepdf_3bd4ada95f381ea6c4cff2dc86e957c4}{ |
|---|
| 54 | void \hyperlink{classcompositepdf_3bd4ada95f381ea6c4cff2dc86e957c4}{setrvcinrv} (const \hyperlink{classRV}{RV} \&\hyperlink{classmpdf_acb7dda792b3cd5576f39fa3129abbab}{rvc}, Array$<$ ivec $>$ \&rvcind)} |
|---|
| 55 | \label{classcompositepdf_3bd4ada95f381ea6c4cff2dc86e957c4} |
|---|
| 56 | |
|---|
| 57 | \begin{CompactList}\small\item\em Function fills Array by indeces of mpdfs inside given rv. \item\end{CompactList}\item |
|---|
| 58 | \hypertarget{classmpdf_0f95a0cc6ab40611f46804682446ed83}{ |
|---|
| 59 | virtual void \hyperlink{classmpdf_0f95a0cc6ab40611f46804682446ed83}{condition} (const vec \&cond)} |
|---|
| 60 | \label{classmpdf_0f95a0cc6ab40611f46804682446ed83} |
|---|
| 61 | |
|---|
| 62 | \begin{CompactList}\small\item\em Update {\tt ep} so that it represents this \hyperlink{classmpdf}{mpdf} conditioned on {\tt rvc} = cond. \item\end{CompactList}\item |
|---|
| 63 | \hypertarget{classmpdf_80b738ece5bd4f8c4edaee4b38906f91}{ |
|---|
| 64 | virtual double \hyperlink{classmpdf_80b738ece5bd4f8c4edaee4b38906f91}{evalcond} (const vec \&dt, const vec \&cond)} |
|---|
| 65 | \label{classmpdf_80b738ece5bd4f8c4edaee4b38906f91} |
|---|
| 66 | |
|---|
| 67 | \begin{CompactList}\small\item\em Shortcut for conditioning and evaluation of the internal \hyperlink{classepdf}{epdf}. In some cases, this operation can be implemented efficiently. \item\end{CompactList}\item |
|---|
| 68 | \hypertarget{classmpdf_ec9c850305984582548e8deb64f0ffe8}{ |
|---|
| 69 | \hyperlink{classRV}{RV} \hyperlink{classmpdf_ec9c850305984582548e8deb64f0ffe8}{\_\-rvc} ()} |
|---|
| 70 | \label{classmpdf_ec9c850305984582548e8deb64f0ffe8} |
|---|
| 71 | |
|---|
| 72 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
|---|
| 73 | \hypertarget{classmpdf_1e71ad4c66d5884c82d4a3b06b42fe32}{ |
|---|
| 74 | \hyperlink{classRV}{RV} \hyperlink{classmpdf_1e71ad4c66d5884c82d4a3b06b42fe32}{\_\-rv} ()} |
|---|
| 75 | \label{classmpdf_1e71ad4c66d5884c82d4a3b06b42fe32} |
|---|
| 76 | |
|---|
| 77 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
|---|
| 78 | \hypertarget{classmpdf_e17780ee5b2cfe05922a6c56af1462f8}{ |
|---|
| 79 | \hyperlink{classepdf}{epdf} \& \hyperlink{classmpdf_e17780ee5b2cfe05922a6c56af1462f8}{\_\-epdf} ()} |
|---|
| 80 | \label{classmpdf_e17780ee5b2cfe05922a6c56af1462f8} |
|---|
| 81 | |
|---|
| 82 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize} |
|---|
| 83 | \subsection*{Protected Attributes} |
|---|
| 84 | \begin{CompactItemize} |
|---|
| 85 | \item |
|---|
| 86 | \hypertarget{classmprod_0883ce383e8475546df138719918f70e}{ |
|---|
| 87 | Array$<$ \hyperlink{classepdf}{epdf} $\ast$ $>$ \hyperlink{classmprod_0883ce383e8475546df138719918f70e}{epdfs}} |
|---|
| 88 | \label{classmprod_0883ce383e8475546df138719918f70e} |
|---|
| 89 | |
|---|
| 90 | \begin{CompactList}\small\item\em pointers to epdfs - shortcut to \hyperlink{classcompositepdf_637877061b917a16a0421bb5c4cd480d}{mpdfs()}.\hyperlink{classmpdf_e17780ee5b2cfe05922a6c56af1462f8}{\_\-epdf()} \item\end{CompactList}\item |
|---|
| 91 | \hypertarget{classmprod_cc85192d8abc01832937ed8b62e363a6}{ |
|---|
| 92 | Array$<$ ivec $>$ \hyperlink{classmprod_cc85192d8abc01832937ed8b62e363a6}{rvcinds}} |
|---|
| 93 | \label{classmprod_cc85192d8abc01832937ed8b62e363a6} |
|---|
| 94 | |
|---|
| 95 | \begin{CompactList}\small\item\em Indeces of rvc in common rvc. \item\end{CompactList}\item |
|---|
| 96 | \hypertarget{classcompositepdf_c1646fe41ff5934d010e54ccaa46133f}{ |
|---|
| 97 | int \hyperlink{classcompositepdf_c1646fe41ff5934d010e54ccaa46133f}{n}} |
|---|
| 98 | \label{classcompositepdf_c1646fe41ff5934d010e54ccaa46133f} |
|---|
| 99 | |
|---|
| 100 | \begin{CompactList}\small\item\em Number of mpdfs in the composite. \item\end{CompactList}\item |
|---|
| 101 | \hypertarget{classcompositepdf_637877061b917a16a0421bb5c4cd480d}{ |
|---|
| 102 | Array$<$ \hyperlink{classmpdf}{mpdf} $\ast$ $>$ \hyperlink{classcompositepdf_637877061b917a16a0421bb5c4cd480d}{mpdfs}} |
|---|
| 103 | \label{classcompositepdf_637877061b917a16a0421bb5c4cd480d} |
|---|
| 104 | |
|---|
| 105 | \begin{CompactList}\small\item\em Elements of composition. \item\end{CompactList}\item |
|---|
| 106 | \hypertarget{classcompositepdf_4d4a8269f9faefeca8cdc251a5a29a7f}{ |
|---|
| 107 | Array$<$ ivec $>$ \hyperlink{classcompositepdf_4d4a8269f9faefeca8cdc251a5a29a7f}{rvsinrv}} |
|---|
| 108 | \label{classcompositepdf_4d4a8269f9faefeca8cdc251a5a29a7f} |
|---|
| 109 | |
|---|
| 110 | \begin{CompactList}\small\item\em Indeces of rvs in common rv. \item\end{CompactList}\item |
|---|
| 111 | \hypertarget{classcompositepdf_3df07bb5e3ed36a3119b145043296676}{ |
|---|
| 112 | Array$<$ ivec $>$ \hyperlink{classcompositepdf_3df07bb5e3ed36a3119b145043296676}{rvcsinrv}} |
|---|
| 113 | \label{classcompositepdf_3df07bb5e3ed36a3119b145043296676} |
|---|
| 114 | |
|---|
| 115 | \begin{CompactList}\small\item\em Indeces of rvc in common rv. \item\end{CompactList}\item |
|---|
| 116 | \hypertarget{classcompositepdf_de3bd289a26d5549dcf1ed19e5b13569}{ |
|---|
| 117 | Array$<$ ivec $>$ \hyperlink{classcompositepdf_de3bd289a26d5549dcf1ed19e5b13569}{rvinrvcs}} |
|---|
| 118 | \label{classcompositepdf_de3bd289a26d5549dcf1ed19e5b13569} |
|---|
| 119 | |
|---|
| 120 | \begin{CompactList}\small\item\em Indeces of common rv in rvc. \item\end{CompactList}\item |
|---|
| 121 | \hypertarget{classmpdf_f6687c07ff07d47812dd565368ca59eb}{ |
|---|
| 122 | \hyperlink{classRV}{RV} \hyperlink{classmpdf_f6687c07ff07d47812dd565368ca59eb}{rv}} |
|---|
| 123 | \label{classmpdf_f6687c07ff07d47812dd565368ca59eb} |
|---|
| 124 | |
|---|
| 125 | \begin{CompactList}\small\item\em modeled random variable \item\end{CompactList}\item |
|---|
| 126 | \hypertarget{classmpdf_acb7dda792b3cd5576f39fa3129abbab}{ |
|---|
| 127 | \hyperlink{classRV}{RV} \hyperlink{classmpdf_acb7dda792b3cd5576f39fa3129abbab}{rvc}} |
|---|
| 128 | \label{classmpdf_acb7dda792b3cd5576f39fa3129abbab} |
|---|
| 129 | |
|---|
| 130 | \begin{CompactList}\small\item\em random variable in condition \item\end{CompactList}\item |
|---|
| 131 | \hypertarget{classmpdf_7aa894208a32f3487827df6d5054424c}{ |
|---|
| 132 | \hyperlink{classepdf}{epdf} $\ast$ \hyperlink{classmpdf_7aa894208a32f3487827df6d5054424c}{ep}} |
|---|
| 133 | \label{classmpdf_7aa894208a32f3487827df6d5054424c} |
|---|
| 134 | |
|---|
| 135 | \begin{CompactList}\small\item\em pointer to internal \hyperlink{classepdf}{epdf} \item\end{CompactList}\end{CompactItemize} |
|---|
| 136 | |
|---|
| 137 | |
|---|
| 138 | \subsection{Detailed Description} |
|---|
| 139 | Chain rule decomposition of \hyperlink{classepdf}{epdf}. |
|---|
| 140 | |
|---|
| 141 | Probability density in the form of Chain-rule decomposition: $\backslash$\mbox{[} f(x\_\-1,x\_\-2,x\_\-3) = f(x\_\-1$|$x\_\-2,x\_\-3)f(x\_\-2,x\_\-3)f(x\_\-3) $\backslash$\mbox{]} Note that |
|---|
| 142 | |
|---|
| 143 | \subsection{Member Function Documentation} |
|---|
| 144 | \hypertarget{classmprod_a48887eb8738a9e5550bfc38eb8e9d68}{ |
|---|
| 145 | \index{mprod@{mprod}!samplecond@{samplecond}} |
|---|
| 146 | \index{samplecond@{samplecond}!mprod@{mprod}} |
|---|
| 147 | \subsubsection[samplecond]{\setlength{\rightskip}{0pt plus 5cm}vec mprod::samplecond (const vec \& {\em cond}, \/ double \& {\em ll})\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}} |
|---|
| 148 | \label{classmprod_a48887eb8738a9e5550bfc38eb8e9d68} |
|---|
| 149 | |
|---|
| 150 | |
|---|
| 151 | Returns the required moment of the \hyperlink{classepdf}{epdf}. |
|---|
| 152 | |
|---|
| 153 | Returns a sample from the density conditioned on {\tt cond}, $x \sim epdf(rv|cond)$. \begin{Desc} |
|---|
| 154 | \item[Parameters:] |
|---|
| 155 | \begin{description} |
|---|
| 156 | \item[{\em cond}]is numeric value of {\tt rv} \item[{\em ll}]is a return value of log-likelihood of the sample. \end{description} |
|---|
| 157 | \end{Desc} |
|---|
| 158 | |
|---|
| 159 | |
|---|
| 160 | Reimplemented from \hyperlink{classmpdf_3f172b79ec4a5ebc87898a5381141f1b}{mpdf}. |
|---|
| 161 | |
|---|
| 162 | References RV::count(), epdfs, compositepdf::mpdfs, compositepdf::n, mpdf::rv, rvcinds, compositepdf::rvcsinrv, compositepdf::rvinrvcs, and compositepdf::rvsinrv. |
|---|
| 163 | |
|---|
| 164 | Referenced by samplecond().\hypertarget{classmprod_e171c40e210539c2af01d6237785620b}{ |
|---|
| 165 | \index{mprod@{mprod}!samplecond@{samplecond}} |
|---|
| 166 | \index{samplecond@{samplecond}!mprod@{mprod}} |
|---|
| 167 | \subsubsection[samplecond]{\setlength{\rightskip}{0pt plus 5cm}mat mprod::samplecond (const vec \& {\em cond}, \/ vec \& {\em ll}, \/ int {\em N})\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}} |
|---|
| 168 | \label{classmprod_e171c40e210539c2af01d6237785620b} |
|---|
| 169 | |
|---|
| 170 | |
|---|
| 171 | Returns. |
|---|
| 172 | |
|---|
| 173 | \begin{Desc} |
|---|
| 174 | \item[Parameters:] |
|---|
| 175 | \begin{description} |
|---|
| 176 | \item[{\em N}]samples from the density conditioned on {\tt cond}, $x \sim epdf(rv|cond)$. \item[{\em cond}]is numeric value of {\tt rv} \item[{\em ll}]is a return value of log-likelihood of the sample. \end{description} |
|---|
| 177 | \end{Desc} |
|---|
| 178 | |
|---|
| 179 | |
|---|
| 180 | Reimplemented from \hyperlink{classmpdf_0e37163660f93df2a4d723cedb1da89c}{mpdf}. |
|---|
| 181 | |
|---|
| 182 | References RV::count(), mpdf::rv, and samplecond().\hypertarget{classcompositepdf_635d219fb3e32852400d6f98aa4bdc93}{ |
|---|
| 183 | \index{mprod@{mprod}!getrv@{getrv}} |
|---|
| 184 | \index{getrv@{getrv}!mprod@{mprod}} |
|---|
| 185 | \subsubsection[getrv]{\setlength{\rightskip}{0pt plus 5cm}{\bf RV} compositepdf::getrv (bool {\em checkoverlap} = {\tt false})\hspace{0.3cm}{\tt \mbox{[}inherited\mbox{]}}}} |
|---|
| 186 | \label{classcompositepdf_635d219fb3e32852400d6f98aa4bdc93} |
|---|
| 187 | |
|---|
| 188 | |
|---|
| 189 | find common rv, flag |
|---|
| 190 | |
|---|
| 191 | \begin{Desc} |
|---|
| 192 | \item[Parameters:] |
|---|
| 193 | \begin{description} |
|---|
| 194 | \item[{\em checkoverlap}]modifies whether overlaps are acceptable \end{description} |
|---|
| 195 | \end{Desc} |
|---|
| 196 | |
|---|
| 197 | |
|---|
| 198 | References RV::add(), compositepdf::mpdfs, and compositepdf::n. |
|---|
| 199 | |
|---|
| 200 | The documentation for this class was generated from the following file:\begin{CompactItemize} |
|---|
| 201 | \item |
|---|
| 202 | work/git/mixpp/bdm/stat/\hyperlink{emix_8h}{emix.h}\end{CompactItemize} |
|---|