[591] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
| 3 | <head> |
---|
| 4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
---|
[259] | 5 | <title>mixpp: bdm::mratio Class Reference</title> |
---|
[591] | 6 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
---|
| 7 | <link href="doxygen.css" rel="stylesheet" type="text/css"/> |
---|
| 8 | </head> |
---|
| 9 | <body> |
---|
| 10 | <!-- Generated by Doxygen 1.6.1 --> |
---|
[271] | 11 | <script type="text/javascript"> |
---|
| 12 | <!-- |
---|
| 13 | function changeDisplayState (e){ |
---|
| 14 | var num=this.id.replace(/[^[0-9]/g,''); |
---|
| 15 | var button=this.firstChild; |
---|
| 16 | var sectionDiv=document.getElementById('dynsection'+num); |
---|
| 17 | if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ |
---|
| 18 | sectionDiv.style.display='block'; |
---|
| 19 | button.src='open.gif'; |
---|
| 20 | }else{ |
---|
| 21 | sectionDiv.style.display='none'; |
---|
| 22 | button.src='closed.gif'; |
---|
| 23 | } |
---|
| 24 | } |
---|
| 25 | function initDynSections(){ |
---|
| 26 | var divs=document.getElementsByTagName('div'); |
---|
| 27 | var sectionCounter=1; |
---|
| 28 | for(var i=0;i<divs.length-1;i++){ |
---|
| 29 | if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ |
---|
| 30 | var header=divs[i]; |
---|
| 31 | var section=divs[i+1]; |
---|
| 32 | var button=header.firstChild; |
---|
| 33 | if (button!='IMG'){ |
---|
| 34 | divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); |
---|
| 35 | button=document.createElement('img'); |
---|
| 36 | divs[i].insertBefore(button,divs[i].firstChild); |
---|
| 37 | } |
---|
| 38 | header.style.cursor='pointer'; |
---|
| 39 | header.onclick=changeDisplayState; |
---|
| 40 | header.id='dynheader'+sectionCounter; |
---|
| 41 | button.src='closed.gif'; |
---|
| 42 | section.id='dynsection'+sectionCounter; |
---|
| 43 | section.style.display='none'; |
---|
| 44 | section.style.marginLeft='14px'; |
---|
| 45 | sectionCounter++; |
---|
| 46 | } |
---|
| 47 | } |
---|
| 48 | } |
---|
| 49 | window.onload = initDynSections; |
---|
| 50 | --> |
---|
| 51 | </script> |
---|
[259] | 52 | <div class="navigation" id="top"> |
---|
| 53 | <div class="tabs"> |
---|
| 54 | <ul> |
---|
[271] | 55 | <li><a href="main.html"><span>Main Page</span></a></li> |
---|
[259] | 56 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
[290] | 57 | <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
---|
[259] | 58 | <li><a href="files.html"><span>Files</span></a></li> |
---|
| 59 | </ul> |
---|
| 60 | </div> |
---|
| 61 | <div class="tabs"> |
---|
| 62 | <ul> |
---|
| 63 | <li><a href="annotated.html"><span>Class List</span></a></li> |
---|
[290] | 64 | <li><a href="classes.html"><span>Class Index</span></a></li> |
---|
[259] | 65 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
| 66 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
| 67 | </ul> |
---|
| 68 | </div> |
---|
[271] | 69 | <div class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1mratio.html">mratio</a> |
---|
[259] | 70 | </div> |
---|
| 71 | </div> |
---|
| 72 | <div class="contents"> |
---|
[591] | 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"> |
---|
[608] | 76 | <img class="formulaDsp" alt="\[ f(rv|rvc) = \frac{f(rv,rvc)}{f(rvc)} \]" src="form_70.png"/> |
---|
[591] | 77 | </p> |
---|
[608] | 78 | <p> where <img class="formulaInl" alt="$ f(rvc) = \int f(rv,rvc) d\ rv $" src="form_71.png"/>. |
---|
[591] | 79 | <a href="#_details">More...</a></p> |
---|
[290] | 80 | |
---|
[591] | 81 | <p><code>#include <<a class="el" href="emix_8h_source.html">emix.h</a>></code></p> |
---|
[259] | 82 | |
---|
[591] | 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> |
---|
[608] | 97 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Load from structure with elements:. <a href="#a30a0bceb948e287d497c578e371b1667"></a><br/></td></tr> |
---|
[591] | 98 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaf0e6941ba5919cae1bc530e2181b109"></a><!-- doxytag: member="bdm::mratio::to_string" ref="aaf0e6941ba5919cae1bc530e2181b109" args="()" --> |
---|
| 99 | virtual string </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#aaf0e6941ba5919cae1bc530e2181b109">to_string</a> ()</td></tr> |
---|
| 100 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method returns a basic info about the current instance. <br/></td></tr> |
---|
| 101 | <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 " --> |
---|
| 102 | 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> |
---|
| 103 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method save all the instance properties into the Setting structure. <br/></td></tr> |
---|
| 104 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1c314bd6d6dacb8ba78ea5eb88fd9516"></a><!-- doxytag: member="bdm::mratio::validate" ref="a1c314bd6d6dacb8ba78ea5eb88fd9516" args="()" --> |
---|
| 105 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#a1c314bd6d6dacb8ba78ea5eb88fd9516">validate</a> ()</td></tr> |
---|
| 106 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method TODO. <br/></td></tr> |
---|
[270] | 107 | <tr><td colspan="2"><div class="groupHeader">Matematical operations</div></td></tr> |
---|
[591] | 108 | <tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp8096b150de0e99b4ea272a92f021107c"></a> </p> |
---|
| 109 | <br/><br/></div></td></tr> |
---|
| 110 | <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> |
---|
[608] | 111 | <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_16.png"/>. <a href="#af0c1db6fcbb3aae2dd6123884457a367"></a><br/></td></tr> |
---|
[591] | 112 | <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> |
---|
| 113 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns. <a href="#a6e497d501331057309d2fddf63259d1a"></a><br/></td></tr> |
---|
| 114 | <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)" --> |
---|
| 115 | 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> |
---|
| 116 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix version of evallogcond. <br/></td></tr> |
---|
| 117 | <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)" --> |
---|
| 118 | 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> |
---|
| 119 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Array<vec> version of evallogcond. <br/></td></tr> |
---|
[270] | 120 | <tr><td colspan="2"><div class="groupHeader">Access to attributes</div></td></tr> |
---|
[591] | 121 | <tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpb6eb094f9e6af11f8a7d9efa9d8e3623"></a> </p> |
---|
| 122 | <br/><br/></div></td></tr> |
---|
[608] | 123 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaa0095f80870f15209bca68a8a7bad8a"></a><!-- doxytag: member="bdm::mratio::_rv" ref="aaa0095f80870f15209bca68a8a7bad8a" args="() const " --> |
---|
| 124 | const <a class="el" href="classbdm_1_1RV.html">RV</a> & </td><td class="memItemRight" valign="bottom"><b>_rv</b> () const </td></tr> |
---|
| 125 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a739d5202899bb56792a547c74e517a11"></a><!-- doxytag: member="bdm::mratio::_rvc" ref="a739d5202899bb56792a547c74e517a11" args="() const " --> |
---|
| 126 | const <a class="el" href="classbdm_1_1RV.html">RV</a> & </td><td class="memItemRight" valign="bottom"><b>_rvc</b> () const </td></tr> |
---|
[591] | 127 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeea4a999ed9679181335927e9cb66d28"></a><!-- doxytag: member="bdm::mratio::dimension" ref="aeea4a999ed9679181335927e9cb66d28" args="() const " --> |
---|
[538] | 128 | int </td><td class="memItemRight" valign="bottom"><b>dimension</b> () const </td></tr> |
---|
[591] | 129 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a35e135910aed187b7290742f50e61bc8"></a><!-- doxytag: member="bdm::mratio::dimensionc" ref="a35e135910aed187b7290742f50e61bc8" args="()" --> |
---|
[270] | 130 | int </td><td class="memItemRight" valign="bottom"><b>dimensionc</b> ()</td></tr> |
---|
| 131 | <tr><td colspan="2"><div class="groupHeader">Connection to other objects</div></td></tr> |
---|
[591] | 132 | <tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp91e4120baa9617769b7119bfb087c022"></a> </p> |
---|
| 133 | <br/><br/></div></td></tr> |
---|
| 134 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7631a5570e4ade1420065e8df78f4401"></a><!-- doxytag: member="bdm::mratio::set_rvc" ref="a7631a5570e4ade1420065e8df78f4401" args="(const RV &rvc0)" --> |
---|
[270] | 135 | 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> |
---|
[591] | 136 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a18ac26bc2f96ae01ef4eb06178abbd75"></a><!-- doxytag: member="bdm::mratio::set_rv" ref="a18ac26bc2f96ae01ef4eb06178abbd75" args="(const RV &rv0)" --> |
---|
[270] | 137 | 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> |
---|
[591] | 138 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af8e3798150b42fd1f3e16ddbbe0e7045"></a><!-- doxytag: member="bdm::mratio::isnamed" ref="af8e3798150b42fd1f3e16ddbbe0e7045" args="()" --> |
---|
[270] | 139 | bool </td><td class="memItemRight" valign="bottom"><b>isnamed</b> ()</td></tr> |
---|
[591] | 140 | <tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr> |
---|
| 141 | <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)" --> |
---|
| 142 | 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> |
---|
| 143 | <tr><td class="mdescLeft"> </td><td class="mdescRight">set internal pointer <code>ep</code> to point to given <code>iepdf</code> <br/></td></tr> |
---|
| 144 | <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)" --> |
---|
| 145 | 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> |
---|
| 146 | <tr><td class="mdescLeft"> </td><td class="mdescRight">set internal pointer <code>ep</code> to point to given <code>iepdf</code> <br/></td></tr> |
---|
| 147 | <tr><td colspan="2"><h2>Protected Attributes</h2></td></tr> |
---|
| 148 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af31caba90a2aa10fbf7631832404fe54"></a><!-- doxytag: member="bdm::mratio::nom" ref="af31caba90a2aa10fbf7631832404fe54" args="" --> |
---|
| 149 | 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> |
---|
| 150 | <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> |
---|
| 151 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a873598797f36eddab44e342e14563fcb"></a><!-- doxytag: member="bdm::mratio::den" ref="a873598797f36eddab44e342e14563fcb" args="" --> |
---|
| 152 | <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> |
---|
| 153 | <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> |
---|
| 154 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a51bfe6675e724f7fbeaaeacce5a9f9b8"></a><!-- doxytag: member="bdm::mratio::destroynom" ref="a51bfe6675e724f7fbeaaeacce5a9f9b8" args="" --> |
---|
| 155 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mratio.html#a51bfe6675e724f7fbeaaeacce5a9f9b8">destroynom</a></td></tr> |
---|
| 156 | <tr><td class="mdescLeft"> </td><td class="mdescRight">flag for destructor <br/></td></tr> |
---|
| 157 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acda5bd23ba60146d69e1f804ff7710c7"></a><!-- doxytag: member="bdm::mratio::dl" ref="acda5bd23ba60146d69e1f804ff7710c7" args="" --> |
---|
| 158 | <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> |
---|
| 159 | <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> |
---|
| 160 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7a676422bc6cc426ffa6fddf52672409"></a><!-- doxytag: member="bdm::mratio::iepdf" ref="a7a676422bc6cc426ffa6fddf52672409" args="" --> |
---|
| 161 | <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> |
---|
| 162 | <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> |
---|
| 163 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7c1900976ff13dbc09c9729b3bbff9e6"></a><!-- doxytag: member="bdm::mratio::dimc" ref="a7c1900976ff13dbc09c9729b3bbff9e6" args="" --> |
---|
| 164 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#a7c1900976ff13dbc09c9729b3bbff9e6">dimc</a></td></tr> |
---|
| 165 | <tr><td class="mdescLeft"> </td><td class="mdescRight">dimension of the condition <br/></td></tr> |
---|
| 166 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5a5f08950daa08b85b01ddf4e1c36288"></a><!-- doxytag: member="bdm::mratio::rvc" ref="a5a5f08950daa08b85b01ddf4e1c36288" args="" --> |
---|
| 167 | <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> |
---|
| 168 | <tr><td class="mdescLeft"> </td><td class="mdescRight">random variable in condition <br/></td></tr> |
---|
[259] | 169 | </table> |
---|
[591] | 170 | <hr/><a name="_details"></a><h2>Detailed Description</h2> |
---|
| 171 | <p>Class representing ratio of two densities which arise e.g. by applying the Bayes rule. It represents density in the form: </p> |
---|
| 172 | <p class="formulaDsp"> |
---|
[608] | 173 | <img class="formulaDsp" alt="\[ f(rv|rvc) = \frac{f(rv,rvc)}{f(rvc)} \]" src="form_70.png"/> |
---|
[591] | 174 | </p> |
---|
[608] | 175 | <p> where <img class="formulaInl" alt="$ f(rvc) = \int f(rv,rvc) d\ rv $" src="form_71.png"/>. </p> |
---|
[591] | 176 | <p>In particular this type of arise by conditioning of a mixture model.</p> |
---|
| 177 | <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> |
---|
| 178 | <hr/><h2>Constructor & Destructor Documentation</h2> |
---|
| 179 | <a class="anchor" id="a0ff56d13f9515d7e5f23b7a4cc5529b4"></a><!-- doxytag: member="bdm::mratio::mratio" ref="a0ff56d13f9515d7e5f23b7a4cc5529b4" args="(const epdf *nom0, const RV &rv, bool copy=false)" --> |
---|
[259] | 180 | <div class="memitem"> |
---|
| 181 | <div class="memproto"> |
---|
| 182 | <table class="memname"> |
---|
| 183 | <tr> |
---|
[591] | 184 | <td class="memname">bdm::mratio::mratio </td> |
---|
[259] | 185 | <td>(</td> |
---|
| 186 | <td class="paramtype">const <a class="el" href="classbdm_1_1epdf.html">epdf</a> * </td> |
---|
| 187 | <td class="paramname"> <em>nom0</em>, </td> |
---|
| 188 | </tr> |
---|
| 189 | <tr> |
---|
| 190 | <td class="paramkey"></td> |
---|
| 191 | <td></td> |
---|
| 192 | <td class="paramtype">const <a class="el" href="classbdm_1_1RV.html">RV</a> & </td> |
---|
| 193 | <td class="paramname"> <em>rv</em>, </td> |
---|
| 194 | </tr> |
---|
| 195 | <tr> |
---|
| 196 | <td class="paramkey"></td> |
---|
| 197 | <td></td> |
---|
| 198 | <td class="paramtype">bool </td> |
---|
| 199 | <td class="paramname"> <em>copy</em> = <code>false</code></td><td> </td> |
---|
| 200 | </tr> |
---|
| 201 | <tr> |
---|
| 202 | <td></td> |
---|
| 203 | <td>)</td> |
---|
| 204 | <td></td><td></td><td><code> [inline]</code></td> |
---|
| 205 | </tr> |
---|
| 206 | </table> |
---|
| 207 | </div> |
---|
| 208 | <div class="memdoc"> |
---|
[591] | 209 | <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> |
---|
[259] | 210 | |
---|
[608] | 211 | <p>References <a class="el" href="bdmbase_8h_source.html#l00154">bdm::RV::_dsize()</a>, <a class="el" href="bdmbase_8h_source.html#l00414">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#l00448">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#l00168">bdm::RV::length()</a>, <a class="el" href="bdmbase_8cpp_source.html#l00150">bdm::epdf::marginal()</a>, <a class="el" href="emix_8h_source.html#l00040">nom</a>, <a class="el" href="bdmbase_8h_source.html#l00450">bdm::mpdf::rvc</a>, <a class="el" href="bdmbase_8cpp_source.html#l00220">bdm::datalink_m2e::set_connection()</a>, <a class="el" href="bdmbase_8h_source.html#l00457">bdm::mpdf::set_ep()</a>, <a class="el" href="bdmbase_8h_source.html#l00403">bdm::epdf::set_rv()</a>, and <a class="el" href="bdmbase_8cpp_source.html#l00313">bdm::RV::subt()</a>.</p> |
---|
[259] | 212 | |
---|
| 213 | </div> |
---|
[591] | 214 | </div> |
---|
| 215 | <hr/><h2>Member Function Documentation</h2> |
---|
| 216 | <a class="anchor" id="a30a0bceb948e287d497c578e371b1667"></a><!-- doxytag: member="bdm::mratio::from_setting" ref="a30a0bceb948e287d497c578e371b1667" args="(const Setting &set)" --> |
---|
[396] | 217 | <div class="memitem"> |
---|
| 218 | <div class="memproto"> |
---|
| 219 | <table class="memname"> |
---|
| 220 | <tr> |
---|
[591] | 221 | <td class="memname">void bdm::mpdf::from_setting </td> |
---|
[396] | 222 | <td>(</td> |
---|
| 223 | <td class="paramtype">const Setting & </td> |
---|
[591] | 224 | <td class="paramname"> <em>set</em></td> |
---|
[396] | 225 | <td> ) </td> |
---|
[472] | 226 | <td><code> [virtual, inherited]</code></td> |
---|
[396] | 227 | </tr> |
---|
| 228 | </table> |
---|
| 229 | </div> |
---|
| 230 | <div class="memdoc"> |
---|
[608] | 231 | |
---|
| 232 | <p>Load from structure with elements:. </p> |
---|
| 233 | <div class="fragment"><pre class="fragment"> { <span class="keyword">class </span>= "mpdf_offspring", |
---|
| 234 | rv = {<span class="keyword">class</span>=<span class="stringliteral">"RV"</span>, names=(...),}; <span class="comment">// RV describing meaning of random variable</span> |
---|
| 235 | <a class="code" href="classbdm_1_1mpdf.html#a5a5f08950daa08b85b01ddf4e1c36288" 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> |
---|
| 236 | <span class="comment">// elements of offsprings</span> |
---|
| 237 | } |
---|
[396] | 238 | </pre></div> |
---|
[591] | 239 | <p>Reimplemented from <a class="el" href="classbdm_1_1root.html#a0551e3121091c5199bf4413b50522176">bdm::root</a>.</p> |
---|
[396] | 240 | |
---|
[591] | 241 | <p>Reimplemented in <a class="el" href="classbdm_1_1mepdf.html#a27ef18a3e3b1b5de02739d1324bf25fb">bdm::mepdf</a>, <a class="el" href="classbdm_1_1mprod.html#abfa7478f8df1de6d8cd4c349db512831">bdm::mprod</a>, <a class="el" href="classbdm_1_1mlnorm.html#a52980f13d80162d00b30d5864343f564">bdm::mlnorm< sq_T, TEpdf ></a>, <a class="el" href="classbdm_1_1mgnorm.html#ad717dacc6a9eb967f8410994dc6dc6f9">bdm::mgnorm< sq_T ></a>, <a class="el" href="classbdm_1_1mgamma.html#ada2af0f327e5452bee71d1bf97452ae4">bdm::mgamma</a>, <a class="el" href="classbdm_1_1migamma__ref.html#a9e7e0f7d2aa9ecca8ec1af8cbcb5ef1d">bdm::migamma_ref</a>, <a class="el" href="classbdm_1_1mlognorm.html#a49e45ea13a869da607ef9be7a229128a">bdm::mlognorm</a>, <a class="el" href="classbdm_1_1mlnorm.html#a52980f13d80162d00b30d5864343f564">bdm::mlnorm< ldmat, enorm ></a>, and <a class="el" href="classbdm_1_1mlnorm.html#a52980f13d80162d00b30d5864343f564">bdm::mlnorm< chmat ></a>.</p> |
---|
[396] | 242 | |
---|
| 243 | </div> |
---|
[591] | 244 | </div> |
---|
| 245 | <a class="anchor" id="af0c1db6fcbb3aae2dd6123884457a367"></a><!-- doxytag: member="bdm::mratio::samplecond" ref="af0c1db6fcbb3aae2dd6123884457a367" args="(const vec &cond)" --> |
---|
[259] | 246 | <div class="memitem"> |
---|
| 247 | <div class="memproto"> |
---|
| 248 | <table class="memname"> |
---|
| 249 | <tr> |
---|
[591] | 250 | <td class="memname">virtual vec bdm::mpdf::samplecond </td> |
---|
[259] | 251 | <td>(</td> |
---|
| 252 | <td class="paramtype">const vec & </td> |
---|
[591] | 253 | <td class="paramname"> <em>cond</em></td> |
---|
[269] | 254 | <td> ) </td> |
---|
[538] | 255 | <td><code> [inline, virtual, inherited]</code></td> |
---|
[259] | 256 | </tr> |
---|
| 257 | </table> |
---|
| 258 | </div> |
---|
| 259 | <div class="memdoc"> |
---|
| 260 | |
---|
[608] | 261 | <p>Returns a sample from the density conditioned on <code>cond</code>, <img class="formulaInl" alt="$x \sim epdf(rv|cond)$" src="form_16.png"/>. </p> |
---|
[591] | 262 | <dl><dt><b>Parameters:</b></dt><dd> |
---|
[259] | 263 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
| 264 | <tr><td valign="top"></td><td valign="top"><em>cond</em> </td><td>is numeric value of <code>rv</code> </td></tr> |
---|
| 265 | </table> |
---|
[591] | 266 | </dd> |
---|
[259] | 267 | </dl> |
---|
| 268 | |
---|
[591] | 269 | <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> |
---|
[259] | 270 | |
---|
[591] | 271 | <p>References <a class="el" href="bdmerror_8h_source.html#l00051">bdm_error</a>.</p> |
---|
[590] | 272 | |
---|
[608] | 273 | <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#l00179">bdm::mpdf::samplecond_m()</a>.</p> |
---|
[271] | 274 | |
---|
[259] | 275 | </div> |
---|
[591] | 276 | </div> |
---|
| 277 | <a class="anchor" id="a6e497d501331057309d2fddf63259d1a"></a><!-- doxytag: member="bdm::mratio::samplecond_m" ref="a6e497d501331057309d2fddf63259d1a" args="(const vec &cond, int N)" --> |
---|
[259] | 278 | <div class="memitem"> |
---|
| 279 | <div class="memproto"> |
---|
| 280 | <table class="memname"> |
---|
| 281 | <tr> |
---|
[591] | 282 | <td class="memname">mat bdm::mpdf::samplecond_m </td> |
---|
[259] | 283 | <td>(</td> |
---|
| 284 | <td class="paramtype">const vec & </td> |
---|
| 285 | <td class="paramname"> <em>cond</em>, </td> |
---|
| 286 | </tr> |
---|
| 287 | <tr> |
---|
| 288 | <td class="paramkey"></td> |
---|
| 289 | <td></td> |
---|
| 290 | <td class="paramtype">int </td> |
---|
| 291 | <td class="paramname"> <em>N</em></td><td> </td> |
---|
| 292 | </tr> |
---|
| 293 | <tr> |
---|
| 294 | <td></td> |
---|
| 295 | <td>)</td> |
---|
[472] | 296 | <td></td><td></td><td><code> [virtual, inherited]</code></td> |
---|
[259] | 297 | </tr> |
---|
| 298 | </table> |
---|
| 299 | </div> |
---|
| 300 | <div class="memdoc"> |
---|
| 301 | |
---|
[591] | 302 | <p>Returns. </p> |
---|
| 303 | <dl><dt><b>Parameters:</b></dt><dd> |
---|
[259] | 304 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
[608] | 305 | <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_16.png"/>. </td></tr> |
---|
[259] | 306 | <tr><td valign="top"></td><td valign="top"><em>cond</em> </td><td>is numeric value of <code>rv</code> </td></tr> |
---|
| 307 | </table> |
---|
[591] | 308 | </dd> |
---|
[259] | 309 | </dl> |
---|
| 310 | |
---|
[591] | 311 | <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> |
---|
[259] | 312 | |
---|
[608] | 313 | <p>References <a class="el" href="bdmbase_8h_source.html#l00478">bdm::mpdf::samplecond()</a>.</p> |
---|
[538] | 314 | |
---|
[259] | 315 | </div> |
---|
| 316 | </div> |
---|
[591] | 317 | <hr/>The documentation for this class was generated from the following file:<ul> |
---|
| 318 | <li><a class="el" href="emix_8h_source.html">emix.h</a></li> |
---|
| 319 | </ul> |
---|
| 320 | </div> |
---|
[608] | 321 | <hr size="1"/><address style="text-align: right;"><small>Generated on Tue Sep 8 22:11:33 2009 for mixpp by |
---|
[259] | 322 | <a href="http://www.doxygen.org/index.html"> |
---|
[591] | 323 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> |
---|
[259] | 324 | </body> |
---|
| 325 | </html> |
---|