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

Revision 616, 34.7 kB (checked in by smidl, 15 years ago)

doc, sorted related pages

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>mixpp: bdm::merger_base Class Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="doxygen.css" rel="stylesheet" type="text/css"/>
8</head>
9<body>
10<!-- Generated by Doxygen 1.6.1 -->
11<script type="text/javascript">
12<!--
13function changeDisplayState (e){
14  var num=this.id.replace(/[^[0-9]/g,'');
15  var button=this.firstChild;
16  var sectionDiv=document.getElementById('dynsection'+num);
17  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
18    sectionDiv.style.display='block';
19    button.src='open.gif';
20  }else{
21    sectionDiv.style.display='none';
22    button.src='closed.gif';
23  }
24}
25function initDynSections(){
26  var divs=document.getElementsByTagName('div');
27  var sectionCounter=1;
28  for(var i=0;i<divs.length-1;i++){
29    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
30      var header=divs[i];
31      var section=divs[i+1];
32      var button=header.firstChild;
33      if (button!='IMG'){
34        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
35        button=document.createElement('img');
36        divs[i].insertBefore(button,divs[i].firstChild);
37      }
38      header.style.cursor='pointer';
39      header.onclick=changeDisplayState;
40      header.id='dynheader'+sectionCounter;
41      button.src='closed.gif';
42      section.id='dynsection'+sectionCounter;
43      section.style.display='none';
44      section.style.marginLeft='14px';
45      sectionCounter++;
46    }
47  }
48}
49window.onload = initDynSections;
50-->
51</script>
52<div class="navigation" id="top">
53  <div class="tabs">
54    <ul>
55      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
56      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
57      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
58      <li><a href="files.html"><span>Files</span></a></li>
59    </ul>
60  </div>
61  <div class="tabs">
62    <ul>
63      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
64      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
65      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
66      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
67    </ul>
68  </div>
69  <div class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1merger__base.html">merger_base</a>
70  </div>
71</div>
72<div class="contents">
73<h1>bdm::merger_base Class Reference</h1><!-- doxytag: class="bdm::merger_base" --><!-- doxytag: inherits="bdm::epdf" -->
74<p>Base class for general combination of pdfs on discrete support. 
75<a href="#_details">More...</a></p>
76<hr/><a name="_details"></a><h2>Detailed Description</h2>
77<p>Base class for general combination of pdfs on discrete support. </p>
78<p>Mixtures of Gaussian densities are used internally. Switching to other densities should be trivial.</p>
79<p>The merged pdfs are expected to be of the form: </p>
80<p class="formulaDsp">
81<img class="formulaDsp" alt="\[ f(x_i|y_i), i=1..n \]" src="form_108.png"/>
82</p>
83<p> where the resulting merger is a density on <img class="formulaInl" alt="$ \cup [x_i,y_i] $" src="form_109.png"/> . Note that all variables will be joined.</p>
84<p>As a result of this feature, each source must be extended to common support </p>
85<p class="formulaDsp">
86<img class="formulaDsp" alt="\[ f(z_i|y_i,x_i) f(x_i|y_i) f(y_i) i=1..n \]" src="form_110.png"/>
87</p>
88<p> where <img class="formulaInl" alt="$ z_i $" src="form_111.png"/> accumulate variables that were not in the original source. These extensions are calculated on-the-fly.</p>
89<p>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_112.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. </p>
90
91<p><code>#include &lt;<a class="el" href="merger_8h_source.html">merger.h</a>&gt;</code></p>
92
93<p><a href="classbdm_1_1merger__base-members.html">List of all members.</a></p>
94<table border="0" cellpadding="0" cellspacing="0">
95<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
96<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaf0e6941ba5919cae1bc530e2181b109"></a><!-- doxytag: member="bdm::merger_base::to_string" ref="aaf0e6941ba5919cae1bc530e2181b109" args="()" -->
97virtual string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#aaf0e6941ba5919cae1bc530e2181b109">to_string</a> ()</td></tr>
98<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method returns a basic info about the current instance. <br/></td></tr>
99<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a67d954d255ede776eade7334d4895790"></a><!-- doxytag: member="bdm::merger_base::to_setting" ref="a67d954d255ede776eade7334d4895790" args="(Setting &amp;set) const " -->
100virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#a67d954d255ede776eade7334d4895790">to_setting</a> (Setting &amp;set) const </td></tr>
101<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method save all the instance properties into the Setting structure. <br/></td></tr>
102<tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr>
103<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp559a25fdb98a7d1fd1c3771ac568d5e9"></a> </p>
104<br/><br/></div></td></tr>
105<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af9d8c6c26c6520dbb17d4e80f635e7be"></a><!-- doxytag: member="bdm::merger_base::merger_base" ref="af9d8c6c26c6520dbb17d4e80f635e7be" args="()" -->
106&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#af9d8c6c26c6520dbb17d4e80f635e7be">merger_base</a> ()</td></tr>
107<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor. <br/></td></tr>
108<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afdbaaaa1e7e090774dc49e45d5d80111"></a><!-- doxytag: member="bdm::merger_base::merger_base" ref="afdbaaaa1e7e090774dc49e45d5d80111" args="(const Array&lt; shared_ptr&lt; mpdf &gt; &gt; &amp;S)" -->
109&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#afdbaaaa1e7e090774dc49e45d5d80111">merger_base</a> (const Array&lt; <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>&lt; <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> &gt; &gt; &amp;S)</td></tr>
110<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor from sources. <br/></td></tr>
111<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a871add803409c5cc3a634b4ff8fa997f"></a><!-- doxytag: member="bdm::merger_base::set_sources" ref="a871add803409c5cc3a634b4ff8fa997f" args="(const Array&lt; shared_ptr&lt; mpdf &gt; &gt; &amp;Sources)" -->
112void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#a871add803409c5cc3a634b4ff8fa997f">set_sources</a> (const Array&lt; <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>&lt; <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> &gt; &gt; &amp;Sources)</td></tr>
113<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function setting the main internal structures. <br/></td></tr>
114<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa9f469f841bb8d9cb9f30b9e3b93d26f"></a><!-- doxytag: member="bdm::merger_base::set_support" ref="aa9f469f841bb8d9cb9f30b9e3b93d26f" args="(rectangular_support &amp;Sup)" -->
115void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#aa9f469f841bb8d9cb9f30b9e3b93d26f">set_support</a> (<a class="el" href="classbdm_1_1rectangular__support.html">rectangular_support</a> &amp;Sup)</td></tr>
116<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set support points from rectangular grid. <br/></td></tr>
117<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0165a2b0eaaebb7a38cfb352b6150cda"></a><!-- doxytag: member="bdm::merger_base::set_support" ref="a0165a2b0eaaebb7a38cfb352b6150cda" args="(discrete_support &amp;Sup)" -->
118void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#a0165a2b0eaaebb7a38cfb352b6150cda">set_support</a> (<a class="el" href="classbdm_1_1discrete__support.html">discrete_support</a> &amp;Sup)</td></tr>
119<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set support points from dicrete grid. <br/></td></tr>
120<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae4514484bac243585b0a1e44325e8add"></a><!-- doxytag: member="bdm::merger_base::set_debug_file" ref="ae4514484bac243585b0a1e44325e8add" args="(const string fname)" -->
121void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#ae4514484bac243585b0a1e44325e8add">set_debug_file</a> (const string fname)</td></tr>
122<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">set debug file <br/></td></tr>
123<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a86698b7fd1e4320e9830d7dc24ee6c9e"></a><!-- doxytag: member="bdm::merger_base::set_method" ref="a86698b7fd1e4320e9830d7dc24ee6c9e" args="(MERGER_METHOD MTH=DFLT_METHOD, double beta0=DFLT_beta)" -->
124void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#a86698b7fd1e4320e9830d7dc24ee6c9e">set_method</a> (MERGER_METHOD MTH=<a class="el" href="classbdm_1_1merger__base.html#a7acdf3aeded70475ba8a26450a4e197c">DFLT_METHOD</a>, double beta0=<a class="el" href="classbdm_1_1merger__base.html#adfe17e57529d84e122e61401543e9de6">DFLT_beta</a>)</td></tr>
125<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set internal parameters used in approximation. <br/></td></tr>
126<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a28af7b365ecd8c3a15f0e934496871e0"></a><!-- doxytag: member="bdm::merger_base::set_support" ref="a28af7b365ecd8c3a15f0e934496871e0" args="(const epdf &amp;overall, int N)" -->
127void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#a28af7b365ecd8c3a15f0e934496871e0">set_support</a> (const <a class="el" href="classbdm_1_1epdf.html">epdf</a> &amp;overall, int N)</td></tr>
128<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set support points from a pdf by drawing N samples. <br/></td></tr>
129<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a32d7e1dd6d91f77c81df7e82aac18689"></a><!-- doxytag: member="bdm::merger_base::~merger_base" ref="a32d7e1dd6d91f77c81df7e82aac18689" args="()" -->
130virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#a32d7e1dd6d91f77c81df7e82aac18689">~merger_base</a> ()</td></tr>
131<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <br/></td></tr>
132<tr><td colspan="2"><div class="groupHeader">Mathematical operations</div></td></tr>
133<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpfb3595af27ed8bd142c95323c0dab340"></a> </p>
134<br/><br/></div></td></tr>
135<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adf4a0094dcc40b3057675443bccb6511"></a><!-- doxytag: member="bdm::merger_base::merge" ref="adf4a0094dcc40b3057675443bccb6511" args="()" -->
136virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#adf4a0094dcc40b3057675443bccb6511">merge</a> ()</td></tr>
137<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Merge given sources in given points. <br/></td></tr>
138<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1f52bf47d2cdd23a95b19e3da902e431"></a><!-- doxytag: member="bdm::merger_base::merge_points" ref="a1f52bf47d2cdd23a95b19e3da902e431" args="(mat &amp;lW)" -->
139vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#a1f52bf47d2cdd23a95b19e3da902e431">merge_points</a> (mat &amp;lW)</td></tr>
140<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Merge log-likelihood values in points using method specified by parameter METHOD. <br/></td></tr>
141<tr><td class="memItemLeft" align="right" valign="top">vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#a021acbf1a6e3bfde2a1b9c1c73cea6e0">mean</a> () const </td></tr>
142<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">weight w is a  <a href="#a021acbf1a6e3bfde2a1b9c1c73cea6e0"></a><br/></td></tr>
143<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a41919c12fd6a07a8e00775c54ba4758a"></a><!-- doxytag: member="bdm::merger_base::covariance" ref="a41919c12fd6a07a8e00775c54ba4758a" args="() const " -->
144mat&nbsp;</td><td class="memItemRight" valign="bottom"><b>covariance</b> () const </td></tr>
145<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a76fe431922844d132b4e1ecf70f53c99"></a><!-- doxytag: member="bdm::merger_base::variance" ref="a76fe431922844d132b4e1ecf70f53c99" args="() const " -->
146vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#a76fe431922844d132b4e1ecf70f53c99">variance</a> () const </td></tr>
147<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return expected variance (not covariance!) <br/></td></tr>
148<tr><td colspan="2"><div class="groupHeader">Access to attributes</div></td></tr>
149<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpb6eb094f9e6af11f8a7d9efa9d8e3623"></a> </p>
150<br/><br/></div></td></tr>
151<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afb682e470103f4e0b353b7c9200d177f"></a><!-- doxytag: member="bdm::merger_base::_Smp" ref="afb682e470103f4e0b353b7c9200d177f" args="()" -->
152<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#afb682e470103f4e0b353b7c9200d177f">_Smp</a> ()</td></tr>
153<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Access function. <br/></td></tr>
154<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a10dd390fc6f0d1733bb07cb51977160c"></a><!-- doxytag: member="bdm::merger_base::from_setting" ref="a10dd390fc6f0d1733bb07cb51977160c" args="(const Setting &amp;set)" -->
155void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#a10dd390fc6f0d1733bb07cb51977160c">from_setting</a> (const Setting &amp;set)</td></tr>
156<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">load from setting <br/></td></tr>
157<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a400e222d4c41dc57ac19e6735429c4cb"></a><!-- doxytag: member="bdm::merger_base::validate" ref="a400e222d4c41dc57ac19e6735429c4cb" args="()" -->
158void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#a400e222d4c41dc57ac19e6735429c4cb">validate</a> ()</td></tr>
159<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method TODO. <br/></td></tr>
160<tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr>
161<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp559a25fdb98a7d1fd1c3771ac568d5e9"></a> 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: </p>
162<ul>
163<li>empty constructor, </li>
164<li>copy constructor,</li>
165</ul>
166<p>The following constructors should be supported for convenience: </p>
167<ul>
168<li>constructor followed by calling <code>set_parameters()</code> </li>
169<li>constructor accepting random variables calling <code><a class="el" href="classbdm_1_1epdf.html#af423e28448dbb69ef4905295ec8de8ff" title="Name its rv.">set_rv()</a></code> </li>
170</ul>
171<p>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. </p>
172<br/><br/></div></td></tr>
173<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a840de94aa33cf4f2ebd2427f45a165d8"></a><!-- doxytag: member="bdm::merger_base::set_parameters" ref="a840de94aa33cf4f2ebd2427f45a165d8" args="(int dim0)" -->
174void&nbsp;</td><td class="memItemRight" valign="bottom"><b>set_parameters</b> (int dim0)</td></tr>
175<tr><td colspan="2"><div class="groupHeader">Matematical Operations</div></td></tr>
176<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp96552c993870a5dd6bb0ea321f1ceb78"></a> </p>
177<br/><br/></div></td></tr>
178<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a75ba57a89681a8efec488f5796c7cc1b"></a><!-- doxytag: member="bdm::merger_base::sample" ref="a75ba57a89681a8efec488f5796c7cc1b" args="() const " -->
179virtual vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#a75ba57a89681a8efec488f5796c7cc1b">sample</a> () const </td></tr>
180<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a sample, <img class="formulaInl" alt="$ x $" src="form_3.png"/> from density <img class="formulaInl" alt="$ f_x()$" src="form_13.png"/>. <br/></td></tr>
181<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab4cf45fd83cc7573ede9fe1215256058"></a><!-- doxytag: member="bdm::merger_base::sample_m" ref="ab4cf45fd83cc7573ede9fe1215256058" args="(int N) const " -->
182virtual mat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#ab4cf45fd83cc7573ede9fe1215256058">sample_m</a> (int N) const </td></tr>
183<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns N samples, <img class="formulaInl" alt="$ [x_1 , x_2 , \ldots \ $" src="form_14.png"/> from density <img class="formulaInl" alt="$ f_x(rv)$" src="form_15.png"/>. <br/></td></tr>
184<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adeab266d63c236c277538867d5c3f249"></a><!-- doxytag: member="bdm::merger_base::evallog" ref="adeab266d63c236c277538867d5c3f249" args="(const vec &amp;val) const " -->
185virtual double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#adeab266d63c236c277538867d5c3f249">evallog</a> (const vec &amp;val) const </td></tr>
186<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compute log-probability of argument <code>val</code> In case the argument is out of suport return -Infinity. <br/></td></tr>
187<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad08b68a5abd461f1b6519597e344caf8"></a><!-- doxytag: member="bdm::merger_base::evallog_m" ref="ad08b68a5abd461f1b6519597e344caf8" args="(const mat &amp;Val) const " -->
188virtual vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#ad08b68a5abd461f1b6519597e344caf8">evallog_m</a> (const mat &amp;Val) const </td></tr>
189<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compute log-probability of multiple values argument <code>val</code>. <br/></td></tr>
190<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9bc02dae61584138443baf6b1cbc1ac9"></a><!-- doxytag: member="bdm::merger_base::evallog_m" ref="a9bc02dae61584138443baf6b1cbc1ac9" args="(const Array&lt; vec &gt; &amp;Avec) const " -->
191virtual vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#a9bc02dae61584138443baf6b1cbc1ac9">evallog_m</a> (const Array&lt; vec &gt; &amp;Avec) const </td></tr>
192<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compute log-probability of multiple values argument <code>val</code>. <br/></td></tr>
193<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1499d35b79bce0cfa64fc5cafb9c03b2"></a><!-- doxytag: member="bdm::merger_base::condition" ref="a1499d35b79bce0cfa64fc5cafb9c03b2" args="(const RV &amp;rv) const " -->
194virtual <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>&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_1epdf.html#a1499d35b79bce0cfa64fc5cafb9c03b2">condition</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;<a class="el" href="classbdm_1_1epdf.html#a62c5b8ff71d9ebe6cd58d3c342eb1dc8">rv</a>) const </td></tr>
195<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>
196<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa84b05f5293cab2aeb4e07faffa60906"></a><!-- doxytag: member="bdm::merger_base::marginal" ref="aa84b05f5293cab2aeb4e07faffa60906" args="(const RV &amp;rv) const " -->
197virtual <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>&lt; <a class="el" href="classbdm_1_1epdf.html">epdf</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#aa84b05f5293cab2aeb4e07faffa60906">marginal</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;<a class="el" href="classbdm_1_1epdf.html#a62c5b8ff71d9ebe6cd58d3c342eb1dc8">rv</a>) const </td></tr>
198<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>
199<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0a7705e80601957f7226d333a0a6d539"></a><!-- doxytag: member="bdm::merger_base::qbounds" ref="a0a7705e80601957f7226d333a0a6d539" args="(vec &amp;lb, vec &amp;ub, double percentage=0.95) const " -->
200virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#a0a7705e80601957f7226d333a0a6d539">qbounds</a> (vec &amp;lb, vec &amp;ub, double percentage=0.95) const </td></tr>
201<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>
202<tr><td colspan="2"><div class="groupHeader">Connection to other classes</div></td></tr>
203<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp14fc6e1cb822e9dfc5edc16c20fabe11"></a>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: </p>
204<br/><br/></div></td></tr>
205<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af423e28448dbb69ef4905295ec8de8ff"></a><!-- doxytag: member="bdm::merger_base::set_rv" ref="af423e28448dbb69ef4905295ec8de8ff" args="(const RV &amp;rv0)" -->
206void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#af423e28448dbb69ef4905295ec8de8ff">set_rv</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;rv0)</td></tr>
207<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Name its rv. <br/></td></tr>
208<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac4b863ff84c7a4882fb3ad18556027f9"></a><!-- doxytag: member="bdm::merger_base::isnamed" ref="ac4b863ff84c7a4882fb3ad18556027f9" args="() const " -->
209bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#ac4b863ff84c7a4882fb3ad18556027f9">isnamed</a> () const </td></tr>
210<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">True if rv is assigned. <br/></td></tr>
211<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa4ab378d5e004c3ff3e2d4e64f7bba21"></a><!-- doxytag: member="bdm::merger_base::_rv" ref="aa4ab378d5e004c3ff3e2d4e64f7bba21" args="() const " -->
212const <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#aa4ab378d5e004c3ff3e2d4e64f7bba21">_rv</a> () const </td></tr>
213<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return name (fails when isnamed is false). <br/></td></tr>
214<tr><td colspan="2"><div class="groupHeader">Access to attributes</div></td></tr>
215<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpb6eb094f9e6af11f8a7d9efa9d8e3623"></a> </p>
216<br/><br/></div></td></tr>
217<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7083a65f7b7a0d0d13b2c516bd2ec29c"></a><!-- doxytag: member="bdm::merger_base::dimension" ref="a7083a65f7b7a0d0d13b2c516bd2ec29c" args="() const " -->
218int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#a7083a65f7b7a0d0d13b2c516bd2ec29c">dimension</a> () const </td></tr>
219<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Size of the random variable. <br/></td></tr>
220<tr><td colspan="2"><h2>Protected Attributes</h2></td></tr>
221<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3127be48ba35960b943d31aa8b9abf88"></a><!-- doxytag: member="bdm::merger_base::mpdfs" ref="a3127be48ba35960b943d31aa8b9abf88" args="" -->
222Array&lt; <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>&lt; <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> &gt; &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#a3127be48ba35960b943d31aa8b9abf88">mpdfs</a></td></tr>
223<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Elements of composition. <br/></td></tr>
224<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a09bc4d43dec350a40d17953b8b59d3b7"></a><!-- doxytag: member="bdm::merger_base::dls" ref="a09bc4d43dec350a40d17953b8b59d3b7" args="" -->
225Array&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#a09bc4d43dec350a40d17953b8b59d3b7">dls</a></td></tr>
226<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 , where  is random variable, rv, and...">mpdf</a> in mpdfs. <br/></td></tr>
227<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4e66803b04fc04b21b3716b3a317421f"></a><!-- doxytag: member="bdm::merger_base::rvzs" ref="a4e66803b04fc04b21b3716b3a317421f" args="" -->
228Array&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#a4e66803b04fc04b21b3716b3a317421f">rvzs</a></td></tr>
229<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_111.png"/>. <br/></td></tr>
230<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8098858f2edb1294122cbe4f05bf8694"></a><!-- doxytag: member="bdm::merger_base::zdls" ref="a8098858f2edb1294122cbe4f05bf8694" args="" -->
231Array&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#a8098858f2edb1294122cbe4f05bf8694">zdls</a></td></tr>
232<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_113.png"/>. <br/></td></tr>
233<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a39d263d92aa85553730c44958a92a541"></a><!-- doxytag: member="bdm::merger_base::Npoints" ref="a39d263d92aa85553730c44958a92a541" args="" -->
234int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#a39d263d92aa85553730c44958a92a541">Npoints</a></td></tr>
235<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">number of support points <br/></td></tr>
236<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4f6cd7ebe1c3c7556039dbfeb00f71f5"></a><!-- doxytag: member="bdm::merger_base::Nsources" ref="a4f6cd7ebe1c3c7556039dbfeb00f71f5" args="" -->
237int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#a4f6cd7ebe1c3c7556039dbfeb00f71f5">Nsources</a></td></tr>
238<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">number of sources <br/></td></tr>
239<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aee197330820127f3d12106ddee6b25c7"></a><!-- doxytag: member="bdm::merger_base::METHOD" ref="aee197330820127f3d12106ddee6b25c7" args="" -->
240MERGER_METHOD&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#aee197330820127f3d12106ddee6b25c7">METHOD</a></td></tr>
241<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">switch of the methoh used for merging <br/></td></tr>
242<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a972f64f6f388b929cf94d2c478116f14"></a><!-- doxytag: member="bdm::merger_base::beta" ref="a972f64f6f388b929cf94d2c478116f14" args="" -->
243double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#a972f64f6f388b929cf94d2c478116f14">beta</a></td></tr>
244<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Prior on the log-normal merging model. <br/></td></tr>
245<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa042ce6ee1fb91048ea89bec9934718e"></a><!-- doxytag: member="bdm::merger_base::eSmp" ref="aa042ce6ee1fb91048ea89bec9934718e" args="" -->
246<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#aa042ce6ee1fb91048ea89bec9934718e">eSmp</a></td></tr>
247<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Projection to empirical density (could also be piece-wise linear). <br/></td></tr>
248<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="add180c651a75a131d125305f6bb017f7"></a><!-- doxytag: member="bdm::merger_base::DBG" ref="add180c651a75a131d125305f6bb017f7" args="" -->
249bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#add180c651a75a131d125305f6bb017f7">DBG</a></td></tr>
250<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">debug or not debug <br/></td></tr>
251<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab2c6278b996696cb711cb7be900ccf5b"></a><!-- doxytag: member="bdm::merger_base::dbg_file" ref="ab2c6278b996696cb711cb7be900ccf5b" args="" -->
252it_file *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#ab2c6278b996696cb711cb7be900ccf5b">dbg_file</a></td></tr>
253<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">debugging file <br/></td></tr>
254<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a16adac20ec7fe07e1ea0b27d917788ce"></a><!-- doxytag: member="bdm::merger_base::dim" ref="a16adac20ec7fe07e1ea0b27d917788ce" args="" -->
255int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#a16adac20ec7fe07e1ea0b27d917788ce">dim</a></td></tr>
256<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">dimension of the random variable <br/></td></tr>
257<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a62c5b8ff71d9ebe6cd58d3c342eb1dc8"></a><!-- doxytag: member="bdm::merger_base::rv" ref="a62c5b8ff71d9ebe6cd58d3c342eb1dc8" args="" -->
258<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#a62c5b8ff71d9ebe6cd58d3c342eb1dc8">rv</a></td></tr>
259<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Description of the random variable. <br/></td></tr>
260<tr><td colspan="2"><h2>Static Protected Attributes</h2></td></tr>
261<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7acdf3aeded70475ba8a26450a4e197c"></a><!-- doxytag: member="bdm::merger_base::DFLT_METHOD" ref="a7acdf3aeded70475ba8a26450a4e197c" args="" -->
262static const MERGER_METHOD&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#a7acdf3aeded70475ba8a26450a4e197c">DFLT_METHOD</a> = LOGNORMAL</td></tr>
263<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default for METHOD. <br/></td></tr>
264<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adfe17e57529d84e122e61401543e9de6"></a><!-- doxytag: member="bdm::merger_base::DFLT_beta" ref="adfe17e57529d84e122e61401543e9de6" args="" -->
265static const double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1merger__base.html#adfe17e57529d84e122e61401543e9de6">DFLT_beta</a> = 1.2</td></tr>
266<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">default for beta <br/></td></tr>
267</table>
268<hr/><h2>Member Function Documentation</h2>
269<a class="anchor" id="a021acbf1a6e3bfde2a1b9c1c73cea6e0"></a><!-- doxytag: member="bdm::merger_base::mean" ref="a021acbf1a6e3bfde2a1b9c1c73cea6e0" args="() const " -->
270<div class="memitem">
271<div class="memproto">
272      <table class="memname">
273        <tr>
274          <td class="memname">vec bdm::merger_base::mean </td>
275          <td>(</td>
276          <td class="paramname"></td>
277          <td>&nbsp;)&nbsp;</td>
278          <td> const<code> [inline, virtual]</code></td>
279        </tr>
280      </table>
281</div>
282<div class="memdoc">
283
284<p>weight w is a </p>
285<p>sample from merged density </p>
286
287<p>Reimplemented from <a class="el" href="classbdm_1_1epdf.html#a0c8d13d788094605b3cdab20a6e22b75">bdm::epdf</a>.</p>
288
289<p>References <a class="el" href="exp__family_8h_source.html#l01169">bdm::eEmp::_samples()</a>, <a class="el" href="exp__family_8h_source.html#l01165">bdm::eEmp::_w()</a>, <a class="el" href="bdmbase_8h_source.html#l00331">bdm::epdf::dim</a>, <a class="el" href="merger_8h_source.html#l00076">eSmp</a>, and <a class="el" href="merger_8h_source.html#l00060">Npoints</a>.</p>
290
291<p>Referenced by <a class="el" href="merger_8h_source.html#l00241">variance()</a>.</p>
292
293</div>
294</div>
295<hr/>The documentation for this class was generated from the following files:<ul>
296<li><a class="el" href="merger_8h_source.html">merger.h</a></li>
297<li>merger.cpp</li>
298</ul>
299</div>
300<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 13 23:08:56 2009 for mixpp by&nbsp;
301<a href="http://www.doxygen.org/index.html">
302<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
303</body>
304</html>
Note: See TracBrowser for help on using the browser.