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 class="current"><a href="annotated.html"><span>Classes</span></a></li> |
---|
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> |
---|
61 | <li><a href="classes.html"><span>Class Index</span></a></li> |
---|
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> |
---|
66 | <div class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1merger__base.html">merger_base</a> |
---|
67 | </div> |
---|
68 | </div> |
---|
69 | <div class="contents"> |
---|
70 | <h1>bdm::merger_base Class Reference</h1><!-- doxytag: class="bdm::merger_base" --><!-- doxytag: inherits="bdm::epdf" -->Base class for general combination of pdfs on discrete support. |
---|
71 | <a href="#_details">More...</a> |
---|
72 | <p> |
---|
73 | <code>#include <<a class="el" href="merger_8h-source.html">merger.h</a>></code> |
---|
74 | <p> |
---|
75 | |
---|
76 | <p> |
---|
77 | <a href="classbdm_1_1merger__base-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
---|
78 | <tr><td></td></tr> |
---|
79 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
---|
80 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af0e6941ba5919cae1bc530e2181b109"></a><!-- doxytag: member="bdm::merger_base::to_string" ref="af0e6941ba5919cae1bc530e2181b109" args="()" --> |
---|
81 | virtual string </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#af0e6941ba5919cae1bc530e2181b109">to_string</a> ()</td></tr> |
---|
82 | |
---|
83 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method returns a basic info about the current instance. <br></td></tr> |
---|
84 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="67d954d255ede776eade7334d4895790"></a><!-- doxytag: member="bdm::merger_base::to_setting" ref="67d954d255ede776eade7334d4895790" args="(Setting &set) const " --> |
---|
85 | 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> |
---|
86 | |
---|
87 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method save all the instance properties into the Setting structure. <br></td></tr> |
---|
88 | <tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr> |
---|
89 | <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="()" --> |
---|
90 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#f9d8c6c26c6520dbb17d4e80f635e7be">merger_base</a> ()</td></tr> |
---|
91 | |
---|
92 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr> |
---|
93 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fdbaaaa1e7e090774dc49e45d5d80111"></a><!-- doxytag: member="bdm::merger_base::merger_base" ref="fdbaaaa1e7e090774dc49e45d5d80111" args="(const Array< shared_ptr< mpdf > > &S)" --> |
---|
94 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#fdbaaaa1e7e090774dc49e45d5d80111">merger_base</a> (const Array< <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>< <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> > > &S)</td></tr> |
---|
95 | |
---|
96 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor from sources. <br></td></tr> |
---|
97 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="871add803409c5cc3a634b4ff8fa997f"></a><!-- doxytag: member="bdm::merger_base::set_sources" ref="871add803409c5cc3a634b4ff8fa997f" args="(const Array< shared_ptr< mpdf > > &Sources)" --> |
---|
98 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#871add803409c5cc3a634b4ff8fa997f">set_sources</a> (const Array< <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>< <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> > > &Sources)</td></tr> |
---|
99 | |
---|
100 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Function setting the main internal structures. <br></td></tr> |
---|
101 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="337e1e56ef95d3d3ee922e8b81be95f8"></a><!-- doxytag: member="bdm::merger_base::set_support" ref="337e1e56ef95d3d3ee922e8b81be95f8" args="(const Array< vec > &XYZ, const int dimsize)" --> |
---|
102 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#337e1e56ef95d3d3ee922e8b81be95f8">set_support</a> (const Array< vec > &XYZ, const int dimsize)</td></tr> |
---|
103 | |
---|
104 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Rectangular support each vector of XYZ specifies (begining-end) interval for each dimension. Same number of points, <code>dimsize</code>, in each dimension. <br></td></tr> |
---|
105 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3e2c8028be0ccd10058d030250a91a60"></a><!-- doxytag: member="bdm::merger_base::set_support" ref="3e2c8028be0ccd10058d030250a91a60" args="(const Array< vec > &XYZ, const ivec &gridsize)" --> |
---|
106 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#3e2c8028be0ccd10058d030250a91a60">set_support</a> (const Array< vec > &XYZ, const ivec &gridsize)</td></tr> |
---|
107 | |
---|
108 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Rectangular support each vector of XYZ specifies (begining-end) interval for each dimension. <code>gridsize</code> specifies number of points is each dimension. <br></td></tr> |
---|
109 | <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)" --> |
---|
110 | 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> |
---|
111 | |
---|
112 | <tr><td class="mdescLeft"> </td><td class="mdescRight">set debug file <br></td></tr> |
---|
113 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="86698b7fd1e4320e9830d7dc24ee6c9e"></a><!-- doxytag: member="bdm::merger_base::set_method" ref="86698b7fd1e4320e9830d7dc24ee6c9e" args="(MERGER_METHOD MTH=DFLT_METHOD, double beta0=DFLT_beta)" --> |
---|
114 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#86698b7fd1e4320e9830d7dc24ee6c9e">set_method</a> (MERGER_METHOD MTH=<a class="el" href="classbdm_1_1merger__base.html#7acdf3aeded70475ba8a26450a4e197c">DFLT_METHOD</a>, double beta0=<a class="el" href="classbdm_1_1merger__base.html#dfe17e57529d84e122e61401543e9de6">DFLT_beta</a>)</td></tr> |
---|
115 | |
---|
116 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set internal parameters used in approximation. <br></td></tr> |
---|
117 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="28af7b365ecd8c3a15f0e934496871e0"></a><!-- doxytag: member="bdm::merger_base::set_support" ref="28af7b365ecd8c3a15f0e934496871e0" args="(const epdf &overall, int N)" --> |
---|
118 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#28af7b365ecd8c3a15f0e934496871e0">set_support</a> (const <a class="el" href="classbdm_1_1epdf.html">epdf</a> &overall, int N)</td></tr> |
---|
119 | |
---|
120 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set support points from a pdf by drawing N samples. <br></td></tr> |
---|
121 | <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="()" --> |
---|
122 | virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#32d7e1dd6d91f77c81df7e82aac18689">~merger_base</a> ()</td></tr> |
---|
123 | |
---|
124 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br></td></tr> |
---|
125 | <tr><td colspan="2"><div class="groupHeader">Mathematical operations</div></td></tr> |
---|
126 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="df4a0094dcc40b3057675443bccb6511"></a><!-- doxytag: member="bdm::merger_base::merge" ref="df4a0094dcc40b3057675443bccb6511" args="()" --> |
---|
127 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#df4a0094dcc40b3057675443bccb6511">merge</a> ()</td></tr> |
---|
128 | |
---|
129 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Merge given sources in given points. <br></td></tr> |
---|
130 | <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)" --> |
---|
131 | vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#1f52bf47d2cdd23a95b19e3da902e431">merge_points</a> (mat &lW)</td></tr> |
---|
132 | |
---|
133 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Merge log-likelihood values in points using method specified by parameter METHOD. <br></td></tr> |
---|
134 | <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> |
---|
135 | |
---|
136 | <tr><td class="mdescLeft"> </td><td class="mdescRight">weight w is a <a href="#021acbf1a6e3bfde2a1b9c1c73cea6e0"></a><br></td></tr> |
---|
137 | <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 " --> |
---|
138 | mat </td><td class="memItemRight" valign="bottom"><b>covariance</b> () const </td></tr> |
---|
139 | |
---|
140 | <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 " --> |
---|
141 | vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#76fe431922844d132b4e1ecf70f53c99">variance</a> () const </td></tr> |
---|
142 | |
---|
143 | <tr><td class="mdescLeft"> </td><td class="mdescRight">return expected variance (not covariance!) <br></td></tr> |
---|
144 | <tr><td colspan="2"><div class="groupHeader">Access to attributes</div></td></tr> |
---|
145 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fb682e470103f4e0b353b7c9200d177f"></a><!-- doxytag: member="bdm::merger_base::_Smp" ref="fb682e470103f4e0b353b7c9200d177f" args="()" --> |
---|
146 | <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> |
---|
147 | |
---|
148 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Access function. <br></td></tr> |
---|
149 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="10dd390fc6f0d1733bb07cb51977160c"></a><!-- doxytag: member="bdm::merger_base::from_setting" ref="10dd390fc6f0d1733bb07cb51977160c" args="(const Setting &set)" --> |
---|
150 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#10dd390fc6f0d1733bb07cb51977160c">from_setting</a> (const Setting &set)</td></tr> |
---|
151 | |
---|
152 | <tr><td class="mdescLeft"> </td><td class="mdescRight">load from setting <br></td></tr> |
---|
153 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="400e222d4c41dc57ac19e6735429c4cb"></a><!-- doxytag: member="bdm::merger_base::validate" ref="400e222d4c41dc57ac19e6735429c4cb" args="()" --> |
---|
154 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#400e222d4c41dc57ac19e6735429c4cb">validate</a> ()</td></tr> |
---|
155 | |
---|
156 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method TODO. <br></td></tr> |
---|
157 | <tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr> |
---|
158 | <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> |
---|
159 | <li>empty constructor, </li> |
---|
160 | <li>copy constructor,</li> |
---|
161 | </ul> |
---|
162 | The following constructors should be supported for convenience: <ul> |
---|
163 | <li>constructor followed by calling <code>set_parameters()</code> </li> |
---|
164 | <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> |
---|
165 | </ul> |
---|
166 | All internal data structures are constructed as empty. Their values (including sizes) will be set by method <code>set_parameters()</code>. This way references can be initialized in constructors. <br><br></div></td></tr> |
---|
167 | <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)" --> |
---|
168 | void </td><td class="memItemRight" valign="bottom"><b>set_parameters</b> (int dim0)</td></tr> |
---|
169 | |
---|
170 | <tr><td colspan="2"><div class="groupHeader">Matematical Operations</div></td></tr> |
---|
171 | <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 " --> |
---|
172 | virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#75ba57a89681a8efec488f5796c7cc1b">sample</a> () const </td></tr> |
---|
173 | |
---|
174 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a sample, <img class="formulaInl" alt="$ x $" src="form_7.png"> from density <img class="formulaInl" alt="$ f_x()$" src="form_8.png">. <br></td></tr> |
---|
175 | <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 " --> |
---|
176 | 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> |
---|
177 | |
---|
178 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns N samples, <img class="formulaInl" alt="$ [x_1 , x_2 , \ldots \ $" src="form_9.png"> from density <img class="formulaInl" alt="$ f_x(rv)$" src="form_10.png">. <br></td></tr> |
---|
179 | <tr><td class="memItemLeft" nowrap align="right" valign="top">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> |
---|
180 | |
---|
181 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d08b68a5abd461f1b6519597e344caf8"></a><!-- doxytag: member="bdm::merger_base::evallog_m" ref="d08b68a5abd461f1b6519597e344caf8" args="(const mat &Val) const " --> |
---|
182 | virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#d08b68a5abd461f1b6519597e344caf8">evallog_m</a> (const mat &Val) const </td></tr> |
---|
183 | |
---|
184 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute log-probability of multiple values argument <code>val</code>. <br></td></tr> |
---|
185 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9bc02dae61584138443baf6b1cbc1ac9"></a><!-- doxytag: member="bdm::merger_base::evallog_m" ref="9bc02dae61584138443baf6b1cbc1ac9" args="(const Array< vec > &Avec) const " --> |
---|
186 | virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#9bc02dae61584138443baf6b1cbc1ac9">evallog_m</a> (const Array< vec > &Avec) const </td></tr> |
---|
187 | |
---|
188 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute log-probability of multiple values argument <code>val</code>. <br></td></tr> |
---|
189 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1499d35b79bce0cfa64fc5cafb9c03b2"></a><!-- doxytag: member="bdm::merger_base::condition" ref="1499d35b79bce0cfa64fc5cafb9c03b2" args="(const RV &rv) const " --> |
---|
190 | virtual <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>< <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#1499d35b79bce0cfa64fc5cafb9c03b2">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> |
---|
191 | |
---|
192 | <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> |
---|
193 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a84b05f5293cab2aeb4e07faffa60906"></a><!-- doxytag: member="bdm::merger_base::marginal" ref="a84b05f5293cab2aeb4e07faffa60906" args="(const RV &rv) const " --> |
---|
194 | virtual <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_1epdf.html#a84b05f5293cab2aeb4e07faffa60906">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> |
---|
195 | |
---|
196 | <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> |
---|
197 | <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 " --> |
---|
198 | 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> |
---|
199 | |
---|
200 | <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> |
---|
201 | <tr><td colspan="2"><div class="groupHeader">Connection to other classes</div></td></tr> |
---|
202 | <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> |
---|
203 | <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)" --> |
---|
204 | 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> |
---|
205 | |
---|
206 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Name its rv. <br></td></tr> |
---|
207 | <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 " --> |
---|
208 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#c4b863ff84c7a4882fb3ad18556027f9">isnamed</a> () const </td></tr> |
---|
209 | |
---|
210 | <tr><td class="mdescLeft"> </td><td class="mdescRight">True if rv is assigned. <br></td></tr> |
---|
211 | <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 " --> |
---|
212 | 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> |
---|
213 | |
---|
214 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Return name (fails when isnamed is false). <br></td></tr> |
---|
215 | <tr><td colspan="2"><div class="groupHeader">Access to attributes</div></td></tr> |
---|
216 | <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 " --> |
---|
217 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#7083a65f7b7a0d0d13b2c516bd2ec29c">dimension</a> () const </td></tr> |
---|
218 | |
---|
219 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Size of the random variable. <br></td></tr> |
---|
220 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> |
---|
221 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3127be48ba35960b943d31aa8b9abf88"></a><!-- doxytag: member="bdm::merger_base::mpdfs" ref="3127be48ba35960b943d31aa8b9abf88" args="" --> |
---|
222 | Array< <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>< <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> > > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#3127be48ba35960b943d31aa8b9abf88">mpdfs</a></td></tr> |
---|
223 | |
---|
224 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Elements of composition. <br></td></tr> |
---|
225 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="09bc4d43dec350a40d17953b8b59d3b7"></a><!-- doxytag: member="bdm::merger_base::dls" ref="09bc4d43dec350a40d17953b8b59d3b7" args="" --> |
---|
226 | 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> |
---|
227 | |
---|
228 | <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 , where is random variable, rv, and...">mpdf</a> in mpdfs. <br></td></tr> |
---|
229 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4e66803b04fc04b21b3716b3a317421f"></a><!-- doxytag: member="bdm::merger_base::rvzs" ref="4e66803b04fc04b21b3716b3a317421f" args="" --> |
---|
230 | 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> |
---|
231 | |
---|
232 | <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_100.png">. <br></td></tr> |
---|
233 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8098858f2edb1294122cbe4f05bf8694"></a><!-- doxytag: member="bdm::merger_base::zdls" ref="8098858f2edb1294122cbe4f05bf8694" args="" --> |
---|
234 | 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> |
---|
235 | |
---|
236 | <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_102.png">. <br></td></tr> |
---|
237 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="39d263d92aa85553730c44958a92a541"></a><!-- doxytag: member="bdm::merger_base::Npoints" ref="39d263d92aa85553730c44958a92a541" args="" --> |
---|
238 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#39d263d92aa85553730c44958a92a541">Npoints</a></td></tr> |
---|
239 | |
---|
240 | <tr><td class="mdescLeft"> </td><td class="mdescRight">number of support points <br></td></tr> |
---|
241 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4f6cd7ebe1c3c7556039dbfeb00f71f5"></a><!-- doxytag: member="bdm::merger_base::Nsources" ref="4f6cd7ebe1c3c7556039dbfeb00f71f5" args="" --> |
---|
242 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#4f6cd7ebe1c3c7556039dbfeb00f71f5">Nsources</a></td></tr> |
---|
243 | |
---|
244 | <tr><td class="mdescLeft"> </td><td class="mdescRight">number of sources <br></td></tr> |
---|
245 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ee197330820127f3d12106ddee6b25c7"></a><!-- doxytag: member="bdm::merger_base::METHOD" ref="ee197330820127f3d12106ddee6b25c7" args="" --> |
---|
246 | MERGER_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#ee197330820127f3d12106ddee6b25c7">METHOD</a></td></tr> |
---|
247 | |
---|
248 | <tr><td class="mdescLeft"> </td><td class="mdescRight">switch of the methoh used for merging <br></td></tr> |
---|
249 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="972f64f6f388b929cf94d2c478116f14"></a><!-- doxytag: member="bdm::merger_base::beta" ref="972f64f6f388b929cf94d2c478116f14" args="" --> |
---|
250 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#972f64f6f388b929cf94d2c478116f14">beta</a></td></tr> |
---|
251 | |
---|
252 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Prior on the log-normal merging model. <br></td></tr> |
---|
253 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a042ce6ee1fb91048ea89bec9934718e"></a><!-- doxytag: member="bdm::merger_base::eSmp" ref="a042ce6ee1fb91048ea89bec9934718e" args="" --> |
---|
254 | <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> |
---|
255 | |
---|
256 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Projection to empirical density (could also be piece-wise linear). <br></td></tr> |
---|
257 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dd180c651a75a131d125305f6bb017f7"></a><!-- doxytag: member="bdm::merger_base::DBG" ref="dd180c651a75a131d125305f6bb017f7" args="" --> |
---|
258 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#dd180c651a75a131d125305f6bb017f7">DBG</a></td></tr> |
---|
259 | |
---|
260 | <tr><td class="mdescLeft"> </td><td class="mdescRight">debug or not debug <br></td></tr> |
---|
261 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b2c6278b996696cb711cb7be900ccf5b"></a><!-- doxytag: member="bdm::merger_base::dbg_file" ref="b2c6278b996696cb711cb7be900ccf5b" args="" --> |
---|
262 | it_file * </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#b2c6278b996696cb711cb7be900ccf5b">dbg_file</a></td></tr> |
---|
263 | |
---|
264 | <tr><td class="mdescLeft"> </td><td class="mdescRight">debugging file <br></td></tr> |
---|
265 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="16adac20ec7fe07e1ea0b27d917788ce"></a><!-- doxytag: member="bdm::merger_base::dim" ref="16adac20ec7fe07e1ea0b27d917788ce" args="" --> |
---|
266 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce">dim</a></td></tr> |
---|
267 | |
---|
268 | <tr><td class="mdescLeft"> </td><td class="mdescRight">dimension of the random variable <br></td></tr> |
---|
269 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="62c5b8ff71d9ebe6cd58d3c342eb1dc8"></a><!-- doxytag: member="bdm::merger_base::rv" ref="62c5b8ff71d9ebe6cd58d3c342eb1dc8" args="" --> |
---|
270 | <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> |
---|
271 | |
---|
272 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Description of the random variable. <br></td></tr> |
---|
273 | <tr><td colspan="2"><br><h2>Static Protected Attributes</h2></td></tr> |
---|
274 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7acdf3aeded70475ba8a26450a4e197c"></a><!-- doxytag: member="bdm::merger_base::DFLT_METHOD" ref="7acdf3aeded70475ba8a26450a4e197c" args="" --> |
---|
275 | static const MERGER_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#7acdf3aeded70475ba8a26450a4e197c">DFLT_METHOD</a> = LOGNORMAL</td></tr> |
---|
276 | |
---|
277 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default for METHOD. <br></td></tr> |
---|
278 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dfe17e57529d84e122e61401543e9de6"></a><!-- doxytag: member="bdm::merger_base::DFLT_beta" ref="dfe17e57529d84e122e61401543e9de6" args="" --> |
---|
279 | static const double </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#dfe17e57529d84e122e61401543e9de6">DFLT_beta</a> = 1.2</td></tr> |
---|
280 | |
---|
281 | <tr><td class="mdescLeft"> </td><td class="mdescRight">default for beta <br></td></tr> |
---|
282 | </table> |
---|
283 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
284 | Base class for general combination of pdfs on discrete support. |
---|
285 | <p> |
---|
286 | Mixtures of Gaussian densities are used internally. Switching to other densities should be trivial.<p> |
---|
287 | The merged pdfs are expected to be of the form: <p class="formulaDsp"> |
---|
288 | <img class="formulaDsp" alt="\[ f(x_i|y_i), i=1..n \]" src="form_97.png"> |
---|
289 | <p> |
---|
290 | where the resulting merger is a density on <img class="formulaInl" alt="$ \cup [x_i,y_i] $" src="form_98.png"> . Note that all variables will be joined.<p> |
---|
291 | As a result of this feature, each source must be extended to common support <p class="formulaDsp"> |
---|
292 | <img class="formulaDsp" alt="\[ f(z_i|y_i,x_i) f(x_i|y_i) f(y_i) i=1..n \]" src="form_99.png"> |
---|
293 | <p> |
---|
294 | where <img class="formulaInl" alt="$ z_i $" src="form_100.png"> accumulate variables that were not in the original source. These extensions are calculated on-the-fly.<p> |
---|
295 | 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_101.png">. For merging of more general cases, use offsprings <a class="el" href="classbdm_1_1merger__mix.html" title="Merger using importance sampling with mixture proposal density.">merger_mix</a> and merger_grid. <hr><h2>Member Function Documentation</h2> |
---|
296 | <a class="anchor" name="deab266d63c236c277538867d5c3f249"></a><!-- doxytag: member="bdm::merger_base::evallog" ref="deab266d63c236c277538867d5c3f249" args="(const vec &val) const " --> |
---|
297 | <div class="memitem"> |
---|
298 | <div class="memproto"> |
---|
299 | <table class="memname"> |
---|
300 | <tr> |
---|
301 | <td class="memname">virtual double bdm::epdf::evallog </td> |
---|
302 | <td>(</td> |
---|
303 | <td class="paramtype">const vec & </td> |
---|
304 | <td class="paramname"> <em>val</em> </td> |
---|
305 | <td> ) </td> |
---|
306 | <td> const<code> [inline, virtual, inherited]</code></td> |
---|
307 | </tr> |
---|
308 | </table> |
---|
309 | </div> |
---|
310 | <div class="memdoc"> |
---|
311 | |
---|
312 | <p> |
---|
313 | Compute log-probability of argument <code>val</code> In case the argument is out of suport return -Infinity |
---|
314 | <p>Reimplemented in <a class="el" href="classbdm_1_1emix.html#0f3db99f730bde6b7953931594537e8e">bdm::emix</a>, <a class="el" href="classbdm_1_1eprod.html#a5a91e67d2f74ff2b0b8eecde2fa42e2">bdm::eprod</a>, <a class="el" href="classbdm_1_1eEF.html#a36d06ecdd6f4c79dc122510eaccc692">bdm::eEF</a>, <a class="el" href="classbdm_1_1egamma.html#a8e11e5a580ff42a1b205974c60768c6">bdm::egamma</a>, <a class="el" href="classbdm_1_1euni.html#caa07b8307bd793d5339d6583e0aba81">bdm::euni</a>, <a class="el" href="classbdm_1_1eiWishartCh.html#a6ddbd815b8b666dd542e97f009f89bb">bdm::eiWishartCh</a>, <a class="el" href="classbdm_1_1eEmp.html#01654c014d3aa068f8d4ecba4be86d09">bdm::eEmp</a>, and <a class="el" href="classbdm_1_1merger__mix.html#9737ad6d1ecf4e0cdd6cea6a40875a34">bdm::merger_mix</a>.</p> |
---|
315 | |
---|
316 | <p>Referenced by <a class="el" href="bdmbase_8cpp-source.html#l00152">bdm::epdf::evallog_m()</a>, and <a class="el" href="emix_8h-source.html#l00076">bdm::mratio::evallogcond()</a>.</p> |
---|
317 | |
---|
318 | </div> |
---|
319 | </div><p> |
---|
320 | <a class="anchor" name="021acbf1a6e3bfde2a1b9c1c73cea6e0"></a><!-- doxytag: member="bdm::merger_base::mean" ref="021acbf1a6e3bfde2a1b9c1c73cea6e0" args="() const " --> |
---|
321 | <div class="memitem"> |
---|
322 | <div class="memproto"> |
---|
323 | <table class="memname"> |
---|
324 | <tr> |
---|
325 | <td class="memname">vec bdm::merger_base::mean </td> |
---|
326 | <td>(</td> |
---|
327 | <td class="paramname"> </td> |
---|
328 | <td> ) </td> |
---|
329 | <td> const<code> [inline, virtual]</code></td> |
---|
330 | </tr> |
---|
331 | </table> |
---|
332 | </div> |
---|
333 | <div class="memdoc"> |
---|
334 | |
---|
335 | <p> |
---|
336 | weight w is a |
---|
337 | <p> |
---|
338 | sample from merged density |
---|
339 | <p>Reimplemented from <a class="el" href="classbdm_1_1epdf.html#0c8d13d788094605b3cdab20a6e22b75">bdm::epdf</a>.</p> |
---|
340 | |
---|
341 | <p>References <a class="el" href="exp__family_8h-source.html#l01135">bdm::eEmp::_samples()</a>, <a class="el" href="exp__family_8h-source.html#l01131">bdm::eEmp::_w()</a>, <a class="el" href="bdmbase_8h-source.html#l00269">bdm::epdf::dim</a>, <a class="el" href="merger_8h-source.html#l00075">eSmp</a>, and <a class="el" href="merger_8h-source.html#l00059">Npoints</a>.</p> |
---|
342 | |
---|
343 | <p>Referenced by <a class="el" href="merger_8h-source.html#l00268">variance()</a>.</p> |
---|
344 | |
---|
345 | </div> |
---|
346 | </div><p> |
---|
347 | <hr>The documentation for this class was generated from the following files:<ul> |
---|
348 | <li><a class="el" href="merger_8h-source.html">merger.h</a><li>merger.cpp</ul> |
---|
349 | </div> |
---|
350 | <hr size="1"><address style="text-align: right;"><small>Generated on Sun Aug 16 17:58:19 2009 for mixpp by |
---|
351 | <a href="http://www.doxygen.org/index.html"> |
---|
352 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
353 | </body> |
---|
354 | </html> |
---|