| [33] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | 
|---|
 | 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> | 
|---|
| [139] | 3 | <title>mixpp: mmix Class Reference</title> | 
|---|
| [33] | 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | 
|---|
 | 5 | <link href="tabs.css" rel="stylesheet" type="text/css"> | 
|---|
 | 6 | </head><body> | 
|---|
| [139] | 7 | <!-- Generated by Doxygen 1.5.6 --> | 
|---|
| [91] | 8 | <div class="navigation" id="top"> | 
|---|
 | 9 |   <div class="tabs"> | 
|---|
 | 10 |     <ul> | 
|---|
 | 11 |       <li><a href="index.html"><span>Main Page</span></a></li> | 
|---|
 | 12 |       <li><a href="pages.html"><span>Related Pages</span></a></li> | 
|---|
 | 13 |       <li class="current"><a href="annotated.html"><span>Classes</span></a></li> | 
|---|
 | 14 |       <li><a href="files.html"><span>Files</span></a></li> | 
|---|
 | 15 |     </ul> | 
|---|
 | 16 |   </div> | 
|---|
 | 17 |   <div class="tabs"> | 
|---|
 | 18 |     <ul> | 
|---|
 | 19 |       <li><a href="annotated.html"><span>Class List</span></a></li> | 
|---|
 | 20 |       <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> | 
|---|
 | 21 |       <li><a href="functions.html"><span>Class Members</span></a></li> | 
|---|
 | 22 |     </ul> | 
|---|
 | 23 |   </div> | 
|---|
| [33] | 24 | </div> | 
|---|
| [91] | 25 | <div class="contents"> | 
|---|
| [139] | 26 | <h1>mmix Class Reference</h1><!-- doxytag: class="mmix" --><!-- doxytag: inherits="mpdf" -->Mixture of mpdfs with constant weights.   | 
|---|
| [33] | 27 | <a href="#_details">More...</a> | 
|---|
 | 28 | <p> | 
|---|
| [139] | 29 | <code>#include <<a class="el" href="emix_8h-source.html">emix.h</a>></code> | 
|---|
| [33] | 30 | <p> | 
|---|
 | 31 | <div class="dynheader"> | 
|---|
| [139] | 32 | Inheritance diagram for mmix:</div> | 
|---|
| [33] | 33 | <div class="dynsection"> | 
|---|
| [139] | 34 | <p><center><img src="classmmix__inherit__graph.png" border="0" usemap="#mmix__inherit__map" alt="Inheritance graph"></center> | 
|---|
 | 35 | <map name="mmix__inherit__map"> | 
|---|
 | 36 | <area shape="rect" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies." alt="" coords="7,7,60,33"></map> | 
|---|
| [33] | 37 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> | 
|---|
 | 38 | <div class="dynheader"> | 
|---|
| [139] | 39 | Collaboration diagram for mmix:</div> | 
|---|
| [33] | 40 | <div class="dynsection"> | 
|---|
| [139] | 41 | <p><center><img src="classmmix__coll__graph.png" border="0" usemap="#mmix__coll__map" alt="Collaboration graph"></center> | 
|---|
 | 42 | <map name="mmix__coll__map"> | 
|---|
 | 43 | <area shape="rect" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies." alt="" coords="5,204,59,231"><area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="36,7,73,33"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="71,105,119,132"><area shape="rect" href="classemix.html" title="Mixture of epdfs." alt="" coords="83,204,133,231"></map> | 
|---|
| [33] | 44 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> | 
|---|
 | 45 |  | 
|---|
 | 46 | <p> | 
|---|
| [139] | 47 | <a href="classmmix-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> | 
|---|
| [33] | 48 | <tr><td></td></tr> | 
|---|
 | 49 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> | 
