[259] | 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: bdm::mratio Class Reference</title> |
---|
| 4 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
[290] | 5 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
[259] | 6 | </head><body> |
---|
[538] | 7 | <!-- Generated by Doxygen 1.5.8 --> |
---|
[271] | 8 | <script type="text/javascript"> |
---|
| 9 | <!-- |
---|
| 10 | function changeDisplayState (e){ |
---|
| 11 | var num=this.id.replace(/[^[0-9]/g,''); |
---|
| 12 | var button=this.firstChild; |
---|
| 13 | var sectionDiv=document.getElementById('dynsection'+num); |
---|
| 14 | if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ |
---|
| 15 | sectionDiv.style.display='block'; |
---|
| 16 | button.src='open.gif'; |
---|
| 17 | }else{ |
---|
| 18 | sectionDiv.style.display='none'; |
---|
| 19 | button.src='closed.gif'; |
---|
| 20 | } |
---|
| 21 | } |
---|
| 22 | function initDynSections(){ |
---|
| 23 | var divs=document.getElementsByTagName('div'); |
---|
| 24 | var sectionCounter=1; |
---|
| 25 | for(var i=0;i<divs.length-1;i++){ |
---|
| 26 | if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ |
---|
| 27 | var header=divs[i]; |
---|
| 28 | var section=divs[i+1]; |
---|
| 29 | var button=header.firstChild; |
---|
| 30 | if (button!='IMG'){ |
---|
| 31 | divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); |
---|
| 32 | button=document.createElement('img'); |
---|
| 33 | divs[i].insertBefore(button,divs[i].firstChild); |
---|
| 34 | } |
---|
| 35 | header.style.cursor='pointer'; |
---|
| 36 | header.onclick=changeDisplayState; |
---|
| 37 | header.id='dynheader'+sectionCounter; |
---|
| 38 | button.src='closed.gif'; |
---|
| 39 | section.id='dynsection'+sectionCounter; |
---|
| 40 | section.style.display='none'; |
---|
| 41 | section.style.marginLeft='14px'; |
---|
| 42 | sectionCounter++; |
---|
| 43 | } |
---|
| 44 | } |
---|
| 45 | } |
---|
| 46 | window.onload = initDynSections; |
---|
| 47 | --> |
---|
| 48 | </script> |
---|
[259] | 49 | <div class="navigation" id="top"> |
---|
| 50 | <div class="tabs"> |
---|
| 51 | <ul> |
---|
[271] | 52 | <li><a href="main.html"><span>Main Page</span></a></li> |
---|
[259] | 53 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
[290] | 54 | <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
---|
[259] | 55 | <li><a href="files.html"><span>Files</span></a></li> |
---|
| 56 | </ul> |
---|
| 57 | </div> |
---|
| 58 | <div class="tabs"> |
---|
| 59 | <ul> |
---|
| 60 | <li><a href="annotated.html"><span>Class List</span></a></li> |
---|
[290] | 61 | <li><a href="classes.html"><span>Class Index</span></a></li> |
---|
[259] | 62 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
| 63 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
| 64 | </ul> |
---|
| 65 | </div> |
---|
[271] | 66 | <div class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1mratio.html">mratio</a> |
---|
[259] | 67 | </div> |
---|
| 68 | </div> |
---|
| 69 | <div class="contents"> |
---|
[290] | 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"> |
---|
[397] | 71 | <img class="formulaDsp" alt="\[ f(rv|rvc) = \frac{f(rv,rvc)}{f(rvc)} \]" src="form_62.png"> |
---|
[259] | 72 | <p> |
---|
[397] | 73 | where <img class="formulaInl" alt="$ f(rvc) = \int f(rv,rvc) d\ rv $" src="form_63.png">. |
---|
[290] | 74 | <a href="#_details">More...</a> |
---|
[259] | 75 | <p> |
---|
[538] | 76 | <code>#include <<a class="el" href="emix_8h-source.html">emix.h</a>></code> |
---|
[270] | 77 | <p> |
---|
[290] | 78 | |
---|
[270] | 79 | <p> |
---|
[290] | 80 | <a href="classbdm_1_1mratio-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
---|
[259] | 81 | <tr><td></td></tr> |
---|
| 82 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
---|
[270] | 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> |
---|
[259] | 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> |
---|
[396] | 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> |
---|
[353] | 98 | |
---|
[396] | 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 | |
---|
[353] | 102 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method returns a basic info about the current instance. <br></td></tr> |
---|
[396] | 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> |
---|
[353] | 105 | |
---|
| 106 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method save all the instance properties into the Setting structure. <br></td></tr> |
---|
[396] | 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> |
---|
[368] | 109 | |
---|
| 110 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method TODO. <br></td></tr> |
---|
[270] | 111 | <tr><td colspan="2"><div class="groupHeader">Matematical operations</div></td></tr> |
---|
[538] | 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> |
---|
[259] | 113 | |
---|
[538] | 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> |
---|
[472] | 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> |
---|
[259] | 116 | |
---|
[472] | 117 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns. <a href="#6e497d501331057309d2fddf63259d1a"></a><br></td></tr> |
---|
[538] | 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> |
---|
[259] | 120 | |
---|
| 121 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix version of evallogcond. <br></td></tr> |
---|
[538] | 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> |
---|
[396] | 124 | |
---|
| 125 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Array<vec> version of evallogcond. <br></td></tr> |
---|
[270] | 126 | <tr><td colspan="2"><div class="groupHeader">Access to attributes</div></td></tr> |
---|
[538] | 127 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="222d5280e309c5a053ba73841e98c151"></a><!-- doxytag: member="bdm::mratio::_rv" ref="222d5280e309c5a053ba73841e98c151" args="() const " --> |
---|
| 128 | <a class="el" href="classbdm_1_1RV.html">RV</a> </td><td class="memItemRight" valign="bottom"><b>_rv</b> () const </td></tr> |
---|
[259] | 129 | |
---|
[270] | 130 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="26001264236846897bd11e4baad47245"></a><!-- doxytag: member="bdm::mratio::_rvc" ref="26001264236846897bd11e4baad47245" args="()" --> |
---|
| 131 | <a class="el" href="classbdm_1_1RV.html">RV</a> </td><td class="memItemRight" valign="bottom"><b>_rvc</b> ()</td></tr> |
---|
[259] | 132 | |
---|
[538] | 133 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="eea4a999ed9679181335927e9cb66d28"></a><!-- doxytag: member="bdm::mratio::dimension" ref="eea4a999ed9679181335927e9cb66d28" args="() const " --> |
---|
| 134 | int </td><td class="memItemRight" valign="bottom"><b>dimension</b> () const </td></tr> |
---|
[270] | 135 | |
---|
| 136 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="35e135910aed187b7290742f50e61bc8"></a><!-- doxytag: member="bdm::mratio::dimensionc" ref="35e135910aed187b7290742f50e61bc8" args="()" --> |
---|
| 137 | int </td><td class="memItemRight" valign="bottom"><b>dimensionc</b> ()</td></tr> |
---|
| 138 | |
---|
| 139 | <tr><td colspan="2"><div class="groupHeader">Connection to other objects</div></td></tr> |
---|
| 140 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7631a5570e4ade1420065e8df78f4401"></a><!-- doxytag: member="bdm::mratio::set_rvc" ref="7631a5570e4ade1420065e8df78f4401" args="(const RV &rvc0)" --> |
---|
| 141 | void </td><td class="memItemRight" valign="bottom"><b>set_rvc</b> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &rvc0)</td></tr> |
---|
| 142 | |
---|
| 143 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="18ac26bc2f96ae01ef4eb06178abbd75"></a><!-- doxytag: member="bdm::mratio::set_rv" ref="18ac26bc2f96ae01ef4eb06178abbd75" args="(const RV &rv0)" --> |
---|
| 144 | void </td><td class="memItemRight" valign="bottom"><b>set_rv</b> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &rv0)</td></tr> |
---|
| 145 | |
---|
| 146 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f8e3798150b42fd1f3e16ddbbe0e7045"></a><!-- doxytag: member="bdm::mratio::isnamed" ref="f8e3798150b42fd1f3e16ddbbe0e7045" args="()" --> |
---|
| 147 | bool </td><td class="memItemRight" valign="bottom"><b>isnamed</b> ()</td></tr> |
---|
| 148 | |
---|
[538] | 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> |
---|
[259] | 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 | |
---|
[538] | 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> |
---|
[259] | 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 | |
---|
[270] | 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> |
---|
[538] | 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> |
---|
[270] | 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> |
---|
[259] | 181 | |
---|
[270] | 182 | <tr><td class="mdescLeft"> </td><td class="mdescRight">dimension of the condition <br></td></tr> |
---|
[259] | 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> |
---|
| 187 | </table> |
---|
[290] | 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"> |
---|
[397] | 190 | <img class="formulaDsp" alt="\[ f(rv|rvc) = \frac{f(rv,rvc)}{f(rvc)} \]" src="form_62.png"> |
---|
[290] | 191 | <p> |
---|
[397] | 192 | where <img class="formulaInl" alt="$ f(rvc) = \int f(rv,rvc) d\ rv $" src="form_63.png">. |
---|
[290] | 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> |
---|
[259] | 196 | <a class="anchor" name="0ff56d13f9515d7e5f23b7a4cc5529b4"></a><!-- doxytag: member="bdm::mratio::mratio" ref="0ff56d13f9515d7e5f23b7a4cc5529b4" args="(const epdf *nom0, const RV &rv, bool copy=false)" --> |
---|
| 197 | <div class="memitem"> |
---|
| 198 | <div class="memproto"> |
---|
| 199 | <table class="memname"> |
---|
| 200 | <tr> |
---|
| 201 | <td class="memname">bdm::mratio::mratio </td> |
---|
| 202 | <td>(</td> |
---|
| 203 | <td class="paramtype">const <a class="el" href="classbdm_1_1epdf.html">epdf</a> * </td> |
---|
| 204 | <td class="paramname"> <em>nom0</em>, </td> |
---|
| 205 | </tr> |
---|
| 206 | <tr> |
---|
| 207 | <td class="paramkey"></td> |
---|
| 208 | <td></td> |
---|
| 209 | <td class="paramtype">const <a class="el" href="classbdm_1_1RV.html">RV</a> & </td> |
---|
| 210 | <td class="paramname"> <em>rv</em>, </td> |
---|
| 211 | </tr> |
---|
| 212 | <tr> |
---|
| 213 | <td class="paramkey"></td> |
---|
| 214 | <td></td> |
---|
| 215 | <td class="paramtype">bool </td> |
---|
| 216 | <td class="paramname"> <em>copy</em> = <code>false</code></td><td> </td> |
---|
| 217 | </tr> |
---|
| 218 | <tr> |
---|
| 219 | <td></td> |
---|
| 220 | <td>)</td> |
---|
| 221 | <td></td><td></td><td><code> [inline]</code></td> |
---|
| 222 | </tr> |
---|
| 223 | </table> |
---|
| 224 | </div> |
---|
| 225 | <div class="memdoc"> |
---|
| 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. |
---|
[590] | 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> |
---|
[259] | 230 | |
---|
| 231 | </div> |
---|
| 232 | </div><p> |
---|
| 233 | <hr><h2>Member Function Documentation</h2> |
---|
[396] | 234 | <a class="anchor" name="30a0bceb948e287d497c578e371b1667"></a><!-- doxytag: member="bdm::mratio::from_setting" ref="30a0bceb948e287d497c578e371b1667" args="(const Setting &set)" --> |
---|
| 235 | <div class="memitem"> |
---|
| 236 | <div class="memproto"> |
---|
| 237 | <table class="memname"> |
---|
| 238 | <tr> |
---|
| 239 | <td class="memname">void bdm::mpdf::from_setting </td> |
---|
| 240 | <td>(</td> |
---|
| 241 | <td class="paramtype">const Setting & </td> |
---|
| 242 | <td class="paramname"> <em>set</em> </td> |
---|
| 243 | <td> ) </td> |
---|
[472] | 244 | <td><code> [virtual, inherited]</code></td> |
---|
[396] | 245 | </tr> |
---|
| 246 | </table> |
---|
| 247 | </div> |
---|
| 248 | <div class="memdoc"> |
---|
| 249 | |
---|
| 250 | <p> |
---|
[538] | 251 | Load from structure with elements: <div class="fragment"><pre class="fragment"> { <span class="keyword">class </span>= "mpdf_offspring", |
---|
| 252 | rv = {<span class="keyword">class</span>=<span class="stringliteral">"RV"</span>, names=(...),}; <span class="comment">// RV describing meaning of random variable</span> |
---|
[396] | 253 | <a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a>= {<span class="keyword">class</span>=<span class="stringliteral">"RV"</span>, names=(...),}; <span class="comment">// RV describing meaning of random variable in condition</span> |
---|
| 254 | <span class="comment">// elements of offsprings</span> |
---|
| 255 | } |
---|
| 256 | </pre></div> |
---|
| 257 | <p>Reimplemented from <a class="el" href="classbdm_1_1root.html#0551e3121091c5199bf4413b50522176">bdm::root</a>.</p> |
---|
| 258 | |
---|
[538] | 259 | <p>Reimplemented in <a class="el" href="classbdm_1_1mepdf.html#27ef18a3e3b1b5de02739d1324bf25fb">bdm::mepdf</a>, <a class="el" href="classbdm_1_1mprod.html#bfa7478f8df1de6d8cd4c349db512831">bdm::mprod</a>, <a class="el" href="classbdm_1_1mlnorm.html#52980f13d80162d00b30d5864343f564">bdm::mlnorm< sq_T, TEpdf ></a>, <a class="el" href="classbdm_1_1mgnorm.html#d717dacc6a9eb967f8410994dc6dc6f9">bdm::mgnorm< sq_T ></a>, <a class="el" href="classbdm_1_1mgamma.html#da2af0f327e5452bee71d1bf97452ae4">bdm::mgamma</a>, <a class="el" href="classbdm_1_1migamma__ref.html#9e7e0f7d2aa9ecca8ec1af8cbcb5ef1d">bdm::migamma_ref</a>, <a class="el" href="classbdm_1_1mlognorm.html#49e45ea13a869da607ef9be7a229128a">bdm::mlognorm</a>, <a class="el" href="classbdm_1_1mlnorm.html#52980f13d80162d00b30d5864343f564">bdm::mlnorm< chmat ></a>, and <a class="el" href="classbdm_1_1mlnorm.html#52980f13d80162d00b30d5864343f564">bdm::mlnorm< ldmat, enorm ></a>.</p> |
---|
[396] | 260 | |
---|
| 261 | </div> |
---|
| 262 | </div><p> |
---|
[538] | 263 | <a class="anchor" name="f0c1db6fcbb3aae2dd6123884457a367"></a><!-- doxytag: member="bdm::mratio::samplecond" ref="f0c1db6fcbb3aae2dd6123884457a367" args="(const vec &cond)" --> |
---|
[259] | 264 | <div class="memitem"> |
---|
| 265 | <div class="memproto"> |
---|
| 266 | <table class="memname"> |
---|
| 267 | <tr> |
---|
[538] | 268 | <td class="memname">virtual vec bdm::mpdf::samplecond </td> |
---|
[259] | 269 | <td>(</td> |
---|
| 270 | <td class="paramtype">const vec & </td> |
---|
[269] | 271 | <td class="paramname"> <em>cond</em> </td> |
---|
| 272 | <td> ) </td> |
---|
[538] | 273 | <td><code> [inline, virtual, inherited]</code></td> |
---|
[259] | 274 | </tr> |
---|
| 275 | </table> |
---|
| 276 | </div> |
---|
| 277 | <div class="memdoc"> |
---|
| 278 | |
---|
| 279 | <p> |
---|
[397] | 280 | Returns a sample from the density conditioned on <code>cond</code>, <img class="formulaInl" alt="$x \sim epdf(rv|cond)$" src="form_11.png">. |
---|
[259] | 281 | <p> |
---|
| 282 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
| 283 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
| 284 | <tr><td valign="top"></td><td valign="top"><em>cond</em> </td><td>is numeric value of <code>rv</code> </td></tr> |
---|
| 285 | </table> |
---|
| 286 | </dl> |
---|
| 287 | |
---|
[538] | 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> |
---|
[259] | 289 | |
---|
[590] | 290 | <p>References <a class="el" href="bdmerror_8h-source.html#l00051">bdm_error</a>.</p> |
---|
| 291 | |
---|
[538] | 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> |
---|
[271] | 293 | |
---|
[259] | 294 | </div> |
---|
| 295 | </div><p> |
---|
[472] | 296 | <a class="anchor" name="6e497d501331057309d2fddf63259d1a"></a><!-- doxytag: member="bdm::mratio::samplecond_m" ref="6e497d501331057309d2fddf63259d1a" args="(const vec &cond, int N)" --> |
---|
[259] | 297 | <div class="memitem"> |
---|
| 298 | <div class="memproto"> |
---|
| 299 | <table class="memname"> |
---|
| 300 | <tr> |
---|
[472] | 301 | <td class="memname">mat bdm::mpdf::samplecond_m </td> |
---|
[259] | 302 | <td>(</td> |
---|
| 303 | <td class="paramtype">const vec & </td> |
---|
| 304 | <td class="paramname"> <em>cond</em>, </td> |
---|
| 305 | </tr> |
---|
| 306 | <tr> |
---|
| 307 | <td class="paramkey"></td> |
---|
| 308 | <td></td> |
---|
| 309 | <td class="paramtype">int </td> |
---|
| 310 | <td class="paramname"> <em>N</em></td><td> </td> |
---|
| 311 | </tr> |
---|
| 312 | <tr> |
---|
| 313 | <td></td> |
---|
| 314 | <td>)</td> |
---|
[472] | 315 | <td></td><td></td><td><code> [virtual, inherited]</code></td> |
---|
[259] | 316 | </tr> |
---|
| 317 | </table> |
---|
| 318 | </div> |
---|
| 319 | <div class="memdoc"> |
---|
| 320 | |
---|
| 321 | <p> |
---|
| 322 | Returns. |
---|
| 323 | <p> |
---|
| 324 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
| 325 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
[397] | 326 | <tr><td valign="top"></td><td valign="top"><em>N</em> </td><td>samples from the density conditioned on <code>cond</code>, <img class="formulaInl" alt="$x \sim epdf(rv|cond)$" src="form_11.png">. </td></tr> |
---|
[259] | 327 | <tr><td valign="top"></td><td valign="top"><em>cond</em> </td><td>is numeric value of <code>rv</code> </td></tr> |
---|
| 328 | </table> |
---|
| 329 | </dl> |
---|
| 330 | |
---|
[538] | 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> |
---|
[259] | 332 | |
---|
[590] | 333 | <p>References <a class="el" href="bdmbase_8h-source.html#l00433">bdm::mpdf::samplecond()</a>.</p> |
---|
[538] | 334 | |
---|
[259] | 335 | </div> |
---|
| 336 | </div><p> |
---|
| 337 | <hr>The documentation for this class was generated from the following file:<ul> |
---|
[538] | 338 | <li><a class="el" href="emix_8h-source.html">emix.h</a></ul> |
---|
[259] | 339 | </div> |
---|
[590] | 340 | <hr size="1"><address style="text-align: right;"><small>Generated on Sat Aug 29 20:49:46 2009 for mixpp by |
---|
[259] | 341 | <a href="http://www.doxygen.org/index.html"> |
---|
[538] | 342 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
[259] | 343 | </body> |
---|
| 344 | </html> |
---|