root/library/doc/html/classbdm_1_1merger__base.html @ 406

Revision 401, 36.9 kB (checked in by smidl, 15 years ago)

doc

Line 
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<!--
10function 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}
22function 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}
46window.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&nbsp;Page</span></a></li>
53      <li><a href="pages.html"><span>Related&nbsp;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&nbsp;List</span></a></li>
62      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
63      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
64      <li><a href="functions.html"><span>Class&nbsp;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 &lt;<a class="el" href="merger_8h-source.html">merger.h</a>&gt;</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="1d4a1f50c9a4a33015af015cac1d724d"></a><!-- doxytag: member="bdm::merger_base::set_elements" ref="1d4a1f50c9a4a33015af015cac1d724d" args="(Array&lt; mpdf * &gt; A0, bool own=false)" -->
82void&nbsp;</td><td class="memItemRight" valign="bottom"><b>set_elements</b> (Array&lt; <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> * &gt; A0, bool own=false)</td></tr>
83
84<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classbdm_1_1RV.html">RV</a>&nbsp;</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">&nbsp;</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 &amp;rv, RV &amp;rvc)" -->
88void&nbsp;</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> &amp;<a class="el" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8">rv</a>, <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;rvc)</td></tr>
89
90<tr><td class="mdescLeft">&nbsp;</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="af0e6941ba5919cae1bc530e2181b109"></a><!-- doxytag: member="bdm::merger_base::to_string" ref="af0e6941ba5919cae1bc530e2181b109" args="()" -->
92virtual string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#af0e6941ba5919cae1bc530e2181b109">to_string</a> ()</td></tr>
93
94<tr><td class="mdescLeft">&nbsp;</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="67d954d255ede776eade7334d4895790"></a><!-- doxytag: member="bdm::merger_base::to_setting" ref="67d954d255ede776eade7334d4895790" args="(Setting &amp;set) const " -->
96virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#67d954d255ede776eade7334d4895790">to_setting</a> (Setting &amp;set) const </td></tr>
97
98<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method save all the instance properties into the Setting structure. <br></td></tr>
99<tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr>
100<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="()" -->
101&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#f9d8c6c26c6520dbb17d4e80f635e7be">merger_base</a> ()</td></tr>
102
103<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Empty constructor. <br></td></tr>
104<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9c81a9624506da8e557c56d1af845de0"></a><!-- doxytag: member="bdm::merger_base::merger_base" ref="9c81a9624506da8e557c56d1af845de0" args="(const Array&lt; mpdf * &gt; &amp;S, bool own=false)" -->
105&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#9c81a9624506da8e557c56d1af845de0">merger_base</a> (const Array&lt; <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> * &gt; &amp;S, bool own=false)</td></tr>
106
107<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor from sources. <br></td></tr>
108<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="591d4ba19c9ece40aa96ee44d05e148d"></a><!-- doxytag: member="bdm::merger_base::set_sources" ref="591d4ba19c9ece40aa96ee44d05e148d" args="(const Array&lt; mpdf * &gt; &amp;Sources, bool own)" -->
109void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#591d4ba19c9ece40aa96ee44d05e148d">set_sources</a> (const Array&lt; <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> * &gt; &amp;Sources, bool own)</td></tr>
110
111<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function setting the main internal structures. <br></td></tr>
112<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&lt; vec &gt; &amp;XYZ, const int dimsize)" -->
113void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#337e1e56ef95d3d3ee922e8b81be95f8">set_support</a> (const Array&lt; vec &gt; &amp;XYZ, const int dimsize)</td></tr>
114
115<tr><td class="mdescLeft">&nbsp;</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>
116<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&lt; vec &gt; &amp;XYZ, const ivec &amp;gridsize)" -->
117void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#3e2c8028be0ccd10058d030250a91a60">set_support</a> (const Array&lt; vec &gt; &amp;XYZ, const ivec &amp;gridsize)</td></tr>
118
119<tr><td class="mdescLeft">&nbsp;</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>
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)" -->
121void&nbsp;</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">&nbsp;</td><td class="mdescRight">set debug file <br></td></tr>
124<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)" -->
125void&nbsp;</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>
126
127<tr><td class="mdescLeft">&nbsp;</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="28af7b365ecd8c3a15f0e934496871e0"></a><!-- doxytag: member="bdm::merger_base::set_support" ref="28af7b365ecd8c3a15f0e934496871e0" args="(const epdf &amp;overall, int N)" -->
129void&nbsp;</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> &amp;overall, int N)</td></tr>
130
131<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set support points from a pdf by drawing N samples. <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="()" -->
133virtual&nbsp;</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">&nbsp;</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="df4a0094dcc40b3057675443bccb6511"></a><!-- doxytag: member="bdm::merger_base::merge" ref="df4a0094dcc40b3057675443bccb6511" args="()" -->
138virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#df4a0094dcc40b3057675443bccb6511">merge</a> ()</td></tr>
139
140<tr><td class="mdescLeft">&nbsp;</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 &amp;lW)" -->
142vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#1f52bf47d2cdd23a95b19e3da902e431">merge_points</a> (mat &amp;lW)</td></tr>
143
144<tr><td class="mdescLeft">&nbsp;</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&nbsp;</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">&nbsp;</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 " -->
149mat&nbsp;</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 " -->
152vec&nbsp;</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">&nbsp;</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> &amp;&nbsp;</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">&nbsp;</td><td class="mdescRight">Access function. <br></td></tr>
160<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 &amp;set)" -->
161void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#10dd390fc6f0d1733bb07cb51977160c">from_setting</a> (const Setting &amp;set)</td></tr>
162
163<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">load from setting <br></td></tr>
164<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="400e222d4c41dc57ac19e6735429c4cb"></a><!-- doxytag: member="bdm::merger_base::validate" ref="400e222d4c41dc57ac19e6735429c4cb" args="()" -->
165void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#400e222d4c41dc57ac19e6735429c4cb">validate</a> ()</td></tr>
166
167<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method TODO. <br></td></tr>
168<tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr>
169<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>
170<li>empty constructor, </li>
171<li>copy constructor,</li>
172</ul>
173The following constructors should be supported for convenience: <ul>
174<li>constructor followed by calling <code>set_parameters()</code> </li>
175<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>
176</ul>
177All 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>
178<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)" -->
179void&nbsp;</td><td class="memItemRight" valign="bottom"><b>set_parameters</b> (int dim0)</td></tr>
180
181<tr><td colspan="2"><div class="groupHeader">Matematical Operations</div></td></tr>
182<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 " -->
183virtual vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#75ba57a89681a8efec488f5796c7cc1b">sample</a> () const </td></tr>
184
185<tr><td class="mdescLeft">&nbsp;</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>
186<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 " -->
187virtual mat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#b4cf45fd83cc7573ede9fe1215256058">sample_m</a> (int N) const </td></tr>
188
189<tr><td class="mdescLeft">&nbsp;</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>
190<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 &amp;val) const " -->
191virtual double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#deab266d63c236c277538867d5c3f249">evallog</a> (const vec &amp;val) const </td></tr>
192
193<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compute log-probability of argument <code>val</code>. <br></td></tr>
194<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 &amp;Val) const " -->
195virtual vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#34956d4dd3176eeb5937cf48a1546b62">evallog_m</a> (const mat &amp;Val) const </td></tr>
196
197<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compute log-probability of multiple values argument <code>val</code>. <br></td></tr>
198<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="512dbf057299e871fbc61ed55acb5888"></a><!-- doxytag: member="bdm::merger_base::evallog_m" ref="512dbf057299e871fbc61ed55acb5888" args="(const Array&lt; vec &gt; &amp;Avec) const " -->
199virtual vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#512dbf057299e871fbc61ed55acb5888">evallog_m</a> (const Array&lt; vec &gt; &amp;Avec) const </td></tr>
200
201<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compute log-probability of multiple values argument <code>val</code>. <br></td></tr>
202<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 &amp;rv) const " -->
203virtual <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> *&nbsp;</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> &amp;<a class="el" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8">rv</a>) const </td></tr>
204
205<tr><td class="mdescLeft">&nbsp;</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>
206<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 &amp;rv) const " -->
207virtual <a class="el" href="classbdm_1_1epdf.html">epdf</a> *&nbsp;</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> &amp;<a class="el" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8">rv</a>) const </td></tr>
208
209<tr><td class="mdescLeft">&nbsp;</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>
210<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 &amp;lb, vec &amp;ub, double percentage=0.95) const " -->
211virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#0a7705e80601957f7226d333a0a6d539">qbounds</a> (vec &amp;lb, vec &amp;ub, double percentage=0.95) const </td></tr>
212
213<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Lower and upper bounds of <code>percentage</code> % quantile, returns mean-2*sigma as default. <br></td></tr>
214<tr><td colspan="2"><div class="groupHeader">Connection to other classes</div></td></tr>
215<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>
216<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 &amp;rv0)" -->
217void&nbsp;</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> &amp;rv0)</td></tr>
218
219<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Name its rv. <br></td></tr>
220<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 " -->
221bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#c4b863ff84c7a4882fb3ad18556027f9">isnamed</a> () const </td></tr>
222
223<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">True if rv is assigned. <br></td></tr>
224<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 " -->
225const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#a4ab378d5e004c3ff3e2d4e64f7bba21">_rv</a> () const </td></tr>
226
227<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return name (fails when isnamed is false). <br></td></tr>
228<tr><td colspan="2"><div class="groupHeader">Access to attributes</div></td></tr>
229<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 " -->
230int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#7083a65f7b7a0d0d13b2c516bd2ec29c">dimension</a> () const </td></tr>
231
232<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Size of the random variable. <br></td></tr>
233<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
234<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="09bc4d43dec350a40d17953b8b59d3b7"></a><!-- doxytag: member="bdm::merger_base::dls" ref="09bc4d43dec350a40d17953b8b59d3b7" args="" -->
235Array&lt; <a class="el" href="classbdm_1_1datalink__m2e.html">datalink_m2e</a> * &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#09bc4d43dec350a40d17953b8b59d3b7">dls</a></td></tr>
236
237<tr><td class="mdescLeft">&nbsp;</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>
238<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4e66803b04fc04b21b3716b3a317421f"></a><!-- doxytag: member="bdm::merger_base::rvzs" ref="4e66803b04fc04b21b3716b3a317421f" args="" -->
239Array&lt; <a class="el" href="classbdm_1_1RV.html">RV</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#4e66803b04fc04b21b3716b3a317421f">rvzs</a></td></tr>
240
241<tr><td class="mdescLeft">&nbsp;</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>
242<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8098858f2edb1294122cbe4f05bf8694"></a><!-- doxytag: member="bdm::merger_base::zdls" ref="8098858f2edb1294122cbe4f05bf8694" args="" -->
243Array&lt; <a class="el" href="classbdm_1_1datalink__m2e.html">datalink_m2e</a> * &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#8098858f2edb1294122cbe4f05bf8694">zdls</a></td></tr>
244
245<tr><td class="mdescLeft">&nbsp;</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>
246<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="39d263d92aa85553730c44958a92a541"></a><!-- doxytag: member="bdm::merger_base::Npoints" ref="39d263d92aa85553730c44958a92a541" args="" -->
247int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#39d263d92aa85553730c44958a92a541">Npoints</a></td></tr>
248
249<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">number of support points <br></td></tr>
250<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4f6cd7ebe1c3c7556039dbfeb00f71f5"></a><!-- doxytag: member="bdm::merger_base::Nsources" ref="4f6cd7ebe1c3c7556039dbfeb00f71f5" args="" -->
251int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#4f6cd7ebe1c3c7556039dbfeb00f71f5">Nsources</a></td></tr>
252
253<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">number of sources <br></td></tr>
254<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ee197330820127f3d12106ddee6b25c7"></a><!-- doxytag: member="bdm::merger_base::METHOD" ref="ee197330820127f3d12106ddee6b25c7" args="" -->
255MERGER_METHOD&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#ee197330820127f3d12106ddee6b25c7">METHOD</a></td></tr>
256
257<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">switch of the methoh used for merging <br></td></tr>
258<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="972f64f6f388b929cf94d2c478116f14"></a><!-- doxytag: member="bdm::merger_base::beta" ref="972f64f6f388b929cf94d2c478116f14" args="" -->
259double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#972f64f6f388b929cf94d2c478116f14">beta</a></td></tr>
260
261<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Prior on the log-normal merging model. <br></td></tr>
262<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a042ce6ee1fb91048ea89bec9934718e"></a><!-- doxytag: member="bdm::merger_base::eSmp" ref="a042ce6ee1fb91048ea89bec9934718e" args="" -->
263<a class="el" href="classbdm_1_1eEmp.html">eEmp</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#a042ce6ee1fb91048ea89bec9934718e">eSmp</a></td></tr>
264
265<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Projection to empirical density (could also be piece-wise linear). <br></td></tr>
266<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dd180c651a75a131d125305f6bb017f7"></a><!-- doxytag: member="bdm::merger_base::DBG" ref="dd180c651a75a131d125305f6bb017f7" args="" -->
267bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#dd180c651a75a131d125305f6bb017f7">DBG</a></td></tr>
268
269<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">debug or not debug <br></td></tr>
270<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="" -->
271it_file *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#b2c6278b996696cb711cb7be900ccf5b">dbg_file</a></td></tr>
272
273<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">debugging file <br></td></tr>
274<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="23faf2debc4dde10836393b8c665914a"></a><!-- doxytag: member="bdm::merger_base::mpdfs" ref="23faf2debc4dde10836393b8c665914a" args="" -->
275Array&lt; <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> * &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1compositepdf.html#23faf2debc4dde10836393b8c665914a">mpdfs</a></td></tr>
276
277<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Elements of composition. <br></td></tr>
278<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bd642a575896ca95d46caf2dc607961b"></a><!-- doxytag: member="bdm::merger_base::owning_mpdfs" ref="bd642a575896ca95d46caf2dc607961b" args="" -->
279bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>owning_mpdfs</b></td></tr>
280
281<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="16adac20ec7fe07e1ea0b27d917788ce"></a><!-- doxytag: member="bdm::merger_base::dim" ref="16adac20ec7fe07e1ea0b27d917788ce" args="" -->
282int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce">dim</a></td></tr>
283
284<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">dimension of the random variable <br></td></tr>
285<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="62c5b8ff71d9ebe6cd58d3c342eb1dc8"></a><!-- doxytag: member="bdm::merger_base::rv" ref="62c5b8ff71d9ebe6cd58d3c342eb1dc8" args="" -->
286<a class="el" href="classbdm_1_1RV.html">RV</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8">rv</a></td></tr>
287
288<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Description of the random variable. <br></td></tr>
289<tr><td colspan="2"><br><h2>Static Protected Attributes</h2></td></tr>
290<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="" -->
291static const MERGER_METHOD&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#7acdf3aeded70475ba8a26450a4e197c">DFLT_METHOD</a> = LOGNORMAL</td></tr>
292
293<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default for METHOD. <br></td></tr>
294<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="" -->
295static const double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#dfe17e57529d84e122e61401543e9de6">DFLT_beta</a> = 1.2</td></tr>
296
297<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">default for beta <br></td></tr>
298</table>
299<hr><a name="_details"></a><h2>Detailed Description</h2>
300Base class for general combination of pdfs on discrete support.
301<p>
302Mixtures of Gaussian densities are used internally. Switching to other densities should be trivial.<p>
303The merged pdfs are expected to be of the form: <p class="formulaDsp">
304<img class="formulaDsp" alt="\[ f(x_i|y_i), i=1..n \]" src="form_97.png">
305<p>
306 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>
307As a result of this feature, each source must be extended to common support <p class="formulaDsp">
308<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">
309<p>
310 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>
311However, 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 merger_mix and merger_grid. <hr><h2>Member Function Documentation</h2>
312<a class="anchor" name="c73d39acc4378eee6a63155c3517d3c9"></a><!-- doxytag: member="bdm::merger_base::getrv" ref="c73d39acc4378eee6a63155c3517d3c9" args="(bool checkoverlap=false)" -->
313<div class="memitem">
314<div class="memproto">
315      <table class="memname">
316        <tr>
317          <td class="memname"><a class="el" href="classbdm_1_1RV.html">RV</a> bdm::compositepdf::getrv           </td>
318          <td>(</td>
319          <td class="paramtype">bool&nbsp;</td>
320          <td class="paramname"> <em>checkoverlap</em> = <code>false</code>          </td>
321          <td>&nbsp;)&nbsp;</td>
322          <td><code> [inherited]</code></td>
323        </tr>
324      </table>
325</div>
326<div class="memdoc">
327
328<p>
329find common rv, flag
330<p>
331<dl compact><dt><b>Parameters:</b></dt><dd>
332  <table border="0" cellspacing="2" cellpadding="0">
333    <tr><td valign="top"></td><td valign="top"><em>checkoverlap</em>&nbsp;</td><td>modifies whether overlaps are acceptable </td></tr>
334  </table>
335</dl>
336
337<p>References <a class="el" href="bdmbase_8cpp-source.html#l00078">bdm::RV::add()</a>, and <a class="el" href="bdmbase_8h-source.html#l00639">bdm::compositepdf::mpdfs</a>.</p>
338
339<p>Referenced by <a class="el" href="merger_8h-source.html#l00086">set_sources()</a>.</p>
340
341</div>
342</div><p>
343<a class="anchor" name="021acbf1a6e3bfde2a1b9c1c73cea6e0"></a><!-- doxytag: member="bdm::merger_base::mean" ref="021acbf1a6e3bfde2a1b9c1c73cea6e0" args="() const " -->
344<div class="memitem">
345<div class="memproto">
346      <table class="memname">
347        <tr>
348          <td class="memname">vec bdm::merger_base::mean           </td>
349          <td>(</td>
350          <td class="paramname">          </td>
351          <td>&nbsp;)&nbsp;</td>
352          <td> const<code> [inline, virtual]</code></td>
353        </tr>
354      </table>
355</div>
356<div class="memdoc">
357
358<p>
359weight w is a
360<p>
361sample from merged density
362<p>Reimplemented from <a class="el" href="classbdm_1_1epdf.html#0c8d13d788094605b3cdab20a6e22b75">bdm::epdf</a>.</p>
363
364<p>References <a class="el" href="exp__family_8h-source.html#l01108">bdm::eEmp::_samples()</a>, <a class="el" href="exp__family_8h-source.html#l01104">bdm::eEmp::_w()</a>, <a class="el" href="bdmbase_8h-source.html#l00237">bdm::epdf::dim</a>, <a class="el" href="merger_8h-source.html#l00070">eSmp</a>, and <a class="el" href="merger_8h-source.html#l00055">Npoints</a>.</p>
365
366<p>Referenced by <a class="el" href="merger_8h-source.html#l00252">variance()</a>.</p>
367
368</div>
369</div><p>
370<hr>The documentation for this class was generated from the following files:<ul>
371<li><a class="el" href="merger_8h-source.html">merger.h</a><li>merger.cpp</ul>
372</div>
373<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jul 1 13:05:57 2009 for mixpp by&nbsp;
374<a href="http://www.doxygen.org/index.html">
375<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
376</body>
377</html>
Note: See TracBrowser for help on using the browser.