|---|
| [139] | 50 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6769a962f1f4d0ecc5b903b5f7d26ad3"></a><!-- doxytag: member="mmix::mmix" ref="6769a962f1f4d0ecc5b903b5f7d26ad3" args="(RV &rv, RV &rvc)" --> | 
|---|
 | 51 |  </td><td class="memItemRight" valign="bottom"><a class="el" href="classmmix.html#6769a962f1f4d0ecc5b903b5f7d26ad3">mmix</a> (<a class="el" href="classRV.html">RV</a> &<a class="el" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb">rv</a>, <a class="el" href="classRV.html">RV</a> &<a class="el" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab">rvc</a>)</td></tr> | 
|---|
| [33] | 52 |  | 
|---|
 | 53 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr> | 
|---|
| [139] | 54 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e7681490a5c5b2d0a43f4e5842e10a9d"></a><!-- doxytag: member="mmix::set_parameters" ref="e7681490a5c5b2d0a43f4e5842e10a9d" args="(const vec &w, const Array< mpdf * > &Coms)" --> | 
|---|
 | 55 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmmix.html#e7681490a5c5b2d0a43f4e5842e10a9d">set_parameters</a> (const vec &w, const Array< <a class="el" href="classmpdf.html">mpdf</a> * > &<a class="el" href="classmmix.html#460632c7a0afd41b7840902181a7d85f">Coms</a>)</td></tr> | 
|---|
 | 56 |  | 
|---|
 | 57 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set weights <code>w</code> and components <code>R</code>. <br></td></tr> | 
|---|
 | 58 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1a66629ec5c2b6f4740606cf737f0193"></a><!-- doxytag: member="mmix::condition" ref="1a66629ec5c2b6f4740606cf737f0193" args="(const vec &cond)" --> | 
|---|
 | 59 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmmix.html#1a66629ec5c2b6f4740606cf737f0193">condition</a> (const vec &cond)</td></tr> | 
|---|
 | 60 |  | 
|---|
 | 61 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Update <code>ep</code> so that it represents this <a class="el" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> conditioned on <code>rvc</code> = cond. <br></td></tr> | 
|---|
| [33] | 62 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#b0193a350c97933ddf15b15a130da352">samplecond</a> (vec &cond, double &ll)</td></tr> | 
|---|
 | 63 |  | 
|---|
 | 64 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the required moment of the <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.  <a href="#b0193a350c97933ddf15b15a130da352"></a><br></td></tr> | 
|---|
| [139] | 65 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#6bf806badfdac606c847e458e8fce18c">samplecond</a> (vec &cond, vec &ll, int N)</td></tr> | 
|---|
| [33] | 66 |  | 
|---|
| [139] | 67 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns N samples from the density conditioned on <code>cond</code>, <img class="formulaInl" alt="$x \sim epdf(rv|cond)$" src="form_10.png">.  <a href="#6bf806badfdac606c847e458e8fce18c"></a><br></td></tr> | 
|---|
 | 68 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="80b738ece5bd4f8c4edaee4b38906f91"></a><!-- doxytag: member="mmix::evalcond" ref="80b738ece5bd4f8c4edaee4b38906f91" args="(const vec &dt, const vec &cond)" --> | 
|---|
| [33] | 69 | virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#80b738ece5bd4f8c4edaee4b38906f91">evalcond</a> (const vec &dt, const vec &cond)</td></tr> | 
|---|
 | 70 |  | 
|---|
 | 71 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Shortcut for conditioning and evaluation of the internal <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>. In some cases, this operation can be implemented efficiently. <br></td></tr> | 
|---|
| [139] | 72 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ec9c850305984582548e8deb64f0ffe8"></a><!-- doxytag: member="mmix::_rvc" ref="ec9c850305984582548e8deb64f0ffe8" args="()" --> | 
|---|
| [33] | 73 | <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#ec9c850305984582548e8deb64f0ffe8">_rvc</a> ()</td></tr> | 
|---|
 | 74 |  | 
|---|
 | 75 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> | 
