[380] | 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::merger_base Class Reference</title> |
---|
| 4 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
| 5 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
| 6 | </head><body> |
---|
| 7 | <!-- Generated by Doxygen 1.5.8 --> |
---|
| 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> |
---|
| 49 | <div class="navigation" id="top"> |
---|
| 50 | <div class="tabs"> |
---|
| 51 | <ul> |
---|
| 52 | <li><a href="main.html"><span>Main Page</span></a></li> |
---|
| 53 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
| 54 | <li><a href="modules.html"><span>Modules</span></a></li> |
---|
| 55 | <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
---|
| 56 | <li><a href="files.html"><span>Files</span></a></li> |
---|
| 57 | </ul> |
---|
| 58 | </div> |
---|
| 59 | <div class="tabs"> |
---|
| 60 | <ul> |
---|
| 61 | <li><a href="annotated.html"><span>Class List</span></a></li> |
---|
| 62 | <li><a href="classes.html"><span>Class Index</span></a></li> |
---|
| 63 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
| 64 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
| 65 | </ul> |
---|
| 66 | </div> |
---|
| 67 | <div class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1merger__base.html">merger_base</a> |
---|
| 68 | </div> |
---|
| 69 | </div> |
---|
| 70 | <div class="contents"> |
---|
| 71 | <h1>bdm::merger_base Class Reference</h1><!-- doxytag: class="bdm::merger_base" --><!-- doxytag: inherits="bdm::compositepdf,bdm::epdf" -->Base class for general combination of pdfs on discrete support. |
---|
| 72 | <a href="#_details">More...</a> |
---|
| 73 | <p> |
---|
| 74 | <code>#include <<a class="el" href="merger_8h-source.html">merger.h</a>></code> |
---|
| 75 | <p> |
---|
| 76 | |
---|
| 77 | <p> |
---|
| 78 | <a href="classbdm_1_1merger__base-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
---|
| 79 | <tr><td></td></tr> |
---|
| 80 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
---|
| 81 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2ca1b8d18f845b2fe29f4f77969e0596"></a><!-- doxytag: member="bdm::merger_base::set_elements" ref="2ca1b8d18f845b2fe29f4f77969e0596" args="(const Array< mpdf * > A0)" --> |
---|
| 82 | void </td><td class="memItemRight" valign="bottom"><b>set_elements</b> (const Array< <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> * > A0)</td></tr> |
---|
| 83 | |
---|
| 84 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classbdm_1_1RV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1compositepdf.html#c73d39acc4378eee6a63155c3517d3c9">getrv</a> (bool checkoverlap=false)</td></tr> |
---|
| 85 | |
---|
| 86 | <tr><td class="mdescLeft"> </td><td class="mdescRight">find common rv, flag <a href="#c73d39acc4378eee6a63155c3517d3c9"></a><br></td></tr> |
---|
| 87 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c71fc2c51f49d797e61f479f543c75ce"></a><!-- doxytag: member="bdm::merger_base::setrvc" ref="c71fc2c51f49d797e61f479f543c75ce" args="(const RV &rv, RV &rvc)" --> |
---|
| 88 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1compositepdf.html#c71fc2c51f49d797e61f479f543c75ce">setrvc</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &<a class="el" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8">rv</a>, <a class="el" href="classbdm_1_1RV.html">RV</a> &rvc)</td></tr> |
---|
| 89 | |
---|
| 90 | <tr><td class="mdescLeft"> </td><td class="mdescRight">common rvc of all mpdfs is written to rvc <br></td></tr> |
---|
| 91 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e47a8bd9337478fa4e46d5a2a4336f9a"></a><!-- doxytag: member="bdm::merger_base::to_string" ref="e47a8bd9337478fa4e46d5a2a4336f9a" args="()" --> |
---|
| 92 | virtual string </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1bdmroot.html#e47a8bd9337478fa4e46d5a2a4336f9a">to_string</a> ()</td></tr> |
---|
| 93 | |
---|
| 94 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method returns a basic info about the current instance. <br></td></tr> |
---|
| 95 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d4602efd3ad9fb9e4532426e4f488df8"></a><!-- doxytag: member="bdm::merger_base::from_setting" ref="d4602efd3ad9fb9e4532426e4f488df8" args="(const Setting &root)" --> |
---|
| 96 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1bdmroot.html#d4602efd3ad9fb9e4532426e4f488df8">from_setting</a> (const Setting &root)</td></tr> |
---|
| 97 | |
---|
| 98 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method arrange instance properties according the data stored in the Setting structure. <br></td></tr> |
---|
| 99 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dd74cb898b22b95b7ee528e040a07618"></a><!-- doxytag: member="bdm::merger_base::to_setting" ref="dd74cb898b22b95b7ee528e040a07618" args="(Setting &root) const " --> |
---|
| 100 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1bdmroot.html#dd74cb898b22b95b7ee528e040a07618">to_setting</a> (Setting &root) const </td></tr> |
---|
| 101 | |
---|
| 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" nowrap align="right" valign="top"><a class="anchor" name="d8cc21ea15fc723065eed5f3100757a5"></a><!-- doxytag: member="bdm::merger_base::validate" ref="d8cc21ea15fc723065eed5f3100757a5" args="()" --> |
---|
| 104 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1bdmroot.html#d8cc21ea15fc723065eed5f3100757a5">validate</a> ()</td></tr> |
---|
| 105 | |
---|
| 106 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method TODO. <br></td></tr> |
---|
| 107 | <tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr> |
---|
| 108 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f9d8c6c26c6520dbb17d4e80f635e7be"></a><!-- doxytag: member="bdm::merger_base::merger_base" ref="f9d8c6c26c6520dbb17d4e80f635e7be" args="()" --> |
---|
| 109 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#f9d8c6c26c6520dbb17d4e80f635e7be">merger_base</a> ()</td></tr> |
---|
| 110 | |
---|
| 111 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Empty constructor. <br></td></tr> |
---|
| 112 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ed5cbd925628893a51c36bc1807f4a75"></a><!-- doxytag: member="bdm::merger_base::merger_base" ref="ed5cbd925628893a51c36bc1807f4a75" args="(const Array< mpdf * > &S)" --> |
---|
| 113 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#ed5cbd925628893a51c36bc1807f4a75">merger_base</a> (const Array< <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> * > &S)</td></tr> |
---|
| 114 | |
---|
| 115 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor from sources. <br></td></tr> |
---|
| 116 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bde0fd02ae620b4130e768fa70aafa94"></a><!-- doxytag: member="bdm::merger_base::set_sources" ref="bde0fd02ae620b4130e768fa70aafa94" args="(const Array< mpdf * > &Sources)" --> |
---|
| 117 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#bde0fd02ae620b4130e768fa70aafa94">set_sources</a> (const Array< <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> * > &Sources)</td></tr> |
---|
| 118 | |
---|
| 119 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Function setting the main internal structures. <br></td></tr> |
---|
| 120 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e4514484bac243585b0a1e44325e8add"></a><!-- doxytag: member="bdm::merger_base::set_debug_file" ref="e4514484bac243585b0a1e44325e8add" args="(const string fname)" --> |
---|
| 121 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#e4514484bac243585b0a1e44325e8add">set_debug_file</a> (const string fname)</td></tr> |
---|
| 122 | |
---|
| 123 | <tr><td class="mdescLeft"> </td><td class="mdescRight">set debug file <br></td></tr> |
---|
| 124 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5c85ba8a7c5246674891c6ebbf59ef54"></a><!-- doxytag: member="bdm::merger_base::set_parameters" ref="5c85ba8a7c5246674891c6ebbf59ef54" args="(double beta0, MERGER_METHOD MTH)" --> |
---|
| 125 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#5c85ba8a7c5246674891c6ebbf59ef54">set_parameters</a> (double beta0, MERGER_METHOD MTH)</td></tr> |
---|
| 126 | |
---|
| 127 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set internal parameters used in approximation. <br></td></tr> |
---|
| 128 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c02a1c55042c40cd190e240f1329d8d4"></a><!-- doxytag: member="bdm::merger_base::set_support" ref="c02a1c55042c40cd190e240f1329d8d4" args="(epdf &overall, int N)" --> |
---|
| 129 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#c02a1c55042c40cd190e240f1329d8d4">set_support</a> (<a class="el" href="classbdm_1_1epdf.html">epdf</a> &overall, int N)</td></tr> |
---|
| 130 | |
---|
| 131 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set support points from a pdf. <br></td></tr> |
---|
| 132 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="32d7e1dd6d91f77c81df7e82aac18689"></a><!-- doxytag: member="bdm::merger_base::~merger_base" ref="32d7e1dd6d91f77c81df7e82aac18689" args="()" --> |
---|
| 133 | virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#32d7e1dd6d91f77c81df7e82aac18689">~merger_base</a> ()</td></tr> |
---|
| 134 | |
---|
| 135 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br></td></tr> |
---|
| 136 | <tr><td colspan="2"><div class="groupHeader">Mathematical operations</div></td></tr> |
---|
| 137 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fcaf1960643dba08fd17dec57b05c1f2"></a><!-- doxytag: member="bdm::merger_base::merge" ref="fcaf1960643dba08fd17dec57b05c1f2" args="()" --> |
---|
| 138 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#fcaf1960643dba08fd17dec57b05c1f2">merge</a> ()</td></tr> |
---|
| 139 | |
---|
| 140 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Merge given sources in given points. <br></td></tr> |
---|
| 141 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1f52bf47d2cdd23a95b19e3da902e431"></a><!-- doxytag: member="bdm::merger_base::merge_points" ref="1f52bf47d2cdd23a95b19e3da902e431" args="(mat &lW)" --> |
---|
| 142 | vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#1f52bf47d2cdd23a95b19e3da902e431">merge_points</a> (mat &lW)</td></tr> |
---|
| 143 | |
---|
| 144 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Merge log-likelihood values in points using method specified by parameter METHOD. <br></td></tr> |
---|
| 145 | <tr><td class="memItemLeft" nowrap align="right" valign="top">vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#021acbf1a6e3bfde2a1b9c1c73cea6e0">mean</a> () const </td></tr> |
---|
| 146 | |
---|
| 147 | <tr><td class="mdescLeft"> </td><td class="mdescRight">weight w is a <a href="#021acbf1a6e3bfde2a1b9c1c73cea6e0"></a><br></td></tr> |
---|
| 148 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="41919c12fd6a07a8e00775c54ba4758a"></a><!-- doxytag: member="bdm::merger_base::covariance" ref="41919c12fd6a07a8e00775c54ba4758a" args="() const " --> |
---|
| 149 | mat </td><td class="memItemRight" valign="bottom"><b>covariance</b> () const </td></tr> |
---|
| 150 | |
---|
| 151 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="76fe431922844d132b4e1ecf70f53c99"></a><!-- doxytag: member="bdm::merger_base::variance" ref="76fe431922844d132b4e1ecf70f53c99" args="() const " --> |
---|
| 152 | vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#76fe431922844d132b4e1ecf70f53c99">variance</a> () const </td></tr> |
---|
| 153 | |
---|
| 154 | <tr><td class="mdescLeft"> </td><td class="mdescRight">return expected variance (not covariance!) <br></td></tr> |
---|
| 155 | <tr><td colspan="2"><div class="groupHeader">Access to attributes</div></td></tr> |
---|
| 156 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fb682e470103f4e0b353b7c9200d177f"></a><!-- doxytag: member="bdm::merger_base::_Smp" ref="fb682e470103f4e0b353b7c9200d177f" args="()" --> |
---|
| 157 | <a class="el" href="classbdm_1_1eEmp.html">eEmp</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#fb682e470103f4e0b353b7c9200d177f">_Smp</a> ()</td></tr> |
---|
| 158 | |
---|
| 159 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Access function. <br></td></tr> |
---|
| 160 | <tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr> |
---|
| 161 | <tr><td colspan="2"><div class="groupText">Construction of each <a class="el" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> should support two types of constructors: <ul> |
---|
| 162 | <li>empty constructor, </li> |
---|
| 163 | <li>copy constructor,</li> |
---|
| 164 | </ul> |
---|
| 165 | The following constructors should be supported for convenience: <ul> |
---|
| 166 | <li>constructor followed by calling <code><a class="el" href="classbdm_1_1merger__base.html#5c85ba8a7c5246674891c6ebbf59ef54" title="Set internal parameters used in approximation.">set_parameters()</a></code> </li> |
---|
| 167 | <li>constructor accepting random variables calling <code><a class="el" href="classbdm_1_1epdf.html#f423e28448dbb69ef4905295ec8de8ff" title="Name its rv.">set_rv()</a></code> </li> |
---|
| 168 | </ul> |
---|
| 169 | All internal data structures are constructed as empty. Their values (including sizes) will be set by method <code><a class="el" href="classbdm_1_1merger__base.html#5c85ba8a7c5246674891c6ebbf59ef54" title="Set internal parameters used in approximation.">set_parameters()</a></code>. This way references can be initialized in constructors. <br><br></div></td></tr> |
---|
| 170 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="840de94aa33cf4f2ebd2427f45a165d8"></a><!-- doxytag: member="bdm::merger_base::set_parameters" ref="840de94aa33cf4f2ebd2427f45a165d8" args="(int dim0)" --> |
---|
| 171 | void </td><td class="memItemRight" valign="bottom"><b>set_parameters</b> (int dim0)</td></tr> |
---|
| 172 | |
---|
| 173 | <tr><td colspan="2"><div class="groupHeader">Matematical Operations</div></td></tr> |
---|
| 174 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="75ba57a89681a8efec488f5796c7cc1b"></a><!-- doxytag: member="bdm::merger_base::sample" ref="75ba57a89681a8efec488f5796c7cc1b" args="() const " --> |
---|
| 175 | virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#75ba57a89681a8efec488f5796c7cc1b">sample</a> () const </td></tr> |
---|
| 176 | |
---|
| 177 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a sample, <img class="formulaInl" alt="$ x $" src="form_45.png"> from density <img class="formulaInl" alt="$ f_x()$" src="form_46.png">. <br></td></tr> |
---|
| 178 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b4cf45fd83cc7573ede9fe1215256058"></a><!-- doxytag: member="bdm::merger_base::sample_m" ref="b4cf45fd83cc7573ede9fe1215256058" args="(int N) const " --> |
---|
| 179 | virtual mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#b4cf45fd83cc7573ede9fe1215256058">sample_m</a> (int N) const </td></tr> |
---|
| 180 | |
---|
| 181 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns N samples, <img class="formulaInl" alt="$ [x_1 , x_2 , \ldots \ $" src="form_47.png"> from density <img class="formulaInl" alt="$ f_x(rv)$" src="form_48.png">. <br></td></tr> |
---|
| 182 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="deab266d63c236c277538867d5c3f249"></a><!-- doxytag: member="bdm::merger_base::evallog" ref="deab266d63c236c277538867d5c3f249" args="(const vec &val) const " --> |
---|
| 183 | virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#deab266d63c236c277538867d5c3f249">evallog</a> (const vec &val) const </td></tr> |
---|
| 184 | |
---|
| 185 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute log-probability of argument <code>val</code>. <br></td></tr> |
---|
| 186 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="34956d4dd3176eeb5937cf48a1546b62"></a><!-- doxytag: member="bdm::merger_base::evallog_m" ref="34956d4dd3176eeb5937cf48a1546b62" args="(const mat &Val) const " --> |
---|
| 187 | virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#34956d4dd3176eeb5937cf48a1546b62">evallog_m</a> (const mat &Val) const </td></tr> |
---|
| 188 | |
---|
| 189 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute log-probability of multiple values argument <code>val</code>. <br></td></tr> |
---|
| 190 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e584eac5579c1b6384947ecf66166c77"></a><!-- doxytag: member="bdm::merger_base::condition" ref="e584eac5579c1b6384947ecf66166c77" args="(const RV &rv) const " --> |
---|
| 191 | virtual <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#e584eac5579c1b6384947ecf66166c77">condition</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &<a class="el" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8">rv</a>) const </td></tr> |
---|
| 192 | |
---|
| 193 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Return conditional density on the given <a class="el" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>, the remaining rvs will be in conditioning. <br></td></tr> |
---|
| 194 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3fb2ece54f720b62ad325e61214fa0a1"></a><!-- doxytag: member="bdm::merger_base::marginal" ref="3fb2ece54f720b62ad325e61214fa0a1" args="(const RV &rv) const " --> |
---|
| 195 | virtual <a class="el" href="classbdm_1_1epdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#3fb2ece54f720b62ad325e61214fa0a1">marginal</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &<a class="el" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8">rv</a>) const </td></tr> |
---|
| 196 | |
---|
| 197 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Return marginal density on the given <a class="el" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>, the remainig rvs are intergrated out. <br></td></tr> |
---|
| 198 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0a7705e80601957f7226d333a0a6d539"></a><!-- doxytag: member="bdm::merger_base::qbounds" ref="0a7705e80601957f7226d333a0a6d539" args="(vec &lb, vec &ub, double percentage=0.95) const " --> |
---|
| 199 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#0a7705e80601957f7226d333a0a6d539">qbounds</a> (vec &lb, vec &ub, double percentage=0.95) const </td></tr> |
---|
| 200 | |
---|
| 201 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Lower and upper bounds of <code>percentage</code> % quantile, returns mean-2*sigma as default. <br></td></tr> |
---|
| 202 | <tr><td colspan="2"><div class="groupHeader">Connection to other classes</div></td></tr> |
---|
| 203 | <tr><td colspan="2"><div class="groupText">Description of the random quantity via attribute <code>rv</code> is optional. For operations such as sampling <code>rv</code> does not need to be set. However, for <code>marginalization</code> and <code>conditioning</code> <code>rv</code> has to be set. NB: <br><br></div></td></tr> |
---|
| 204 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f423e28448dbb69ef4905295ec8de8ff"></a><!-- doxytag: member="bdm::merger_base::set_rv" ref="f423e28448dbb69ef4905295ec8de8ff" args="(const RV &rv0)" --> |
---|
| 205 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#f423e28448dbb69ef4905295ec8de8ff">set_rv</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &rv0)</td></tr> |
---|
| 206 | |
---|
| 207 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Name its rv. <br></td></tr> |
---|
| 208 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c4b863ff84c7a4882fb3ad18556027f9"></a><!-- doxytag: member="bdm::merger_base::isnamed" ref="c4b863ff84c7a4882fb3ad18556027f9" args="() const " --> |
---|
| 209 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#c4b863ff84c7a4882fb3ad18556027f9">isnamed</a> () const </td></tr> |
---|
| 210 | |
---|
| 211 | <tr><td class="mdescLeft"> </td><td class="mdescRight">True if rv is assigned. <br></td></tr> |
---|
| 212 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4ab378d5e004c3ff3e2d4e64f7bba21"></a><!-- doxytag: member="bdm::merger_base::_rv" ref="a4ab378d5e004c3ff3e2d4e64f7bba21" args="() const " --> |
---|
| 213 | const <a class="el" href="classbdm_1_1RV.html">RV</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#a4ab378d5e004c3ff3e2d4e64f7bba21">_rv</a> () const </td></tr> |
---|
| 214 | |
---|
| 215 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Return name (fails when isnamed is false). <br></td></tr> |
---|
| 216 | <tr><td colspan="2"><div class="groupHeader">Access to attributes</div></td></tr> |
---|
| 217 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7083a65f7b7a0d0d13b2c516bd2ec29c"></a><!-- doxytag: member="bdm::merger_base::dimension" ref="7083a65f7b7a0d0d13b2c516bd2ec29c" args="() const " --> |
---|
| 218 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#7083a65f7b7a0d0d13b2c516bd2ec29c">dimension</a> () const </td></tr> |
---|
| 219 | |
---|
| 220 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Size of the random variable. <br></td></tr> |
---|
| 221 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> |
---|
| 222 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="09bc4d43dec350a40d17953b8b59d3b7"></a><!-- doxytag: member="bdm::merger_base::dls" ref="09bc4d43dec350a40d17953b8b59d3b7" args="" --> |
---|
| 223 | Array< <a class="el" href="classbdm_1_1datalink__m2e.html">datalink_m2e</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#09bc4d43dec350a40d17953b8b59d3b7">dls</a></td></tr> |
---|
| 224 | |
---|
| 225 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Data link for each <a class="el" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> in mpdfs. <br></td></tr> |
---|
| 226 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4e66803b04fc04b21b3716b3a317421f"></a><!-- doxytag: member="bdm::merger_base::rvzs" ref="4e66803b04fc04b21b3716b3a317421f" args="" --> |
---|
| 227 | Array< <a class="el" href="classbdm_1_1RV.html">RV</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#4e66803b04fc04b21b3716b3a317421f">rvzs</a></td></tr> |
---|
| 228 | |
---|
| 229 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Array of rvs that are not modelled by mpdfs at all, <img class="formulaInl" alt="$ z_i $" src="form_127.png">. <br></td></tr> |
---|
| 230 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8098858f2edb1294122cbe4f05bf8694"></a><!-- doxytag: member="bdm::merger_base::zdls" ref="8098858f2edb1294122cbe4f05bf8694" args="" --> |
---|
| 231 | Array< <a class="el" href="classbdm_1_1datalink__m2e.html">datalink_m2e</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#8098858f2edb1294122cbe4f05bf8694">zdls</a></td></tr> |
---|
| 232 | |
---|
| 233 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Data Links for extension <img class="formulaInl" alt="$ f(z_i|x_i,y_i) $" src="form_129.png">. <br></td></tr> |
---|
| 234 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="52e33b1aa153fa700cc036be2b12f9bd"></a><!-- doxytag: member="bdm::merger_base::Ns" ref="52e33b1aa153fa700cc036be2b12f9bd" args="" --> |
---|
| 235 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#52e33b1aa153fa700cc036be2b12f9bd">Ns</a></td></tr> |
---|
| 236 | |
---|
| 237 | <tr><td class="mdescLeft"> </td><td class="mdescRight">number of sources <br></td></tr> |
---|
| 238 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ee197330820127f3d12106ddee6b25c7"></a><!-- doxytag: member="bdm::merger_base::METHOD" ref="ee197330820127f3d12106ddee6b25c7" args="" --> |
---|
| 239 | MERGER_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#ee197330820127f3d12106ddee6b25c7">METHOD</a></td></tr> |
---|
| 240 | |
---|
| 241 | <tr><td class="mdescLeft"> </td><td class="mdescRight">switch of the methoh used for merging <br></td></tr> |
---|
| 242 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="972f64f6f388b929cf94d2c478116f14"></a><!-- doxytag: member="bdm::merger_base::beta" ref="972f64f6f388b929cf94d2c478116f14" args="" --> |
---|
| 243 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#972f64f6f388b929cf94d2c478116f14">beta</a></td></tr> |
---|
| 244 | |
---|
| 245 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Prior on the log-normal merging model. <br></td></tr> |
---|
| 246 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a042ce6ee1fb91048ea89bec9934718e"></a><!-- doxytag: member="bdm::merger_base::eSmp" ref="a042ce6ee1fb91048ea89bec9934718e" args="" --> |
---|
| 247 | <a class="el" href="classbdm_1_1eEmp.html">eEmp</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#a042ce6ee1fb91048ea89bec9934718e">eSmp</a></td></tr> |
---|
| 248 | |
---|
| 249 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Projection to empirical density (could also be piece-wise linear). <br></td></tr> |
---|
| 250 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dd180c651a75a131d125305f6bb017f7"></a><!-- doxytag: member="bdm::merger_base::DBG" ref="dd180c651a75a131d125305f6bb017f7" args="" --> |
---|
| 251 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#dd180c651a75a131d125305f6bb017f7">DBG</a></td></tr> |
---|
| 252 | |
---|
| 253 | <tr><td class="mdescLeft"> </td><td class="mdescRight">debug or not debug <br></td></tr> |
---|
| 254 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7b0b7549b8335cdd26faee68093da3ad"></a><!-- doxytag: member="bdm::merger_base::dbg" ref="7b0b7549b8335cdd26faee68093da3ad" args="" --> |
---|
| 255 | it_file * </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#7b0b7549b8335cdd26faee68093da3ad">dbg</a></td></tr> |
---|
| 256 | |
---|
| 257 | <tr><td class="mdescLeft"> </td><td class="mdescRight">debugging file <br></td></tr> |
---|
| 258 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="23faf2debc4dde10836393b8c665914a"></a><!-- doxytag: member="bdm::merger_base::mpdfs" ref="23faf2debc4dde10836393b8c665914a" args="" --> |
---|
| 259 | Array< <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1compositepdf.html#23faf2debc4dde10836393b8c665914a">mpdfs</a></td></tr> |
---|
| 260 | |
---|
| 261 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Elements of composition. <br></td></tr> |
---|
| 262 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="16adac20ec7fe07e1ea0b27d917788ce"></a><!-- doxytag: member="bdm::merger_base::dim" ref="16adac20ec7fe07e1ea0b27d917788ce" args="" --> |
---|
| 263 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce">dim</a></td></tr> |
---|
| 264 | |
---|
| 265 | <tr><td class="mdescLeft"> </td><td class="mdescRight">dimension of the random variable <br></td></tr> |
---|
| 266 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="62c5b8ff71d9ebe6cd58d3c342eb1dc8"></a><!-- doxytag: member="bdm::merger_base::rv" ref="62c5b8ff71d9ebe6cd58d3c342eb1dc8" args="" --> |
---|
| 267 | <a class="el" href="classbdm_1_1RV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8">rv</a></td></tr> |
---|
| 268 | |
---|
| 269 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Description of the random variable. <br></td></tr> |
---|
| 270 | </table> |
---|
| 271 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
| 272 | Base class for general combination of pdfs on discrete support. |
---|
| 273 | <p> |
---|
| 274 | Mixtures of Gaussian densities are used internally. Switching to other densities should be trivial.<p> |
---|
| 275 | The merged pdfs are expected to be of the form: <p class="formulaDsp"> |
---|
| 276 | <img class="formulaDsp" alt="\[ f(x_i|y_i), i=1..n \]" src="form_124.png"> |
---|
| 277 | <p> |
---|
| 278 | where the resulting merger is a density on <img class="formulaInl" alt="$ \cup [x_i,y_i] $" src="form_125.png"> . Note that all variables will be joined.<p> |
---|
| 279 | As a result of this feature, each source must be extended to common support <p class="formulaDsp"> |
---|
| 280 | <img class="formulaDsp" alt="\[ f(z_i|y_i,x_i) f(x_i|y_i) f(y_i) i=1..n \]" src="form_126.png"> |
---|
| 281 | <p> |
---|
| 282 | where <img class="formulaInl" alt="$ z_i $" src="form_127.png"> accumulate variables that were not in the original source. These extensions are calculated on-the-fly.<p> |
---|
| 283 | However, these operations can not be performed in general. Hence, this class merges only sources on common support, <img class="formulaInl" alt="$ y_i={}, z_i={}, \forall i $" src="form_128.png">. For merging of more general cases, use offsprings merger_mix and merger_grid. <hr><h2>Member Function Documentation</h2> |
---|
| 284 | <a class="anchor" name="c73d39acc4378eee6a63155c3517d3c9"></a><!-- doxytag: member="bdm::merger_base::getrv" ref="c73d39acc4378eee6a63155c3517d3c9" args="(bool checkoverlap=false)" --> |
---|
| 285 | <div class="memitem"> |
---|
| 286 | <div class="memproto"> |
---|
| 287 | <table class="memname"> |
---|
| 288 | <tr> |
---|
| 289 | <td class="memname"><a class="el" href="classbdm_1_1RV.html">RV</a> bdm::compositepdf::getrv </td> |
---|
| 290 | <td>(</td> |
---|
| 291 | <td class="paramtype">bool </td> |
---|
| 292 | <td class="paramname"> <em>checkoverlap</em> = <code>false</code> </td> |
---|
| 293 | <td> ) </td> |
---|
| 294 | <td><code> [inherited]</code></td> |
---|
| 295 | </tr> |
---|
| 296 | </table> |
---|
| 297 | </div> |
---|
| 298 | <div class="memdoc"> |
---|
| 299 | |
---|
| 300 | <p> |
---|
| 301 | find common rv, flag |
---|
| 302 | <p> |
---|
| 303 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
| 304 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
| 305 | <tr><td valign="top"></td><td valign="top"><em>checkoverlap</em> </td><td>modifies whether overlaps are acceptable </td></tr> |
---|
| 306 | </table> |
---|
| 307 | </dl> |
---|
| 308 | |
---|
| 309 | <p>References <a class="el" href="libBM_8cpp-source.html#l00078">bdm::RV::add()</a>, and <a class="el" href="libBM_8h-source.html#l00561">bdm::compositepdf::mpdfs</a>.</p> |
---|
| 310 | |
---|
| 311 | <p>Referenced by <a class="el" href="merger_8h-source.html#l00079">set_sources()</a>.</p> |
---|
| 312 | |
---|
| 313 | </div> |
---|
| 314 | </div><p> |
---|
| 315 | <a class="anchor" name="021acbf1a6e3bfde2a1b9c1c73cea6e0"></a><!-- doxytag: member="bdm::merger_base::mean" ref="021acbf1a6e3bfde2a1b9c1c73cea6e0" args="() const " --> |
---|
| 316 | <div class="memitem"> |
---|
| 317 | <div class="memproto"> |
---|
| 318 | <table class="memname"> |
---|
| 319 | <tr> |
---|
| 320 | <td class="memname">vec bdm::merger_base::mean </td> |
---|
| 321 | <td>(</td> |
---|
| 322 | <td class="paramname"> </td> |
---|
| 323 | <td> ) </td> |
---|
| 324 | <td> const<code> [inline, virtual]</code></td> |
---|
| 325 | </tr> |
---|
| 326 | </table> |
---|
| 327 | </div> |
---|
| 328 | <div class="memdoc"> |
---|
| 329 | |
---|
| 330 | <p> |
---|
| 331 | weight w is a |
---|
| 332 | <p> |
---|
| 333 | sample from merged density |
---|
| 334 | <p>Reimplemented from <a class="el" href="classbdm_1_1epdf.html#0c8d13d788094605b3cdab20a6e22b75">bdm::epdf</a>.</p> |
---|
| 335 | |
---|
| 336 | <p>References <a class="el" href="libEF_8h-source.html#l01037">bdm::eEmp::_samples()</a>, <a class="el" href="libEF_8h-source.html#l01033">bdm::eEmp::_w()</a>, <a class="el" href="libBM_8h-source.html#l00232">bdm::epdf::dim</a>, <a class="el" href="merger_8h-source.html#l00063">eSmp</a>, and <a class="el" href="merger_8h-source.html#l00055">Ns</a>.</p> |
---|
| 337 | |
---|
| 338 | <p>Referenced by <a class="el" href="merger_8h-source.html#l00192">variance()</a>.</p> |
---|
| 339 | |
---|
| 340 | </div> |
---|
| 341 | </div><p> |
---|
| 342 | <hr>The documentation for this class was generated from the following files:<ul> |
---|
| 343 | <li><a class="el" href="merger_8h-source.html">merger.h</a><li>merger.cpp</ul> |
---|
| 344 | </div> |
---|
| 345 | <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 14:13:29 2009 for mixpp by |
---|
| 346 | <a href="http://www.doxygen.org/index.html"> |
---|
| 347 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
| 348 | </body> |
---|
| 349 | </html> |
---|