root/library/doc/html/classbdm_1_1mDirich.html @ 651

Revision 651, 19.0 kB (checked in by mido, 15 years ago)

\doc directory cleaned a bit

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::mDirich 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.9 -->
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 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&nbsp;List</span></a></li>
61      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
62      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
63      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
64    </ul>
65  </div>
66  <div class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1mDirich.html">mDirich</a>
67  </div>
68</div>
69<div class="contents">
70<h1>bdm::mDirich Class Reference</h1><!-- doxytag: class="bdm::mDirich" --><!-- doxytag: inherits="mpdf_internal&lt; eDirich &gt;" --><code>#include &lt;<a class="el" href="exp__family_8h_source.html">exp_family.h</a>&gt;</code>
71<p>
72
73<p>
74<a href="classbdm_1_1mDirich-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
75<tr><td></td></tr>
76<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
77<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="78a06fc013ca7fc8dbc13ee899e3b0d0"></a><!-- doxytag: member="bdm::mDirich::condition" ref="78a06fc013ca7fc8dbc13ee899e3b0d0" args="(const vec &amp;val)" -->
78void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mDirich.html#78a06fc013ca7fc8dbc13ee899e3b0d0">condition</a> (const vec &amp;val)</td></tr>
79
80<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Update <code>iepdf</code> so that it represents this <a class="el" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling , where  is random variable, rv, and...">mpdf</a> conditioned on <code>rvc</code> = cond This function provides convenient reimplementation in offsprings. <br></td></tr>
81<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mDirich.html#c1e6f42277b97f700ea1b6045cb6b2d7">from_setting</a> (const Setting &amp;set)</td></tr>
82
83<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bd6dfd941c1cf5092b02d23f58d7bde4"></a><!-- doxytag: member="bdm::mDirich::validate" ref="bd6dfd941c1cf5092b02d23f58d7bde4" args="()" -->
84void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mDirich.html#bd6dfd941c1cf5092b02d23f58d7bde4">validate</a> ()</td></tr>
85
86<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method TODO. <br></td></tr>
87<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6b4d1cb8d7e230e313b4f0c905874d5a"></a><!-- doxytag: member="bdm::mDirich::e" ref="6b4d1cb8d7e230e313b4f0c905874d5a" args="()" -->
88<a class="el" href="classbdm_1_1eDirich.html">eDirich</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf__internal.html#6b4d1cb8d7e230e313b4f0c905874d5a">e</a> ()</td></tr>
89
90<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">access function to iepdf <br></td></tr>
91<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d8e547695d1cc19219b91164d825c930"></a><!-- doxytag: member="bdm::mDirich::samplecond" ref="d8e547695d1cc19219b91164d825c930" args="(const vec &amp;cond)" -->
92vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf__internal.html#d8e547695d1cc19219b91164d825c930">samplecond</a> (const vec &amp;cond)</td></tr>
93
94<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reimplements samplecond using <code>condition()</code>. <br></td></tr>
95<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="89076e62b8d7df7616bad68c94591948"></a><!-- doxytag: member="bdm::mDirich::evallogcond" ref="89076e62b8d7df7616bad68c94591948" args="(const vec &amp;val, const vec &amp;cond)" -->
96double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf__internal.html#89076e62b8d7df7616bad68c94591948">evallogcond</a> (const vec &amp;val, const vec &amp;cond)</td></tr>
97
98<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reimplements evallogcond using <code>condition()</code>. <br></td></tr>
99<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e28c214e3063733a6e4d17738941c61c"></a><!-- doxytag: member="bdm::mDirich::evallogcond_m" ref="e28c214e3063733a6e4d17738941c61c" args="(const mat &amp;Dt, const vec &amp;cond)" -->
100virtual vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf__internal.html#e28c214e3063733a6e4d17738941c61c">evallogcond_m</a> (const mat &amp;Dt, const vec &amp;cond)</td></tr>
101
102<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Efficient version of evallogcond for matrices. <br></td></tr>
103<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e82db07ce8af02f29cfd81e014edb3db"></a><!-- doxytag: member="bdm::mDirich::evallogcond_m" ref="e82db07ce8af02f29cfd81e014edb3db" args="(const Array&lt; vec &gt; &amp;Dt, const vec &amp;cond)" -->
104virtual vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf__internal.html#e82db07ce8af02f29cfd81e014edb3db">evallogcond_m</a> (const Array&lt; vec &gt; &amp;Dt, const vec &amp;cond)</td></tr>
105
106<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Efficient version of evallogcond for Array&lt;vec&gt;. <br></td></tr>
107<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9554c554054da2d22cb8e908ae9c8823"></a><!-- doxytag: member="bdm::mDirich::samplecond_m" ref="9554c554054da2d22cb8e908ae9c8823" args="(const vec &amp;cond, int N)" -->
108virtual mat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf__internal.html#9554c554054da2d22cb8e908ae9c8823">samplecond_m</a> (const vec &amp;cond, int N)</td></tr>
109
110<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Efficient version of samplecond. <br></td></tr>
111<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af0e6941ba5919cae1bc530e2181b109"></a><!-- doxytag: member="bdm::mDirich::to_string" ref="af0e6941ba5919cae1bc530e2181b109" args="()" -->
112virtual string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#af0e6941ba5919cae1bc530e2181b109">to_string</a> ()</td></tr>
113
114<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method returns a basic info about the current instance. <br></td></tr>
115<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="67d954d255ede776eade7334d4895790"></a><!-- doxytag: member="bdm::mDirich::to_setting" ref="67d954d255ede776eade7334d4895790" args="(Setting &amp;set) const " -->
116virtual 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>
117
118<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method save all the instance properties into the Setting structure. <br></td></tr>
119<tr><td colspan="2"><div class="groupHeader">Access to attributes</div></td></tr>
120<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="aa0095f80870f15209bca68a8a7bad8a"></a><!-- doxytag: member="bdm::mDirich::_rv" ref="aa0095f80870f15209bca68a8a7bad8a" args="() const " -->
121const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>_rv</b> () const </td></tr>
122
123<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="739d5202899bb56792a547c74e517a11"></a><!-- doxytag: member="bdm::mDirich::_rvc" ref="739d5202899bb56792a547c74e517a11" args="() const " -->
124const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>_rvc</b> () const </td></tr>
125
126<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="eea4a999ed9679181335927e9cb66d28"></a><!-- doxytag: member="bdm::mDirich::dimension" ref="eea4a999ed9679181335927e9cb66d28" args="() const " -->
127int&nbsp;</td><td class="memItemRight" valign="bottom"><b>dimension</b> () const </td></tr>
128
129<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="35e135910aed187b7290742f50e61bc8"></a><!-- doxytag: member="bdm::mDirich::dimensionc" ref="35e135910aed187b7290742f50e61bc8" args="()" -->
130int&nbsp;</td><td class="memItemRight" valign="bottom"><b>dimensionc</b> ()</td></tr>
131
132<tr><td colspan="2"><div class="groupHeader">Connection to other objects</div></td></tr>
133<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7631a5570e4ade1420065e8df78f4401"></a><!-- doxytag: member="bdm::mDirich::set_rvc" ref="7631a5570e4ade1420065e8df78f4401" args="(const RV &amp;rvc0)" -->
134void&nbsp;</td><td class="memItemRight" valign="bottom"><b>set_rvc</b> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;rvc0)</td></tr>
135
136<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="18ac26bc2f96ae01ef4eb06178abbd75"></a><!-- doxytag: member="bdm::mDirich::set_rv" ref="18ac26bc2f96ae01ef4eb06178abbd75" args="(const RV &amp;rv0)" -->
137void&nbsp;</td><td class="memItemRight" valign="bottom"><b>set_rv</b> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;rv0)</td></tr>
138
139<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f8e3798150b42fd1f3e16ddbbe0e7045"></a><!-- doxytag: member="bdm::mDirich::isnamed" ref="f8e3798150b42fd1f3e16ddbbe0e7045" args="()" -->
140bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>isnamed</b> ()</td></tr>
141
142<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
143<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="147afacb393324bb3f9a7a89e33f835e"></a><!-- doxytag: member="bdm::mDirich::set_ep" ref="147afacb393324bb3f9a7a89e33f835e" args="(epdf &amp;iepdf)" -->
144void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#147afacb393324bb3f9a7a89e33f835e">set_ep</a> (<a class="el" href="classbdm_1_1epdf.html">epdf</a> &amp;<a class="el" href="classbdm_1_1mpdf__internal.html#47bab632af15120c88aad647ae129468">iepdf</a>)</td></tr>
145
146<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">set internal pointer <code>ep</code> to point to given <code>iepdf</code> <br></td></tr>
147<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7555b377f8b5895c9b759c9628ee3e20"></a><!-- doxytag: member="bdm::mDirich::set_ep" ref="7555b377f8b5895c9b759c9628ee3e20" args="(epdf *iepdfp)" -->
148void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#7555b377f8b5895c9b759c9628ee3e20">set_ep</a> (<a class="el" href="classbdm_1_1epdf.html">epdf</a> *iepdfp)</td></tr>
149
150<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">set internal pointer <code>ep</code> to point to given <code>iepdf</code> <br></td></tr>
151<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
152<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cf9baed9baab754872ec59b9d45bf164"></a><!-- doxytag: member="bdm::mDirich::k" ref="cf9baed9baab754872ec59b9d45bf164" args="" -->
153double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mDirich.html#cf9baed9baab754872ec59b9d45bf164">k</a></td></tr>
154
155<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">constant <img class="formulaInl" alt="$ k $" src="form_89.png"> of the random walk <br></td></tr>
156<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="44230d127f95c6da1032e4e5886204ab"></a><!-- doxytag: member="bdm::mDirich::_beta" ref="44230d127f95c6da1032e4e5886204ab" args="" -->
157vec &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mDirich.html#44230d127f95c6da1032e4e5886204ab">_beta</a></td></tr>
158
159<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">cache of beta_i <br></td></tr>
160<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0c367b11fc853db86e9f00143e68013a"></a><!-- doxytag: member="bdm::mDirich::betac" ref="0c367b11fc853db86e9f00143e68013a" args="" -->
161vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mDirich.html#0c367b11fc853db86e9f00143e68013a">betac</a></td></tr>
162
163<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">stabilizing coefficient <img class="formulaInl" alt="$ \beta_c $" src="form_189.png"> <br></td></tr>
164<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="47bab632af15120c88aad647ae129468"></a><!-- doxytag: member="bdm::mDirich::iepdf" ref="47bab632af15120c88aad647ae129468" args="" -->
165<a class="el" href="classbdm_1_1eDirich.html">eDirich</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf__internal.html#47bab632af15120c88aad647ae129468">iepdf</a></td></tr>
166
167<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal epdf used for sampling. <br></td></tr>
168<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7c1900976ff13dbc09c9729b3bbff9e6"></a><!-- doxytag: member="bdm::mDirich::dimc" ref="7c1900976ff13dbc09c9729b3bbff9e6" args="" -->
169int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6">dimc</a></td></tr>
170
171<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">dimension of the condition <br></td></tr>
172<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5a5f08950daa08b85b01ddf4e1c36288"></a><!-- doxytag: member="bdm::mDirich::rvc" ref="5a5f08950daa08b85b01ddf4e1c36288" args="" -->
173<a class="el" href="classbdm_1_1RV.html">RV</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288">rvc</a></td></tr>
174
175<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">random variable in condition <br></td></tr>
176</table>
177<hr><a name="_details"></a><h2>Detailed Description</h2>
178Random Walk on Dirichlet Using simple assignment <p class="formulaDsp">
179<img class="formulaDsp" alt="\[ \beta = rvc / k + \beta_c \]" src="form_188.png">
180<p>
181 hence, mean value = rvc, variance = (k+1)*mean*mean;<p>
182The greater k is, the greater is the variance of the random walk;<p>
183<img class="formulaInl" alt="$ \beta_c $" src="form_189.png"> is used as regularizing element to avoid corner cases, i.e. when one element of rvc is zero. By default is it set to 0.1; <hr><h2>Member Function Documentation</h2>
184<a class="anchor" name="c1e6f42277b97f700ea1b6045cb6b2d7"></a><!-- doxytag: member="bdm::mDirich::from_setting" ref="c1e6f42277b97f700ea1b6045cb6b2d7" args="(const Setting &amp;set)" -->
185<div class="memitem">
186<div class="memproto">
187      <table class="memname">
188        <tr>
189          <td class="memname">void bdm::mDirich::from_setting           </td>
190          <td>(</td>
191          <td class="paramtype">const Setting &amp;&nbsp;</td>
192          <td class="paramname"> <em>set</em>          </td>
193          <td>&nbsp;)&nbsp;</td>
194          <td><code> [inline, virtual]</code></td>
195        </tr>
196      </table>
197</div>
198<div class="memdoc">
199
200<p>
201Create Dirichlet random walk <p class="formulaDsp">
202<img class="formulaDsp" alt="\[ f(rv|rvc) = Di(rvc*k) \]" src="form_190.png">
203<p>
204 from structure <div class="fragment"><pre class="fragment">                <span class="keyword">class </span>= 'mDirich';
205                <a class="code" href="classbdm_1_1mDirich.html#cf9baed9baab754872ec59b9d45bf164" title="constant  of the random walk">k</a> = 1;                      <span class="comment">// multiplicative constant k</span>
206                --- optional ---
207                rv = RV({<span class="stringliteral">'name'</span>},size)      <span class="comment">// description of RV</span>
208                beta0 = [];                 <span class="comment">// initial value of beta</span>
209                <a class="code" href="classbdm_1_1mDirich.html#0c367b11fc853db86e9f00143e68013a" title="stabilizing coefficient ">betac</a> = [];                 <span class="comment">// initial value of beta</span>
210</pre></div> 
211<p>Reimplemented from <a class="el" href="classbdm_1_1mpdf.html#30a0bceb948e287d497c578e371b1667">bdm::mpdf</a>.</p>
212
213<p>References <a class="el" href="exp__family_8h_source.html#l00363">_beta</a>, <a class="el" href="exp__family_8h_source.html#l00365">betac</a>, <a class="el" href="bdmbase_8h_source.html#l00235">bdm::RV::copy_t()</a>, <a class="el" href="user__info_8h_source.html#l00451">bdm::UI::get()</a>, <a class="el" href="exp__family_8h_source.html#l00361">k</a>, <a class="el" href="bdmbase_8h_source.html#l00461">bdm::mpdf::rvc</a>, and <a class="el" href="exp__family_8h_source.html#l00398">validate()</a>.</p>
214
215</div>
216</div><p>
217<hr>The documentation for this class was generated from the following file:<ul>
218<li><a class="el" href="exp__family_8h_source.html">exp_family.h</a></ul>
219</div>
220<hr size="1"><address style="text-align: right;"><small>Generated on Wed Oct 7 17:34:48 2009 for mixpp by&nbsp;
221<a href="http://www.doxygen.org/index.html">
222<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
223</body>
224</html>
Note: See TracBrowser for help on using the browser.