|---|
| [139] | 76 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e17780ee5b2cfe05922a6c56af1462f8"></a><!-- doxytag: member="mmix::_epdf" ref="e17780ee5b2cfe05922a6c56af1462f8" args="()" --> | 
|---|
| [33] | 77 | <a class="el" href="classepdf.html">epdf</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#e17780ee5b2cfe05922a6c56af1462f8">_epdf</a> ()</td></tr> | 
|---|
 | 78 |  | 
|---|
 | 79 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> | 
|---|
 | 80 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> | 
|---|
| [139] | 81 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="460632c7a0afd41b7840902181a7d85f"></a><!-- doxytag: member="mmix::Coms" ref="460632c7a0afd41b7840902181a7d85f" args="" --> | 
|---|
 | 82 | Array< <a class="el" href="classmpdf.html">mpdf</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="classmmix.html#460632c7a0afd41b7840902181a7d85f">Coms</a></td></tr> | 
|---|
 | 83 |  | 
|---|
 | 84 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Component (epdfs). <br></td></tr> | 
|---|
 | 85 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="507a5e6df53e6e9a6a330f1271cf0914"></a><!-- doxytag: member="mmix::Epdf" ref="507a5e6df53e6e9a6a330f1271cf0914" args="" --> | 
|---|
 | 86 | <a class="el" href="classemix.html">emix</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmmix.html#507a5e6df53e6e9a6a330f1271cf0914">Epdf</a></td></tr> | 
|---|
 | 87 |  | 
|---|
 | 88 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Internal <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>. <br></td></tr> | 
|---|
 | 89 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f6687c07ff07d47812dd565368ca59eb"></a><!-- doxytag: member="mmix::rv" ref="f6687c07ff07d47812dd565368ca59eb" args="" --> | 
|---|
| [33] | 90 | <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb">rv</a></td></tr> | 
|---|
 | 91 |  | 
|---|
 | 92 | <tr><td class="mdescLeft"> </td><td class="mdescRight">modeled random variable <br></td></tr> | 
|---|
| [139] | 93 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="acb7dda792b3cd5576f39fa3129abbab"></a><!-- doxytag: member="mmix::rvc" ref="acb7dda792b3cd5576f39fa3129abbab" args="" --> | 
|---|
| [33] | 94 | <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab">rvc</a></td></tr> | 
|---|
 | 95 |  | 
|---|
 | 96 | <tr><td class="mdescLeft"> </td><td class="mdescRight">random variable in condition <br></td></tr> | 
|---|
| [139] | 97 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7aa894208a32f3487827df6d5054424c"></a><!-- doxytag: member="mmix::ep" ref="7aa894208a32f3487827df6d5054424c" args="" --> | 
|---|
| [33] | 98 | <a class="el" href="classepdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#7aa894208a32f3487827df6d5054424c">ep</a></td></tr> | 
|---|
 | 99 |  | 
|---|
 | 100 | <tr><td class="mdescLeft"> </td><td class="mdescRight">pointer to internal <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> <br></td></tr> | 
|---|
 | 101 | </table> | 
|---|
 | 102 | <hr><a name="_details"></a><h2>Detailed Description</h2> | 
|---|
| [139] | 103 | Mixture of mpdfs with constant weights.  | 
|---|
| [33] | 104 | <p> | 
|---|
| [139] | 105 | <hr><h2>Member Function Documentation</h2> | 
|---|
 | 106 | <a class="anchor" name="b0193a350c97933ddf15b15a130da352"></a><!-- doxytag: member="mmix::samplecond" ref="b0193a350c97933ddf15b15a130da352" args="(vec &cond, double &ll)" --> | 
|---|
| [33] | 107 | <div class="memitem"> | 
|---|
 | 108 | <div class="memproto"> | 
|---|
 | 109 |       <table class="memname"> | 
|---|
 | 110 |         <tr> | 
|---|
 | 111 |           <td class="memname">virtual vec mpdf::samplecond           </td> | 
