| 70 | | <h1>bdm::mratio Class Reference</h1><!-- doxytag: class="bdm::mratio" --><!-- doxytag: inherits="bdm::mpdf" -->Class representing ratio of two densities which arise e.g. by applying the Bayes rule. It represents density in the form: <p class="formulaDsp"> |
| 71 | | <img class="formulaDsp" alt="\[ f(rv|rvc) = \frac{f(rv,rvc)}{f(rvc)} \]" src="form_62.png"> |
| 72 | | <p> |
| 73 | | where <img class="formulaInl" alt="$ f(rvc) = \int f(rv,rvc) d\ rv $" src="form_63.png">. |
| 74 | | <a href="#_details">More...</a> |
| 75 | | <p> |
| 76 | | <code>#include <<a class="el" href="emix_8h-source.html">emix.h</a>></code> |
| 77 | | <p> |
| 78 | | |
| 79 | | <p> |
| 80 | | <a href="classbdm_1_1mratio-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
| 81 | | <tr><td></td></tr> |
| 82 | | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
| 83 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#0ff56d13f9515d7e5f23b7a4cc5529b4">mratio</a> (const <a class="el" href="classbdm_1_1epdf.html">epdf</a> *nom0, const <a class="el" href="classbdm_1_1RV.html">RV</a> &rv, bool copy=false)</td></tr> |
| 84 | | |
| 85 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3a2cbce8c61ca9f592d9c2220f7c1204"></a><!-- doxytag: member="bdm::mratio::evallogcond" ref="3a2cbce8c61ca9f592d9c2220f7c1204" args="(const vec &val, const vec &cond)" --> |
| 86 | | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#3a2cbce8c61ca9f592d9c2220f7c1204">evallogcond</a> (const vec &val, const vec &cond)</td></tr> |
| 87 | | |
| 88 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">Shortcut for conditioning and evaluation of the internal <a class="el" href="classbdm_1_1epdf.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> |
| 89 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c8b39fea586d4258bb3c881406edaf15"></a><!-- doxytag: member="bdm::mratio::ownnom" ref="c8b39fea586d4258bb3c881406edaf15" args="()" --> |
| 90 | | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#c8b39fea586d4258bb3c881406edaf15">ownnom</a> ()</td></tr> |
| 91 | | |
| 92 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">Object takes ownership of nom and will destroy it. <br></td></tr> |
| 93 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c0cc0b25dbdc54751466616655454c5c"></a><!-- doxytag: member="bdm::mratio::~mratio" ref="c0cc0b25dbdc54751466616655454c5c" args="()" --> |
| 94 | | </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#c0cc0b25dbdc54751466616655454c5c">~mratio</a> ()</td></tr> |
| 95 | | |
| 96 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default destructor. <br></td></tr> |
| 97 | | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#30a0bceb948e287d497c578e371b1667">from_setting</a> (const Setting &set)</td></tr> |
| 98 | | |
| 99 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af0e6941ba5919cae1bc530e2181b109"></a><!-- doxytag: member="bdm::mratio::to_string" ref="af0e6941ba5919cae1bc530e2181b109" args="()" --> |
| 100 | | virtual string </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#af0e6941ba5919cae1bc530e2181b109">to_string</a> ()</td></tr> |
| 101 | | |
| 102 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method returns a basic info about the current instance. <br></td></tr> |
| 103 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="67d954d255ede776eade7334d4895790"></a><!-- doxytag: member="bdm::mratio::to_setting" ref="67d954d255ede776eade7334d4895790" args="(Setting &set) const " --> |
| 104 | | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#67d954d255ede776eade7334d4895790">to_setting</a> (Setting &set) const </td></tr> |
| 105 | | |
| 106 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method save all the instance properties into the Setting structure. <br></td></tr> |
| 107 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1c314bd6d6dacb8ba78ea5eb88fd9516"></a><!-- doxytag: member="bdm::mratio::validate" ref="1c314bd6d6dacb8ba78ea5eb88fd9516" args="()" --> |
| 108 | | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#1c314bd6d6dacb8ba78ea5eb88fd9516">validate</a> ()</td></tr> |
| 109 | | |
| 110 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method TODO. <br></td></tr> |
| | 73 | <h1>bdm::mratio Class Reference</h1><!-- doxytag: class="bdm::mratio" --><!-- doxytag: inherits="bdm::mpdf" --> |
| | 74 | <p>Class representing ratio of two densities which arise e.g. by applying the Bayes rule. It represents density in the form: </p> |
| | 75 | <p class="formulaDsp"> |
| | 76 | <img class="formulaDsp" alt="\[ f(rv|rvc) = \frac{f(rv,rvc)}{f(rvc)} \]" src="form_62.png"/> |
| | 77 | </p> |
| | 78 | <p> where <img class="formulaInl" alt="$ f(rvc) = \int f(rv,rvc) d\ rv $" src="form_63.png"/>. |
| | 79 | <a href="#_details">More...</a></p> |
| | 80 | |
| | 81 | <p><code>#include <<a class="el" href="emix_8h_source.html">emix.h</a>></code></p> |
| | 82 | |
| | 83 | <p><a href="classbdm_1_1mratio-members.html">List of all members.</a></p> |
| | 84 | <table border="0" cellpadding="0" cellspacing="0"> |
| | 85 | <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> |
| | 86 | <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#a0ff56d13f9515d7e5f23b7a4cc5529b4">mratio</a> (const <a class="el" href="classbdm_1_1epdf.html">epdf</a> *nom0, const <a class="el" href="classbdm_1_1RV.html">RV</a> &rv, bool copy=false)</td></tr> |
| | 87 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3a2cbce8c61ca9f592d9c2220f7c1204"></a><!-- doxytag: member="bdm::mratio::evallogcond" ref="a3a2cbce8c61ca9f592d9c2220f7c1204" args="(const vec &val, const vec &cond)" --> |
| | 88 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#a3a2cbce8c61ca9f592d9c2220f7c1204">evallogcond</a> (const vec &val, const vec &cond)</td></tr> |
| | 89 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Shortcut for conditioning and evaluation of the internal <a class="el" href="classbdm_1_1epdf.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> |
| | 90 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac8b39fea586d4258bb3c881406edaf15"></a><!-- doxytag: member="bdm::mratio::ownnom" ref="ac8b39fea586d4258bb3c881406edaf15" args="()" --> |
| | 91 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#ac8b39fea586d4258bb3c881406edaf15">ownnom</a> ()</td></tr> |
| | 92 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Object takes ownership of nom and will destroy it. <br/></td></tr> |
| | 93 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac0cc0b25dbdc54751466616655454c5c"></a><!-- doxytag: member="bdm::mratio::~mratio" ref="ac0cc0b25dbdc54751466616655454c5c" args="()" --> |
| | 94 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#ac0cc0b25dbdc54751466616655454c5c">~mratio</a> ()</td></tr> |
| | 95 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default destructor. <br/></td></tr> |
| | 96 | <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#a30a0bceb948e287d497c578e371b1667">from_setting</a> (const Setting &set)</td></tr> |
| | 97 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaf0e6941ba5919cae1bc530e2181b109"></a><!-- doxytag: member="bdm::mratio::to_string" ref="aaf0e6941ba5919cae1bc530e2181b109" args="()" --> |
| | 98 | virtual string </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#aaf0e6941ba5919cae1bc530e2181b109">to_string</a> ()</td></tr> |
| | 99 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method returns a basic info about the current instance. <br/></td></tr> |
| | 100 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a67d954d255ede776eade7334d4895790"></a><!-- doxytag: member="bdm::mratio::to_setting" ref="a67d954d255ede776eade7334d4895790" args="(Setting &set) const " --> |
| | 101 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#a67d954d255ede776eade7334d4895790">to_setting</a> (Setting &set) const </td></tr> |
| | 102 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method save all the instance properties into the Setting structure. <br/></td></tr> |
| | 103 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1c314bd6d6dacb8ba78ea5eb88fd9516"></a><!-- doxytag: member="bdm::mratio::validate" ref="a1c314bd6d6dacb8ba78ea5eb88fd9516" args="()" --> |
| | 104 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#a1c314bd6d6dacb8ba78ea5eb88fd9516">validate</a> ()</td></tr> |
| | 105 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method TODO. <br/></td></tr> |
| 112 | | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#f0c1db6fcbb3aae2dd6123884457a367">samplecond</a> (const vec &cond)</td></tr> |
| 113 | | |
| 114 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a sample from the density conditioned on <code>cond</code>, <img class="formulaInl" alt="$x \sim epdf(rv|cond)$" src="form_11.png">. <a href="#f0c1db6fcbb3aae2dd6123884457a367"></a><br></td></tr> |
| 115 | | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#6e497d501331057309d2fddf63259d1a">samplecond_m</a> (const vec &cond, int N)</td></tr> |
| 116 | | |
| 117 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns. <a href="#6e497d501331057309d2fddf63259d1a"></a><br></td></tr> |
| 118 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0b0ed1ed663071bb7cf4a1349eb94fcb"></a><!-- doxytag: member="bdm::mratio::evallogcond_m" ref="0b0ed1ed663071bb7cf4a1349eb94fcb" args="(const mat &Dt, const vec &cond)" --> |
| 119 | | virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#0b0ed1ed663071bb7cf4a1349eb94fcb">evallogcond_m</a> (const mat &Dt, const vec &cond)</td></tr> |
| 120 | | |
| 121 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix version of evallogcond. <br></td></tr> |
| 122 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2a0d03756f59924fd038980ee60bd904"></a><!-- doxytag: member="bdm::mratio::evallogcond_m" ref="2a0d03756f59924fd038980ee60bd904" args="(const Array< vec > &Dt, const vec &cond)" --> |
| 123 | | virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#2a0d03756f59924fd038980ee60bd904">evallogcond_m</a> (const Array< vec > &Dt, const vec &cond)</td></tr> |
| 124 | | |
| 125 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">Array<vec> version of evallogcond. <br></td></tr> |
| | 107 | <tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp8096b150de0e99b4ea272a92f021107c"></a> </p> |
| | 108 | <br/><br/></div></td></tr> |
| | 109 | <tr><td class="memItemLeft" align="right" valign="top">virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#af0c1db6fcbb3aae2dd6123884457a367">samplecond</a> (const vec &cond)</td></tr> |
| | 110 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a sample from the density conditioned on <code>cond</code>, <img class="formulaInl" alt="$x \sim epdf(rv|cond)$" src="form_11.png"/>. <a href="#af0c1db6fcbb3aae2dd6123884457a367"></a><br/></td></tr> |
| | 111 | <tr><td class="memItemLeft" align="right" valign="top">virtual mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#a6e497d501331057309d2fddf63259d1a">samplecond_m</a> (const vec &cond, int N)</td></tr> |
| | 112 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns. <a href="#a6e497d501331057309d2fddf63259d1a"></a><br/></td></tr> |
| | 113 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0b0ed1ed663071bb7cf4a1349eb94fcb"></a><!-- doxytag: member="bdm::mratio::evallogcond_m" ref="a0b0ed1ed663071bb7cf4a1349eb94fcb" args="(const mat &Dt, const vec &cond)" --> |
| | 114 | virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#a0b0ed1ed663071bb7cf4a1349eb94fcb">evallogcond_m</a> (const mat &Dt, const vec &cond)</td></tr> |
| | 115 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix version of evallogcond. <br/></td></tr> |
| | 116 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2a0d03756f59924fd038980ee60bd904"></a><!-- doxytag: member="bdm::mratio::evallogcond_m" ref="a2a0d03756f59924fd038980ee60bd904" args="(const Array< vec > &Dt, const vec &cond)" --> |
| | 117 | virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#a2a0d03756f59924fd038980ee60bd904">evallogcond_m</a> (const Array< vec > &Dt, const vec &cond)</td></tr> |
| | 118 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Array<vec> version of evallogcond. <br/></td></tr> |
| 148 | | |
| 149 | | <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> |
| 150 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="147afacb393324bb3f9a7a89e33f835e"></a><!-- doxytag: member="bdm::mratio::set_ep" ref="147afacb393324bb3f9a7a89e33f835e" args="(epdf &iepdf)" --> |
| 151 | | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#147afacb393324bb3f9a7a89e33f835e">set_ep</a> (<a class="el" href="classbdm_1_1epdf.html">epdf</a> &<a class="el" href="classbdm_1_1mratio.html#7a676422bc6cc426ffa6fddf52672409">iepdf</a>)</td></tr> |
| 152 | | |
| 153 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">set internal pointer <code>ep</code> to point to given <code>iepdf</code> <br></td></tr> |
| 154 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7555b377f8b5895c9b759c9628ee3e20"></a><!-- doxytag: member="bdm::mratio::set_ep" ref="7555b377f8b5895c9b759c9628ee3e20" args="(epdf *iepdfp)" --> |
| 155 | | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#7555b377f8b5895c9b759c9628ee3e20">set_ep</a> (<a class="el" href="classbdm_1_1epdf.html">epdf</a> *iepdfp)</td></tr> |
| 156 | | |
| 157 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">set internal pointer <code>ep</code> to point to given <code>iepdf</code> <br></td></tr> |
| 158 | | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> |
| 159 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f31caba90a2aa10fbf7631832404fe54"></a><!-- doxytag: member="bdm::mratio::nom" ref="f31caba90a2aa10fbf7631832404fe54" args="" --> |
| 160 | | const <a class="el" href="classbdm_1_1epdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#f31caba90a2aa10fbf7631832404fe54">nom</a></td></tr> |
| 161 | | |
| 162 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">Nominator in the form of <a class="el" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling , where is random variable, rv, and...">mpdf</a>. <br></td></tr> |
| 163 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="873598797f36eddab44e342e14563fcb"></a><!-- doxytag: member="bdm::mratio::den" ref="873598797f36eddab44e342e14563fcb" args="" --> |
| 164 | | <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>< <a class="el" href="classbdm_1_1epdf.html">epdf</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#873598797f36eddab44e342e14563fcb">den</a></td></tr> |
| 165 | | |
| 166 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">Denominator in the form of <a class="el" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>. <br></td></tr> |
| 167 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="51bfe6675e724f7fbeaaeacce5a9f9b8"></a><!-- doxytag: member="bdm::mratio::destroynom" ref="51bfe6675e724f7fbeaaeacce5a9f9b8" args="" --> |
| 168 | | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#51bfe6675e724f7fbeaaeacce5a9f9b8">destroynom</a></td></tr> |
| 169 | | |
| 170 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">flag for destructor <br></td></tr> |
| 171 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cda5bd23ba60146d69e1f804ff7710c7"></a><!-- doxytag: member="bdm::mratio::dl" ref="cda5bd23ba60146d69e1f804ff7710c7" args="" --> |
| 172 | | <a class="el" href="classbdm_1_1datalink__m2e.html">datalink_m2e</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#cda5bd23ba60146d69e1f804ff7710c7">dl</a></td></tr> |
| 173 | | |
| 174 | | <tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classbdm_1_1datalink.html" title="DataLink is a connection between two data vectors Up and Down.">datalink</a> between conditional and nom <br></td></tr> |
| 175 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7a676422bc6cc426ffa6fddf52672409"></a><!-- doxytag: member="bdm::mratio::iepdf" ref="7a676422bc6cc426ffa6fddf52672409" args="" --> |
| 176 | | <a class="el" href="classbdm_1_1epdf.html">epdf</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#7a676422bc6cc426ffa6fddf52672409">iepdf</a></td></tr> |
| 177 | | |
| 178 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">dummy <a class="el" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> that stores only rv and dim <br></td></tr> |
| 179 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7c1900976ff13dbc09c9729b3bbff9e6"></a><!-- doxytag: member="bdm::mratio::dimc" ref="7c1900976ff13dbc09c9729b3bbff9e6" args="" --> |
| 180 | | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6">dimc</a></td></tr> |
| 181 | | |
| 182 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">dimension of the condition <br></td></tr> |
| 183 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5a5f08950daa08b85b01ddf4e1c36288"></a><!-- doxytag: member="bdm::mratio::rvc" ref="5a5f08950daa08b85b01ddf4e1c36288" args="" --> |
| 184 | | <a class="el" href="classbdm_1_1RV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288">rvc</a></td></tr> |
| 185 | | |
| 186 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">random variable in condition <br></td></tr> |
| | 139 | <tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr> |
| | 140 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a147afacb393324bb3f9a7a89e33f835e"></a><!-- doxytag: member="bdm::mratio::set_ep" ref="a147afacb393324bb3f9a7a89e33f835e" args="(epdf &iepdf)" --> |
| | 141 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#a147afacb393324bb3f9a7a89e33f835e">set_ep</a> (<a class="el" href="classbdm_1_1epdf.html">epdf</a> &<a class="el" href="classbdm_1_1mratio.html#a7a676422bc6cc426ffa6fddf52672409">iepdf</a>)</td></tr> |
| | 142 | <tr><td class="mdescLeft"> </td><td class="mdescRight">set internal pointer <code>ep</code> to point to given <code>iepdf</code> <br/></td></tr> |
| | 143 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7555b377f8b5895c9b759c9628ee3e20"></a><!-- doxytag: member="bdm::mratio::set_ep" ref="a7555b377f8b5895c9b759c9628ee3e20" args="(epdf *iepdfp)" --> |
| | 144 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#a7555b377f8b5895c9b759c9628ee3e20">set_ep</a> (<a class="el" href="classbdm_1_1epdf.html">epdf</a> *iepdfp)</td></tr> |
| | 145 | <tr><td class="mdescLeft"> </td><td class="mdescRight">set internal pointer <code>ep</code> to point to given <code>iepdf</code> <br/></td></tr> |
| | 146 | <tr><td colspan="2"><h2>Protected Attributes</h2></td></tr> |
| | 147 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af31caba90a2aa10fbf7631832404fe54"></a><!-- doxytag: member="bdm::mratio::nom" ref="af31caba90a2aa10fbf7631832404fe54" args="" --> |
| | 148 | const <a class="el" href="classbdm_1_1epdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#af31caba90a2aa10fbf7631832404fe54">nom</a></td></tr> |
| | 149 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Nominator in the form of <a class="el" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling , where is random variable, rv, and...">mpdf</a>. <br/></td></tr> |
| | 150 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a873598797f36eddab44e342e14563fcb"></a><!-- doxytag: member="bdm::mratio::den" ref="a873598797f36eddab44e342e14563fcb" args="" --> |
| | 151 | <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>< <a class="el" href="classbdm_1_1epdf.html">epdf</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#a873598797f36eddab44e342e14563fcb">den</a></td></tr> |
| | 152 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Denominator in the form of <a class="el" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>. <br/></td></tr> |
| | 153 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a51bfe6675e724f7fbeaaeacce5a9f9b8"></a><!-- doxytag: member="bdm::mratio::destroynom" ref="a51bfe6675e724f7fbeaaeacce5a9f9b8" args="" --> |
| | 154 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#a51bfe6675e724f7fbeaaeacce5a9f9b8">destroynom</a></td></tr> |
| | 155 | <tr><td class="mdescLeft"> </td><td class="mdescRight">flag for destructor <br/></td></tr> |
| | 156 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acda5bd23ba60146d69e1f804ff7710c7"></a><!-- doxytag: member="bdm::mratio::dl" ref="acda5bd23ba60146d69e1f804ff7710c7" args="" --> |
| | 157 | <a class="el" href="classbdm_1_1datalink__m2e.html">datalink_m2e</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#acda5bd23ba60146d69e1f804ff7710c7">dl</a></td></tr> |
| | 158 | <tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classbdm_1_1datalink.html" title="DataLink is a connection between two data vectors Up and Down.">datalink</a> between conditional and nom <br/></td></tr> |
| | 159 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7a676422bc6cc426ffa6fddf52672409"></a><!-- doxytag: member="bdm::mratio::iepdf" ref="a7a676422bc6cc426ffa6fddf52672409" args="" --> |
| | 160 | <a class="el" href="classbdm_1_1epdf.html">epdf</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#a7a676422bc6cc426ffa6fddf52672409">iepdf</a></td></tr> |
| | 161 | <tr><td class="mdescLeft"> </td><td class="mdescRight">dummy <a class="el" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> that stores only rv and dim <br/></td></tr> |
| | 162 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7c1900976ff13dbc09c9729b3bbff9e6"></a><!-- doxytag: member="bdm::mratio::dimc" ref="a7c1900976ff13dbc09c9729b3bbff9e6" args="" --> |
| | 163 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#a7c1900976ff13dbc09c9729b3bbff9e6">dimc</a></td></tr> |
| | 164 | <tr><td class="mdescLeft"> </td><td class="mdescRight">dimension of the condition <br/></td></tr> |
| | 165 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5a5f08950daa08b85b01ddf4e1c36288"></a><!-- doxytag: member="bdm::mratio::rvc" ref="a5a5f08950daa08b85b01ddf4e1c36288" args="" --> |
| | 166 | <a class="el" href="classbdm_1_1RV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#a5a5f08950daa08b85b01ddf4e1c36288">rvc</a></td></tr> |
| | 167 | <tr><td class="mdescLeft"> </td><td class="mdescRight">random variable in condition <br/></td></tr> |
| 188 | | <hr><a name="_details"></a><h2>Detailed Description</h2> |
| 189 | | Class representing ratio of two densities which arise e.g. by applying the Bayes rule. It represents density in the form: <p class="formulaDsp"> |
| 190 | | <img class="formulaDsp" alt="\[ f(rv|rvc) = \frac{f(rv,rvc)}{f(rvc)} \]" src="form_62.png"> |
| 191 | | <p> |
| 192 | | where <img class="formulaInl" alt="$ f(rvc) = \int f(rv,rvc) d\ rv $" src="form_63.png">. |
| 193 | | <p> |
| 194 | | In particular this type of arise by conditioning of a mixture model.<p> |
| 195 | | At present the only supported operation is <a class="el" href="classbdm_1_1mratio.html#3a2cbce8c61ca9f592d9c2220f7c1204" title="Shortcut for conditioning and evaluation of the internal epdf. In some cases, this...">evallogcond()</a>. <hr><h2>Constructor & Destructor Documentation</h2> |
| 196 | | <a class="anchor" name="0ff56d13f9515d7e5f23b7a4cc5529b4"></a><!-- doxytag: member="bdm::mratio::mratio" ref="0ff56d13f9515d7e5f23b7a4cc5529b4" args="(const epdf *nom0, const RV &rv, bool copy=false)" --> |
| | 169 | <hr/><a name="_details"></a><h2>Detailed Description</h2> |
| | 170 | <p>Class representing ratio of two densities which arise e.g. by applying the Bayes rule. It represents density in the form: </p> |
| | 171 | <p class="formulaDsp"> |
| | 172 | <img class="formulaDsp" alt="\[ f(rv|rvc) = \frac{f(rv,rvc)}{f(rvc)} \]" src="form_62.png"/> |
| | 173 | </p> |
| | 174 | <p> where <img class="formulaInl" alt="$ f(rvc) = \int f(rv,rvc) d\ rv $" src="form_63.png"/>. </p> |
| | 175 | <p>In particular this type of arise by conditioning of a mixture model.</p> |
| | 176 | <p>At present the only supported operation is <a class="el" href="classbdm_1_1mratio.html#a3a2cbce8c61ca9f592d9c2220f7c1204" title="Shortcut for conditioning and evaluation of the internal epdf. In some cases, this...">evallogcond()</a>. </p> |
| | 177 | <hr/><h2>Constructor & Destructor Documentation</h2> |
| | 178 | <a class="anchor" id="a0ff56d13f9515d7e5f23b7a4cc5529b4"></a><!-- doxytag: member="bdm::mratio::mratio" ref="a0ff56d13f9515d7e5f23b7a4cc5529b4" args="(const epdf *nom0, const RV &rv, bool copy=false)" --> |
| 226 | | |
| 227 | | <p> |
| 228 | | Default constructor. By default, the given <a class="el" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> is not copied! It is assumed that this function will be used only temporarily. |
| 229 | | <p>References <a class="el" href="bdmbase_8h-source.html#l00138">bdm::RV::_dsize()</a>, <a class="el" href="bdmbase_8h-source.html#l00368">bdm::epdf::_rv()</a>, <a class="el" href="bdmerror_8h-source.html#l00047">bdm_assert_debug</a>, <a class="el" href="bdmerror_8h-source.html#l00051">bdm_error</a>, <a class="el" href="emix_8h-source.html#l00043">den</a>, <a class="el" href="emix_8h-source.html#l00046">destroynom</a>, <a class="el" href="bdmbase_8h-source.html#l00403">bdm::mpdf::dimc</a>, <a class="el" href="emix_8h-source.html#l00048">dl</a>, <a class="el" href="emix_8h-source.html#l00050">iepdf</a>, <a class="el" href="bdmbase_8h-source.html#l00148">bdm::RV::length()</a>, <a class="el" href="bdmbase_8cpp-source.html#l00141">bdm::epdf::marginal()</a>, <a class="el" href="emix_8h-source.html#l00040">nom</a>, <a class="el" href="bdmbase_8h-source.html#l00405">bdm::mpdf::rvc</a>, <a class="el" href="bdmbase_8cpp-source.html#l00207">bdm::datalink_m2e::set_connection()</a>, <a class="el" href="bdmbase_8h-source.html#l00412">bdm::mpdf::set_ep()</a>, <a class="el" href="bdmbase_8h-source.html#l00293">bdm::epdf::set_parameters()</a>, <a class="el" href="bdmbase_8h-source.html#l00357">bdm::epdf::set_rv()</a>, and <a class="el" href="bdmbase_8cpp-source.html#l00300">bdm::RV::subt()</a>.</p> |
| 230 | | |
| 231 | | </div> |
| 232 | | </div><p> |
| 233 | | <hr><h2>Member Function Documentation</h2> |
| 234 | | <a class="anchor" name="30a0bceb948e287d497c578e371b1667"></a><!-- doxytag: member="bdm::mratio::from_setting" ref="30a0bceb948e287d497c578e371b1667" args="(const Setting &set)" --> |
| | 208 | <p>Default constructor. By default, the given <a class="el" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> is not copied! It is assumed that this function will be used only temporarily. </p> |
| | 209 | |
| | 210 | <p>References <a class="el" href="bdmbase_8h_source.html#l00368">bdm::epdf::_rv()</a>, <a class="el" href="bdmerror_8h_source.html#l00047">bdm_assert_debug</a>, <a class="el" href="bdmerror_8h_source.html#l00051">bdm_error</a>, <a class="el" href="emix_8h_source.html#l00043">den</a>, <a class="el" href="emix_8h_source.html#l00046">destroynom</a>, <a class="el" href="bdmbase_8h_source.html#l00403">bdm::mpdf::dimc</a>, <a class="el" href="emix_8h_source.html#l00048">dl</a>, <a class="el" href="emix_8h_source.html#l00050">iepdf</a>, <a class="el" href="bdmbase_8cpp_source.html#l00141">bdm::epdf::marginal()</a>, <a class="el" href="emix_8h_source.html#l00040">nom</a>, <a class="el" href="bdmbase_8h_source.html#l00405">bdm::mpdf::rvc</a>, <a class="el" href="bdmbase_8cpp_source.html#l00207">bdm::datalink_m2e::set_connection()</a>, <a class="el" href="bdmbase_8h_source.html#l00412">bdm::mpdf::set_ep()</a>, <a class="el" href="bdmbase_8h_source.html#l00357">bdm::epdf::set_rv()</a>, and <a class="el" href="bdmbase_8cpp_source.html#l00300">bdm::RV::subt()</a>.</p> |
| | 211 | |
| | 212 | </div> |
| | 213 | </div> |
| | 214 | <hr/><h2>Member Function Documentation</h2> |
| | 215 | <a class="anchor" id="a30a0bceb948e287d497c578e371b1667"></a><!-- doxytag: member="bdm::mratio::from_setting" ref="a30a0bceb948e287d497c578e371b1667" args="(const Setting &set)" --> |
| 288 | | <p>Reimplemented in <a class="el" href="classbdm_1_1mpdf__internal.html#d8e547695d1cc19219b91164d825c930">bdm::mpdf_internal< EPDF ></a>, <a class="el" href="classbdm_1_1mepdf.html#b904a90ef78294040b498717cc13015e">bdm::mepdf</a>, <a class="el" href="classbdm_1_1mprod.html#ee715a8013acf9892f6cb489db595555">bdm::mprod</a>, <a class="el" href="classbdm_1_1mmix.html#c97f01cd62bf63e67ddd5b1b8a56cf59">bdm::mmix</a>, <a class="el" href="classbdm_1_1mpdf__internal.html#d8e547695d1cc19219b91164d825c930">bdm::mpdf_internal< egamma ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#d8e547695d1cc19219b91164d825c930">bdm::mpdf_internal< enorm< chmat > ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#d8e547695d1cc19219b91164d825c930">bdm::mpdf_internal< enorm< sq_T > ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#d8e547695d1cc19219b91164d825c930">bdm::mpdf_internal< eigamma ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#d8e547695d1cc19219b91164d825c930">bdm::mpdf_internal< elognorm ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#d8e547695d1cc19219b91164d825c930">bdm::mpdf_internal< eiWishartCh ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#d8e547695d1cc19219b91164d825c930">bdm::mpdf_internal< enorm< ldmat > ></a>, and <a class="el" href="classbdm_1_1mpdf__internal.html#d8e547695d1cc19219b91164d825c930">bdm::mpdf_internal< TEpdf< sq_T > ></a>.</p> |
| 289 | | |
| 290 | | <p>References <a class="el" href="bdmerror_8h-source.html#l00051">bdm_error</a>.</p> |
| 291 | | |
| 292 | | <p>Referenced by <a class="el" href="particles_8h-source.html#l00239">bdm::MPF< BM_T >::bayes()</a>, <a class="el" href="particles_8cpp-source.html#l00007">bdm::PF::bayes()</a>, and <a class="el" href="bdmbase_8cpp-source.html#l00170">bdm::mpdf::samplecond_m()</a>.</p> |
| 293 | | |
| 294 | | </div> |
| 295 | | </div><p> |
| 296 | | <a class="anchor" name="6e497d501331057309d2fddf63259d1a"></a><!-- doxytag: member="bdm::mratio::samplecond_m" ref="6e497d501331057309d2fddf63259d1a" args="(const vec &cond, int N)" --> |
| | 267 | <p>Reimplemented in <a class="el" href="classbdm_1_1mpdf__internal.html#ad8e547695d1cc19219b91164d825c930">bdm::mpdf_internal< EPDF ></a>, <a class="el" href="classbdm_1_1mepdf.html#ab904a90ef78294040b498717cc13015e">bdm::mepdf</a>, <a class="el" href="classbdm_1_1mprod.html#aee715a8013acf9892f6cb489db595555">bdm::mprod</a>, <a class="el" href="classbdm_1_1mmix.html#ac97f01cd62bf63e67ddd5b1b8a56cf59">bdm::mmix</a>, <a class="el" href="classbdm_1_1mpdf__internal.html#ad8e547695d1cc19219b91164d825c930">bdm::mpdf_internal< enorm< sq_T > ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#ad8e547695d1cc19219b91164d825c930">bdm::mpdf_internal< elognorm ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#ad8e547695d1cc19219b91164d825c930">bdm::mpdf_internal< TEpdf< sq_T > ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#ad8e547695d1cc19219b91164d825c930">bdm::mpdf_internal< egamma ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#ad8e547695d1cc19219b91164d825c930">bdm::mpdf_internal< enorm< ldmat > ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#ad8e547695d1cc19219b91164d825c930">bdm::mpdf_internal< eiWishartCh ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#ad8e547695d1cc19219b91164d825c930">bdm::mpdf_internal< eigamma ></a>, and <a class="el" href="classbdm_1_1mpdf__internal.html#ad8e547695d1cc19219b91164d825c930">bdm::mpdf_internal< enorm< chmat > ></a>.</p> |
| | 268 | |
| | 269 | <p>References <a class="el" href="bdmerror_8h_source.html#l00051">bdm_error</a>.</p> |
| | 270 | |
| | 271 | <p>Referenced by <a class="el" href="particles_8h_source.html#l00239">bdm::MPF< BM_T >::bayes()</a>, <a class="el" href="particles_8cpp_source.html#l00007">bdm::PF::bayes()</a>, and <a class="el" href="bdmbase_8cpp_source.html#l00170">bdm::mpdf::samplecond_m()</a>.</p> |
| | 272 | |
| | 273 | </div> |
| | 274 | </div> |
| | 275 | <a class="anchor" id="a6e497d501331057309d2fddf63259d1a"></a><!-- doxytag: member="bdm::mratio::samplecond_m" ref="a6e497d501331057309d2fddf63259d1a" args="(const vec &cond, int N)" --> |
| 331 | | <p>Reimplemented in <a class="el" href="classbdm_1_1mpdf__internal.html#9554c554054da2d22cb8e908ae9c8823">bdm::mpdf_internal< EPDF ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#9554c554054da2d22cb8e908ae9c8823">bdm::mpdf_internal< egamma ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#9554c554054da2d22cb8e908ae9c8823">bdm::mpdf_internal< enorm< chmat > ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#9554c554054da2d22cb8e908ae9c8823">bdm::mpdf_internal< enorm< sq_T > ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#9554c554054da2d22cb8e908ae9c8823">bdm::mpdf_internal< eigamma ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#9554c554054da2d22cb8e908ae9c8823">bdm::mpdf_internal< elognorm ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#9554c554054da2d22cb8e908ae9c8823">bdm::mpdf_internal< eiWishartCh ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#9554c554054da2d22cb8e908ae9c8823">bdm::mpdf_internal< enorm< ldmat > ></a>, and <a class="el" href="classbdm_1_1mpdf__internal.html#9554c554054da2d22cb8e908ae9c8823">bdm::mpdf_internal< TEpdf< sq_T > ></a>.</p> |
| 332 | | |
| 333 | | <p>References <a class="el" href="bdmbase_8h-source.html#l00433">bdm::mpdf::samplecond()</a>.</p> |
| 334 | | |
| 335 | | </div> |
| 336 | | </div><p> |
| 337 | | <hr>The documentation for this class was generated from the following file:<ul> |
| 338 | | <li><a class="el" href="emix_8h-source.html">emix.h</a></ul> |
| 339 | | </div> |
| 340 | | <hr size="1"><address style="text-align: right;"><small>Generated on Sat Aug 29 20:49:46 2009 for mixpp by |
| | 309 | <p>Reimplemented in <a class="el" href="classbdm_1_1mpdf__internal.html#a9554c554054da2d22cb8e908ae9c8823">bdm::mpdf_internal< EPDF ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#a9554c554054da2d22cb8e908ae9c8823">bdm::mpdf_internal< enorm< sq_T > ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#a9554c554054da2d22cb8e908ae9c8823">bdm::mpdf_internal< elognorm ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#a9554c554054da2d22cb8e908ae9c8823">bdm::mpdf_internal< TEpdf< sq_T > ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#a9554c554054da2d22cb8e908ae9c8823">bdm::mpdf_internal< egamma ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#a9554c554054da2d22cb8e908ae9c8823">bdm::mpdf_internal< enorm< ldmat > ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#a9554c554054da2d22cb8e908ae9c8823">bdm::mpdf_internal< eiWishartCh ></a>, <a class="el" href="classbdm_1_1mpdf__internal.html#a9554c554054da2d22cb8e908ae9c8823">bdm::mpdf_internal< eigamma ></a>, and <a class="el" href="classbdm_1_1mpdf__internal.html#a9554c554054da2d22cb8e908ae9c8823">bdm::mpdf_internal< enorm< chmat > ></a>.</p> |
| | 310 | |
| | 311 | <p>References <a class="el" href="bdmbase_8h_source.html#l00433">bdm::mpdf::samplecond()</a>.</p> |
| | 312 | |
| | 313 | </div> |
| | 314 | </div> |
| | 315 | <hr/>The documentation for this class was generated from the following file:<ul> |
| | 316 | <li><a class="el" href="emix_8h_source.html">emix.h</a></li> |
| | 317 | </ul> |
| | 318 | </div> |
| | 319 | <hr size="1"/><address style="text-align: right;"><small>Generated on Sun Aug 30 22:10:50 2009 for mixpp by |