[32] | 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"> |
---|
| 3 | <title>mixpp: emix Class Reference</title> |
---|
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
| 5 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
| 6 | </head><body> |
---|
[106] | 7 | <!-- Generated by Doxygen 1.5.5 --> |
---|
| 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> |
---|
[32] | 24 | </div> |
---|
[106] | 25 | <div class="contents"> |
---|
| 26 | <h1>emix Class Reference</h1><!-- doxytag: class="emix" --><!-- doxytag: inherits="epdf" -->Mixture of epdfs. |
---|
[32] | 27 | <a href="#_details">More...</a> |
---|
| 28 | <p> |
---|
[106] | 29 | <code>#include <<a class="el" href="emix_8h-source.html">emix.h</a>></code> |
---|
[32] | 30 | <p> |
---|
| 31 | <div class="dynheader"> |
---|
| 32 | Inheritance diagram for emix:</div> |
---|
| 33 | <div class="dynsection"> |
---|
| 34 | <p><center><img src="classemix__inherit__graph.png" border="0" usemap="#emix__inherit__map" alt="Inheritance graph"></center> |
---|
| 35 | <map name="emix__inherit__map"> |
---|
[106] | 36 | <area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="7,7,52,31"></map> |
---|
[32] | 37 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> |
---|
| 38 | <div class="dynheader"> |
---|
| 39 | Collaboration diagram for emix:</div> |
---|
| 40 | <div class="dynsection"> |
---|
| 41 | <p><center><img src="classemix__coll__graph.png" border="0" usemap="#emix__coll__map" alt="Collaboration graph"></center> |
---|
| 42 | <map name="emix__coll__map"> |
---|
[106] | 43 | <area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="7,95,52,119"><area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="11,7,48,31"></map> |
---|
[32] | 44 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> |
---|
| 45 | |
---|
| 46 | <p> |
---|
| 47 | <a href="classemix-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
---|
| 48 | <tr><td></td></tr> |
---|
| 49 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
---|
[106] | 50 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3a10c8481115a5460877272ddb6532a6"></a><!-- doxytag: member="emix::emix" ref="3a10c8481115a5460877272ddb6532a6" args="(RV &rv)" --> |
---|
| 51 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classemix.html#3a10c8481115a5460877272ddb6532a6">emix</a> (<a class="el" href="classRV.html">RV</a> &<a class="el" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9">rv</a>)</td></tr> |
---|
[32] | 52 | |
---|
| 53 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr> |
---|
[106] | 54 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6ce82b24d7fe540ddbf44b472a005555"></a><!-- doxytag: member="emix::set_parameters" ref="6ce82b24d7fe540ddbf44b472a005555" args="(const vec &w, const Array< epdf * > &Coms)" --> |
---|
| 55 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classemix.html#6ce82b24d7fe540ddbf44b472a005555">set_parameters</a> (const vec &<a class="el" href="classemix.html#cdc8f4e2a5e43595ac5450d8a7f9d1ab">w</a>, const Array< <a class="el" href="classepdf.html">epdf</a> * > &<a class="el" href="classemix.html#7155d827417b53fb6aa5cff1459e6eb4">Coms</a>)</td></tr> |
---|
[32] | 56 | |
---|
[106] | 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">vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classemix.html#0650601f24e633e0ab09aa1e46c14483">sample</a> () const </td></tr> |
---|
[32] | 59 | |
---|
[106] | 60 | <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="#0650601f24e633e0ab09aa1e46c14483"></a><br></td></tr> |
---|
| 61 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b662a51d042b062020460e64bff4e9e8"></a><!-- doxytag: member="emix::mean" ref="b662a51d042b062020460e64bff4e9e8" args="() const " --> |
---|
| 62 | vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classemix.html#b662a51d042b062020460e64bff4e9e8">mean</a> () const </td></tr> |
---|
[32] | 63 | |
---|
[106] | 64 | <tr><td class="mdescLeft"> </td><td class="mdescRight">return expected value <br></td></tr> |
---|
| 65 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="469e910479b3402589104ef3bb1b5741"></a><!-- doxytag: member="emix::evalpdflog" ref="469e910479b3402589104ef3bb1b5741" args="(const vec &val) const " --> |
---|
| 66 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classemix.html#469e910479b3402589104ef3bb1b5741">evalpdflog</a> (const vec &val) const </td></tr> |
---|
[32] | 67 | |
---|
[106] | 68 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute log-probability of argument <code>val</code>. <br></td></tr> |
---|
| 69 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="35baf0f62307455cebfbf462144b4dd8"></a><!-- doxytag: member="emix::_w" ref="35baf0f62307455cebfbf462144b4dd8" args="()" --> |
---|
| 70 | vec & </td><td class="memItemRight" valign="bottom"><a class="el" href="classemix.html#35baf0f62307455cebfbf462144b4dd8">_w</a> ()</td></tr> |
---|
| 71 | |
---|
| 72 | <tr><td class="mdescLeft"> </td><td class="mdescRight">returns a pointer to the internal mean value. Use with Care! <br></td></tr> |
---|
| 73 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7b3523bce1de49f58afe7c1e428cc4fd"></a><!-- doxytag: member="emix::sample" ref="7b3523bce1de49f58afe7c1e428cc4fd" args="(int N) const " --> |
---|
| 74 | virtual mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#7b3523bce1de49f58afe7c1e428cc4fd">sample</a> (int N) const </td></tr> |
---|
| 75 | |
---|
| 76 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns N samples from density <img class="formulaInl" alt="$epdf(rv)$" src="form_59.png">. <br></td></tr> |
---|
[33] | 77 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3ea597362e11a0040fe7c990269d072c"></a><!-- doxytag: member="emix::eval" ref="3ea597362e11a0040fe7c990269d072c" args="(const vec &val) const " --> |
---|
| 78 | virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#3ea597362e11a0040fe7c990269d072c">eval</a> (const vec &val) const </td></tr> |
---|
| 79 | |
---|
[32] | 80 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute probability of argument <code>val</code>. <br></td></tr> |
---|
[33] | 81 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b89143f12c9b49282e30841e4fb5f337"></a><!-- doxytag: member="emix::_rv" ref="b89143f12c9b49282e30841e4fb5f337" args="() const " --> |
---|
| 82 | <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#b89143f12c9b49282e30841e4fb5f337">_rv</a> () const </td></tr> |
---|
| 83 | |
---|
| 84 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
[32] | 85 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> |
---|
[106] | 86 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cdc8f4e2a5e43595ac5450d8a7f9d1ab"></a><!-- doxytag: member="emix::w" ref="cdc8f4e2a5e43595ac5450d8a7f9d1ab" args="" --> |
---|
| 87 | vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classemix.html#cdc8f4e2a5e43595ac5450d8a7f9d1ab">w</a></td></tr> |
---|
[32] | 88 | |
---|
[106] | 89 | <tr><td class="mdescLeft"> </td><td class="mdescRight">weights of the components <br></td></tr> |
---|
[32] | 90 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7155d827417b53fb6aa5cff1459e6eb4"></a><!-- doxytag: member="emix::Coms" ref="7155d827417b53fb6aa5cff1459e6eb4" args="" --> |
---|
[106] | 91 | Array< <a class="el" href="classepdf.html">epdf</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="classemix.html#7155d827417b53fb6aa5cff1459e6eb4">Coms</a></td></tr> |
---|
[32] | 92 | |
---|
[106] | 93 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Component (epdfs). <br></td></tr> |
---|
[32] | 94 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="74da992e3f5d598da8850b646b79b9d9"></a><!-- doxytag: member="emix::rv" ref="74da992e3f5d598da8850b646b79b9d9" args="" --> |
---|
[106] | 95 | <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9">rv</a></td></tr> |
---|
[32] | 96 | |
---|
[106] | 97 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Identified of the random variable. <br></td></tr> |
---|
[32] | 98 | </table> |
---|
| 99 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
[106] | 100 | Mixture of epdfs. |
---|
| 101 | <p> |
---|
| 102 | Density function: <p class="formulaDsp"> |
---|
| 103 | <img class="formulaDsp" alt="\[ f(x) = \sum_{i=1}^{n} w_{i} f_i(x), \quad \sum_{i=1}^n w_i = 1. \]" src="form_63.png"> |
---|
| 104 | <p> |
---|
| 105 | where <img class="formulaInl" alt="$f_i(x)$" src="form_64.png"> is any density on random variable <img class="formulaInl" alt="$x$" src="form_28.png">, called <em>component</em>, <hr><h2>Member Function Documentation</h2> |
---|
| 106 | <a class="anchor" name="0650601f24e633e0ab09aa1e46c14483"></a><!-- doxytag: member="emix::sample" ref="0650601f24e633e0ab09aa1e46c14483" args="() const " --> |
---|
[32] | 107 | <div class="memitem"> |
---|
| 108 | <div class="memproto"> |
---|
| 109 | <table class="memname"> |
---|
| 110 | <tr> |
---|
[106] | 111 | <td class="memname">vec emix::sample </td> |
---|
[32] | 112 | <td>(</td> |
---|
| 113 | <td class="paramname"> </td> |
---|
| 114 | <td> ) </td> |
---|
[106] | 115 | <td width="100%"> const<code> [virtual]</code></td> |
---|
[32] | 116 | </tr> |
---|
| 117 | </table> |
---|
| 118 | </div> |
---|
| 119 | <div class="memdoc"> |
---|
| 120 | |
---|
| 121 | <p> |
---|
| 122 | 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>. |
---|
| 123 | <p> |
---|
[106] | 124 | Returns a sample, <img class="formulaInl" alt="$x$" src="form_28.png"> from density <img class="formulaInl" alt="$epdf(rv)$" src="form_59.png"> |
---|
| 125 | <p>Implements <a class="el" href="classepdf.html#8019654e494bf5e458f6fb947e11b262">epdf</a>.</p> |
---|
[32] | 126 | |
---|
[106] | 127 | <p>References <a class="el" href="emix_8h-source.html#l00037">Coms</a>, and <a class="el" href="emix_8h-source.html#l00035">w</a>.</p> |
---|
| 128 | |
---|
[32] | 129 | </div> |
---|
| 130 | </div><p> |
---|
[106] | 131 | <hr>The documentation for this class was generated from the following files:<ul> |
---|
| 132 | <li>work/mixpp/bdm/stat/<a class="el" href="emix_8h-source.html">emix.h</a><li>work/mixpp/bdm/stat/emix.cpp</ul> |
---|
| 133 | </div> |
---|
| 134 | <hr size="1"><address style="text-align: right;"><small>Generated on Fri May 9 23:06:41 2008 for mixpp by |
---|
[32] | 135 | <a href="http://www.doxygen.org/index.html"> |
---|
[106] | 136 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> |
---|
[32] | 137 | </body> |
---|
| 138 | </html> |
---|