|---|
 | 112 |           <td>(</td> | 
|---|
 | 113 |           <td class="paramtype">vec & </td> | 
|---|
 | 114 |           <td class="paramname"> <em>cond</em>, </td> | 
|---|
 | 115 |         </tr> | 
|---|
 | 116 |         <tr> | 
|---|
 | 117 |           <td class="paramkey"></td> | 
|---|
 | 118 |           <td></td> | 
|---|
 | 119 |           <td class="paramtype">double & </td> | 
|---|
 | 120 |           <td class="paramname"> <em>ll</em></td><td> </td> | 
|---|
 | 121 |         </tr> | 
|---|
 | 122 |         <tr> | 
|---|
 | 123 |           <td></td> | 
|---|
 | 124 |           <td>)</td> | 
|---|
| [139] | 125 |           <td></td><td></td><td><code> [inline, virtual, inherited]</code></td> | 
|---|
| [33] | 126 |         </tr> | 
|---|
 | 127 |       </table> | 
|---|
 | 128 | </div> | 
|---|
 | 129 | <div class="memdoc"> | 
|---|
 | 130 |  | 
|---|
 | 131 | <p> | 
|---|
 | 132 | Returns the required moment of the <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.  | 
|---|
 | 133 | <p> | 
|---|
 | 134 | Returns a sample from the density conditioned on <code>cond</code>, <img class="formulaInl" alt="$x \sim epdf(rv|cond)$" src="form_10.png">. <dl compact><dt><b>Parameters:</b></dt><dd> | 
|---|
 | 135 |   <table border="0" cellspacing="2" cellpadding="0"> | 
|---|
 | 136 |     <tr><td valign="top"></td><td valign="top"><em>cond</em> </td><td>is numeric value of <code>rv</code> </td></tr> | 
|---|
 | 137 |     <tr><td valign="top"></td><td valign="top"><em>ll</em> </td><td>is a return value of log-likelihood of the sample. </td></tr> | 
|---|
 | 138 |   </table> | 
|---|
 | 139 | </dl> | 
|---|
 | 140 |  | 
|---|
 | 141 | <p>Reimplemented in <a class="el" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18">mlnorm< sq_T ></a>, and <a class="el" href="classmgamma.html#9f40dc43885085fad8e3d6652b79e139">mgamma</a>.</p> | 
|---|
 | 142 |  | 
|---|
| [139] | 143 | <p>References <a class="el" href="libBM_8h-source.html#l00180">mpdf::condition()</a>, <a class="el" href="libBM_8h-source.html#l00163">mpdf::ep</a>, <a class="el" href="classepdf.html#6aef3eca74899692503769c18add1a4c">epdf::evalpdflog()</a>, and <a class="el" href="classepdf.html#8019654e494bf5e458f6fb947e11b262">epdf::sample()</a>.</p> | 
|---|
| [91] | 144 |  | 
|---|
 | 145 | <p>Referenced by <a class="el" href="libPF_8h-source.html#l00137">MPF< BM_T >::bayes()</a>, and <a class="el" href="libPF_8cpp-source.html#l00007">PF::bayes()</a>.</p> | 
|---|
 | 146 |  | 
|---|
| [33] | 147 | </div> | 
|---|
 | 148 | </div><p> | 
|---|
| [139] | 149 | <a class="anchor" name="6bf806badfdac606c847e458e8fce18c"></a><!-- doxytag: member="mmix::samplecond" ref="6bf806badfdac606c847e458e8fce18c" args="(vec &cond, vec &ll, int N)" --> | 
|---|
 | 150 | <div class="memitem"> | 
|---|
 | 151 | <div class="memproto"> | 
|---|
 | 152 |       <table class="memname"> | 
|---|
 | 153 |         <tr> | 
|---|
 | 154 |           <td class="memname">virtual mat mpdf::samplecond           </td> | 
|---|
 | 155 |           <td>(</td> | 
|---|
 | 156 |           <td class="paramtype">vec & </td> | 
|---|
 | 157 |           <td class="paramname"> <em>cond</em>, </td> | 
|---|
 | 158 |         </tr> | 
|---|
 | 159 |         <tr> | 
|---|
 | 160 |           <td class="paramkey"></td> | 
|---|
 | 161 |           <td></td> | 
|---|
 | 162 |           <td class="paramtype">vec & </td> | 
|---|
 | 163 |           <td class="paramname"> <em>ll</em>, </td> | 
|---|
 | 164 |         </tr> | 
|---|
 | 165 |         <tr> | 
|---|
 | 166 |           <td class="paramkey"></td> | 
|---|
 | 167 |           <td></td> | 
|---|
 | 168 |           <td class="paramtype">int </td> | 
|---|
 | 169 |           <td class="paramname"> <em>N</em></td><td> </td> | 
|---|
 | 170 |         </tr> | 
|---|
 | 171 |         <tr> | 
|---|
 | 172 |           <td></td> | 
|---|
 | 173 |           <td>)</td> | 
|---|
 | 174 |           <td></td><td></td><td><code> [inline, virtual, inherited]</code></td> | 
|---|
 | 175 |         </tr> | 
|---|
 | 176 |       </table> | 
|---|
 | 177 | </div> | 
|---|
 | 178 | <div class="memdoc"> | 
|---|
 | 179 |  | 
|---|
 | 180 | <p> | 
|---|
 | 181 | Returns N samples from the density conditioned on <code>cond</code>, <img class="formulaInl" alt="$x \sim epdf(rv|cond)$" src="form_10.png">.  | 
|---|
 | 182 | <p> | 
|---|
 | 183 | <dl compact><dt><b>Parameters:</b></dt><dd> | 
|---|
 | 184 |   <table border="0" cellspacing="2" cellpadding="0"> | 
|---|
 | 185 |     <tr><td valign="top"></td><td valign="top"><em>cond</em> </td><td>is numeric value of <code>rv</code> </td></tr> | 
|---|
 | 186 |     <tr><td valign="top"></td><td valign="top"><em>ll</em> </td><td>is a return value of log-likelihood of the sample. </td></tr> | 
|---|
 | 187 |   </table> | 
|---|
 | 188 | </dl> | 
|---|
 | 189 |  | 
|---|
 | 190 | <p>Reimplemented in <a class="el" href="classmlnorm.html#215fb88cc8b95d64cdefd6849abdd1e8">mlnorm< sq_T ></a>, and <a class="el" href="classmgamma.html#e9d52749793f40aad85b70c6db4435ae">mgamma</a>.</p> | 
|---|
 | 191 |  | 
|---|
 | 192 | <p>References <a class="el" href="libBM_8h-source.html#l00180">mpdf::condition()</a>, <a class="el" href="libBM_8h-source.html#l00057">RV::count()</a>, <a class="el" href="libBM_8h-source.html#l00163">mpdf::ep</a>, <a class="el" href="classepdf.html#6aef3eca74899692503769c18add1a4c">epdf::evalpdflog()</a>, <a class="el" href="libBM_8h-source.html#l00159">mpdf::rv</a>, and <a class="el" href="classepdf.html#8019654e494bf5e458f6fb947e11b262">epdf::sample()</a>.</p> | 
|---|
 | 193 |  | 
|---|
 | 194 | </div> | 
|---|
 | 195 | </div><p> | 
|---|
| [33] | 196 | <hr>The documentation for this class was generated from the following file:<ul> | 
|---|
| [139] | 197 | <li>work/mixpp/bdm/stat/<a class="el" href="emix_8h-source.html">emix.h</a></ul> | 
|---|
| [91] | 198 | </div> | 
|---|
| [139] | 199 | <hr size="1"><address style="text-align: right;"><small>Generated on Sat Aug 16 11:58:55 2008 for mixpp by  | 
|---|
| [33] | 200 | <a href="http://www.doxygen.org/index.html"> | 
|---|
| [139] | 201 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> | 
|---|
| [33] | 202 | </body> | 
|---|
 | 203 | </html> | 
|---|