117 | | <a name="l00169"></a><a class="code" href="classmpdf.html#b0193a350c97933ddf15b15a130da352">00169</a> <span class="comment"></span> <span class="keyword">virtual</span> vec <a class="code" href="classmpdf.html#b0193a350c97933ddf15b15a130da352" title="Returns the required moment of the epdf.">samplecond</a> ( vec &cond, <span class="keywordtype">double</span> &ll ) {this-><a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a>(cond);vec temp= <a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-><a class="code" href="classepdf.html#8019654e494bf5e458f6fb947e11b262" title="Returns the required moment of the epdf.">sample</a>();ll=<a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-><a class="code" href="classepdf.html#6aef3eca74899692503769c18add1a4c" title="Compute log-probability of argument val.">evalpdflog</a>(temp);<span class="keywordflow">return</span> temp;}; |
118 | | <a name="l00171"></a><a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83">00171</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( <span class="keyword">const</span> vec &cond ) {}; |
119 | | <a name="l00172"></a>00172 |
120 | | <a name="l00174"></a><a class="code" href="classmpdf.html#80b738ece5bd4f8c4edaee4b38906f91">00174</a> <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classmpdf.html#80b738ece5bd4f8c4edaee4b38906f91" title="Shortcut for conditioning and evaluation of the internal epdf. In some cases, this...">evalcond</a> (<span class="keyword">const</span> vec &dt, <span class="keyword">const</span> vec &cond ) {this-><a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a>(cond);<span class="keywordflow">return</span> <a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-><a class="code" href="classepdf.html#3ea597362e11a0040fe7c990269d072c" title="Compute probability of argument val.">eval</a>(dt);}; |
121 | | <a name="l00175"></a>00175 |
122 | | <a name="l00177"></a><a class="code" href="classmpdf.html#6788be9f3a888796499c5293a318fcfb">00177</a> <span class="keyword">virtual</span> <a class="code" href="classmpdf.html#6788be9f3a888796499c5293a318fcfb" title="Destructor for future use;.">~mpdf</a>() {}; |
123 | | <a name="l00178"></a>00178 |
124 | | <a name="l00180"></a><a class="code" href="classmpdf.html#581ecf362185d37c08bb31cb9d046d6f">00180</a> <a class="code" href="classmpdf.html#581ecf362185d37c08bb31cb9d046d6f" title="Default constructor.">mpdf</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv0, <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rvc0 ) :<a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a> ( rv0 ),<a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a> ( rvc0 ) {}; |
125 | | <a name="l00182"></a><a class="code" href="classmpdf.html#ec9c850305984582548e8deb64f0ffe8">00182</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classmpdf.html#ec9c850305984582548e8deb64f0ffe8" title="access function">_rvc</a>(){<span class="keywordflow">return</span> <a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a>;} |
126 | | <a name="l00184"></a><a class="code" href="classmpdf.html#e17780ee5b2cfe05922a6c56af1462f8">00184</a> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>& <a class="code" href="classmpdf.html#e17780ee5b2cfe05922a6c56af1462f8" title="access function">_epdf</a>(){<span class="keywordflow">return</span> *<a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>;} |
127 | | <a name="l00185"></a>00185 }; |
128 | | <a name="l00186"></a>00186 |
129 | | <a name="l00194"></a><a class="code" href="classDS.html">00194</a> <span class="keyword">class </span><a class="code" href="classDS.html" title="Abstract class for discrete-time sources of data.">DS</a> { |
130 | | <a name="l00195"></a>00195 <span class="keyword">protected</span>: |
131 | | <a name="l00197"></a><a class="code" href="classDS.html#1012025a1a3a1fdd24aa48698a3d3454">00197</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classDS.html#1012025a1a3a1fdd24aa48698a3d3454" title="Observed variables, returned by getdata().">Drv</a>; |
132 | | <a name="l00199"></a><a class="code" href="classDS.html#0a88ffaeb3c7c2cf30c69bc41a000629">00199</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classDS.html#0a88ffaeb3c7c2cf30c69bc41a000629" title="Action variables, accepted by write().">Urv</a>; <span class="comment">//</span> |
133 | | <a name="l00200"></a>00200 <span class="keyword">public</span>: |
134 | | <a name="l00202"></a>00202 <span class="keywordtype">void</span> <a class="code" href="classDS.html#db2dacc9e71a36eeb9c5c2ee402eeeb1" title="Returns full vector of observed data.">getdata</a> ( vec &dt ); |
135 | | <a name="l00204"></a>00204 <span class="keywordtype">void</span> <a class="code" href="classDS.html#db2dacc9e71a36eeb9c5c2ee402eeeb1" title="Returns full vector of observed data.">getdata</a> ( vec &dt, ivec &indeces ); |
136 | | <a name="l00206"></a>00206 <span class="keywordtype">void</span> <a class="code" href="classDS.html#0dfb6788b70c0d48a1f5276ed6c93039" title="Accepts action variable and schedule it for application.">write</a> ( vec &ut ); |
137 | | <a name="l00208"></a>00208 <span class="keywordtype">void</span> <a class="code" href="classDS.html#0dfb6788b70c0d48a1f5276ed6c93039" title="Accepts action variable and schedule it for application.">write</a> ( vec &ut, ivec &indeces ); |
138 | | <a name="l00214"></a>00214 <span class="keywordtype">void</span> <a class="code" href="classDS.html#9a35ca9c9321dce2bf63bf668f785b75" title="Method that assigns random variables to the datasource. Typically, the datasource...">linkrvs</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &drv, <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &urv ); |
139 | | <a name="l00215"></a>00215 |
140 | | <a name="l00217"></a>00217 <span class="keywordtype">void</span> <a class="code" href="classDS.html#470ba89e8e7c3c4d830803221b4e9be6" title="Moves from to , i.e. perfroms the actions and reads response of the system.">step</a>(); |
141 | | <a name="l00218"></a>00218 |
142 | | <a name="l00219"></a>00219 }; |
143 | | <a name="l00220"></a>00220 |
144 | | <a name="l00225"></a><a class="code" href="classBM.html">00225</a> <span class="keyword">class </span><a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> { |
145 | | <a name="l00226"></a>00226 <span class="keyword">protected</span>: |
146 | | <a name="l00228"></a><a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88">00228</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>; |
147 | | <a name="l00230"></a><a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">00230</a> <span class="keywordtype">double</span> <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>; |
148 | | <a name="l00232"></a><a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">00232</a> <span class="keywordtype">bool</span> <a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>; |
149 | | <a name="l00233"></a>00233 <span class="keyword">public</span>: |
| 117 | <a name="l00169"></a><a class="code" href="classmpdf.html#b0193a350c97933ddf15b15a130da352">00169</a> <span class="comment"></span> <span class="keyword">virtual</span> vec <a class="code" href="classmpdf.html#b0193a350c97933ddf15b15a130da352" title="Returns the required moment of the epdf.">samplecond</a> ( vec &cond, <span class="keywordtype">double</span> &ll ) {this-><a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( cond ); |
| 118 | <a name="l00170"></a>00170 vec temp= <a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-><a class="code" href="classepdf.html#8019654e494bf5e458f6fb947e11b262" title="Returns the required moment of the epdf.">sample</a>(); |
| 119 | <a name="l00171"></a>00171 ll=<a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-><a class="code" href="classepdf.html#6aef3eca74899692503769c18add1a4c" title="Compute log-probability of argument val.">evalpdflog</a> ( temp );<span class="keywordflow">return</span> temp;}; |
| 120 | <a name="l00173"></a><a class="code" href="classmpdf.html#6bf806badfdac606c847e458e8fce18c">00173</a> <span class="keyword">virtual</span> mat <a class="code" href="classmpdf.html#b0193a350c97933ddf15b15a130da352" title="Returns the required moment of the epdf.">samplecond</a> ( vec &cond, vec &ll, <span class="keywordtype">int</span> N ) { |
| 121 | <a name="l00174"></a>00174 this-><a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( cond ); |
| 122 | <a name="l00175"></a>00175 mat temp ( <a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>(),N ); vec smp ( <a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>() ); |
| 123 | <a name="l00176"></a>00176 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i<N;i++ ) {smp=<a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-><a class="code" href="classepdf.html#8019654e494bf5e458f6fb947e11b262" title="Returns the required moment of the epdf.">sample</a>() ;temp.set_col ( i, smp );ll ( i ) =<a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-><a class="code" href="classepdf.html#6aef3eca74899692503769c18add1a4c" title="Compute log-probability of argument val.">evalpdflog</a> ( smp );} |
| 124 | <a name="l00177"></a>00177 <span class="keywordflow">return</span> temp; |
| 125 | <a name="l00178"></a>00178 }; |
| 126 | <a name="l00180"></a><a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83">00180</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( <span class="keyword">const</span> vec &cond ) {}; |
| 127 | <a name="l00181"></a>00181 |
| 128 | <a name="l00183"></a><a class="code" href="classmpdf.html#80b738ece5bd4f8c4edaee4b38906f91">00183</a> <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classmpdf.html#80b738ece5bd4f8c4edaee4b38906f91" title="Shortcut for conditioning and evaluation of the internal epdf. In some cases, this...">evalcond</a> ( <span class="keyword">const</span> vec &dt, <span class="keyword">const</span> vec &cond ) {this-><a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( cond );<span class="keywordflow">return</span> <a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-><a class="code" href="classepdf.html#3ea597362e11a0040fe7c990269d072c" title="Compute probability of argument val.">eval</a> ( dt );}; |
| 129 | <a name="l00184"></a>00184 |
| 130 | <a name="l00186"></a><a class="code" href="classmpdf.html#6788be9f3a888796499c5293a318fcfb">00186</a> <span class="keyword">virtual</span> <a class="code" href="classmpdf.html#6788be9f3a888796499c5293a318fcfb" title="Destructor for future use;.">~mpdf</a>() {}; |
| 131 | <a name="l00187"></a>00187 |
| 132 | <a name="l00189"></a><a class="code" href="classmpdf.html#581ecf362185d37c08bb31cb9d046d6f">00189</a> <a class="code" href="classmpdf.html#581ecf362185d37c08bb31cb9d046d6f" title="Default constructor.">mpdf</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv0, <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rvc0 ) :<a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a> ( rv0 ),<a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a> ( rvc0 ) {}; |
| 133 | <a name="l00191"></a><a class="code" href="classmpdf.html#ec9c850305984582548e8deb64f0ffe8">00191</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classmpdf.html#ec9c850305984582548e8deb64f0ffe8" title="access function">_rvc</a>() {<span class="keywordflow">return</span> <a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a>;} |
| 134 | <a name="l00193"></a><a class="code" href="classmpdf.html#e17780ee5b2cfe05922a6c56af1462f8">00193</a> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>& <a class="code" href="classmpdf.html#e17780ee5b2cfe05922a6c56af1462f8" title="access function">_epdf</a>() {<span class="keywordflow">return</span> *<a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>;} |
| 135 | <a name="l00194"></a>00194 }; |
| 136 | <a name="l00195"></a>00195 |
| 137 | <a name="l00200"></a><a class="code" href="classmepdf.html">00200</a> <span class="keyword">class </span><a class="code" href="classmepdf.html" title="Unconditional mpdf, allows using epdf in the role of mpdf.">mepdf</a> : <span class="keyword">public</span> <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> { |
| 138 | <a name="l00201"></a>00201 <span class="keyword">public</span>: |
| 139 | <a name="l00203"></a><a class="code" href="classmepdf.html#213e3a177540a0815aa7bdcc1bb25c6e">00203</a> <a class="code" href="classmepdf.html#213e3a177540a0815aa7bdcc1bb25c6e" title="Default constructor.">mepdf</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &<a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>, <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &<a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a>, <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* em ) :<a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> ( rv,rvc ) {<a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>=em;}; |
| 140 | <a name="l00204"></a>00204 }; |
| 141 | <a name="l00205"></a>00205 |
| 142 | <a name="l00213"></a><a class="code" href="classDS.html">00213</a> <span class="keyword">class </span><a class="code" href="classDS.html" title="Abstract class for discrete-time sources of data.">DS</a> { |
| 143 | <a name="l00214"></a>00214 <span class="keyword">protected</span>: |
| 144 | <a name="l00216"></a><a class="code" href="classDS.html#1012025a1a3a1fdd24aa48698a3d3454">00216</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classDS.html#1012025a1a3a1fdd24aa48698a3d3454" title="Observed variables, returned by getdata().">Drv</a>; |
| 145 | <a name="l00218"></a><a class="code" href="classDS.html#0a88ffaeb3c7c2cf30c69bc41a000629">00218</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classDS.html#0a88ffaeb3c7c2cf30c69bc41a000629" title="Action variables, accepted by write().">Urv</a>; <span class="comment">//</span> |
| 146 | <a name="l00219"></a>00219 <span class="keyword">public</span>: |
| 147 | <a name="l00221"></a>00221 <span class="keywordtype">void</span> <a class="code" href="classDS.html#db2dacc9e71a36eeb9c5c2ee402eeeb1" title="Returns full vector of observed data.">getdata</a> ( vec &dt ); |
| 148 | <a name="l00223"></a>00223 <span class="keywordtype">void</span> <a class="code" href="classDS.html#db2dacc9e71a36eeb9c5c2ee402eeeb1" title="Returns full vector of observed data.">getdata</a> ( vec &dt, ivec &indeces ); |
| 149 | <a name="l00225"></a>00225 <span class="keywordtype">void</span> <a class="code" href="classDS.html#0dfb6788b70c0d48a1f5276ed6c93039" title="Accepts action variable and schedule it for application.">write</a> ( vec &ut ); |
| 150 | <a name="l00227"></a>00227 <span class="keywordtype">void</span> <a class="code" href="classDS.html#0dfb6788b70c0d48a1f5276ed6c93039" title="Accepts action variable and schedule it for application.">write</a> ( vec &ut, ivec &indeces ); |
| 151 | <a name="l00233"></a>00233 <span class="keywordtype">void</span> <a class="code" href="classDS.html#9a35ca9c9321dce2bf63bf668f785b75" title="Method that assigns random variables to the datasource. Typically, the datasource...">linkrvs</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &drv, <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &urv ); |
151 | | <a name="l00236"></a><a class="code" href="classBM.html#605d28b426adb677c86a57ddb525132a">00236</a> <a class="code" href="classBM.html#605d28b426adb677c86a57ddb525132a" title="Default constructor.">BM</a>(<span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv0) :<a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>(rv0), <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a> ( 0 ),<a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a> ( true ) {<span class="comment">//Fixme: test rv </span> |
152 | | <a name="l00237"></a>00237 }; |
153 | | <a name="l00238"></a>00238 |
154 | | <a name="l00242"></a>00242 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf" title="Incremental Bayes rule.">bayes</a> ( <span class="keyword">const</span> vec &dt ) = 0; |
155 | | <a name="l00244"></a>00244 <span class="keywordtype">void</span> <a class="code" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf" title="Incremental Bayes rule.">bayes</a> ( mat Dt ); |
156 | | <a name="l00246"></a>00246 <span class="keyword">virtual</span> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>& <a class="code" href="classBM.html#3dc45554556926bde996a267636abe55" title="Returns a pointer to the epdf representing posterior density on parameters. Use with...">_epdf</a>()=0; |
157 | | <a name="l00247"></a>00247 |
158 | | <a name="l00249"></a><a class="code" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd">00249</a> <span class="keyword">virtual</span> <a class="code" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd" title="Destructor for future use;.">~BM</a>() {}; |
159 | | <a name="l00251"></a><a class="code" href="classBM.html#126bd2595c48e311fc2a7ab72876092a">00251</a> <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a>& <a class="code" href="classBM.html#126bd2595c48e311fc2a7ab72876092a" title="access function">_rv</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>;} |
160 | | <a name="l00253"></a><a class="code" href="classBM.html#87f4a547d2c29180be88175e5eab9c88">00253</a> <span class="keywordtype">double</span> <a class="code" href="classBM.html#87f4a547d2c29180be88175e5eab9c88" title="access function">_ll</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>;} |
161 | | <a name="l00254"></a>00254 }; |
162 | | <a name="l00255"></a>00255 |
163 | | <a name="l00265"></a><a class="code" href="classBMcond.html">00265</a> <span class="keyword">class </span><a class="code" href="classBMcond.html" title="Conditional Bayesian Filter.">BMcond</a> { |
164 | | <a name="l00266"></a>00266 <span class="keyword">protected</span>: |
165 | | <a name="l00268"></a><a class="code" href="classBMcond.html#9ba793c8ec453f04d372d17195ed8dec">00268</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classBMcond.html#9ba793c8ec453f04d372d17195ed8dec" title="Identificator of the conditioning variable.">rvc</a>; |
166 | | <a name="l00269"></a>00269 <span class="keyword">public</span>: |
167 | | <a name="l00271"></a>00271 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBMcond.html#3543cfe274c35f9033c24d8036a96c4d" title="Substitute val for rvc.">condition</a> ( <span class="keyword">const</span> vec &val ) =0; |
168 | | <a name="l00273"></a><a class="code" href="classBMcond.html#9a38dcdabef902fd91da3c9fb6ac27f7">00273</a> <a class="code" href="classBMcond.html#9a38dcdabef902fd91da3c9fb6ac27f7" title="Default constructor.">BMcond</a>(<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv0):<a class="code" href="classBMcond.html#9ba793c8ec453f04d372d17195ed8dec" title="Identificator of the conditioning variable.">rvc</a>(rv0){}; |
169 | | <a name="l00275"></a><a class="code" href="classBMcond.html#d40c72250cf93640f982d06de20815b2">00275</a> <span class="keyword">virtual</span> <a class="code" href="classBMcond.html#d40c72250cf93640f982d06de20815b2" title="Destructor for future use.">~BMcond</a>(){}; |
170 | | <a name="l00277"></a><a class="code" href="classBMcond.html#3fa60348b2da6b4208bb95b8d146900a">00277</a> <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a>& <a class="code" href="classBMcond.html#3fa60348b2da6b4208bb95b8d146900a" title="access function">_rvc</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classBMcond.html#9ba793c8ec453f04d372d17195ed8dec" title="Identificator of the conditioning variable.">rvc</a>;} |
171 | | <a name="l00278"></a>00278 }; |
172 | | <a name="l00279"></a>00279 |
173 | | <a name="l00280"></a>00280 <span class="preprocessor">#endif // BM_H</span> |
| 153 | <a name="l00236"></a>00236 <span class="keywordtype">void</span> <a class="code" href="classDS.html#470ba89e8e7c3c4d830803221b4e9be6" title="Moves from to , i.e. perfroms the actions and reads response of the system.">step</a>(); |
| 154 | <a name="l00237"></a>00237 |
| 155 | <a name="l00238"></a>00238 }; |
| 156 | <a name="l00239"></a>00239 |
| 157 | <a name="l00244"></a><a class="code" href="classBM.html">00244</a> <span class="keyword">class </span><a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> { |
| 158 | <a name="l00245"></a>00245 <span class="keyword">protected</span>: |
| 159 | <a name="l00247"></a><a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88">00247</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>; |
| 160 | <a name="l00249"></a><a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">00249</a> <span class="keywordtype">double</span> <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>; |
| 161 | <a name="l00251"></a><a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">00251</a> <span class="keywordtype">bool</span> <a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>; |
| 162 | <a name="l00252"></a>00252 <span class="keyword">public</span>: |
| 163 | <a name="l00253"></a>00253 |
| 164 | <a name="l00255"></a><a class="code" href="classBM.html#605d28b426adb677c86a57ddb525132a">00255</a> <a class="code" href="classBM.html#605d28b426adb677c86a57ddb525132a" title="Default constructor.">BM</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv0 ) :<a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a> ( rv0 ), <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a> ( 0 ),<a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a> ( true ) {<span class="comment">//Fixme: test rv</span> |
| 165 | <a name="l00256"></a>00256 }; |
| 166 | <a name="l00257"></a>00257 |
| 167 | <a name="l00261"></a>00261 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf" title="Incremental Bayes rule.">bayes</a> ( <span class="keyword">const</span> vec &dt ) = 0; |
| 168 | <a name="l00263"></a>00263 <span class="keywordtype">void</span> <a class="code" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf" title="Incremental Bayes rule.">bayes</a> ( mat Dt ); |
| 169 | <a name="l00265"></a>00265 <span class="keyword">virtual</span> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>& <a class="code" href="classBM.html#3dc45554556926bde996a267636abe55" title="Returns a pointer to the epdf representing posterior density on parameters. Use with...">_epdf</a>() =0; |
| 170 | <a name="l00266"></a>00266 |
| 171 | <a name="l00268"></a><a class="code" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd">00268</a> <span class="keyword">virtual</span> <a class="code" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd" title="Destructor for future use;.">~BM</a>() {}; |
| 172 | <a name="l00270"></a><a class="code" href="classBM.html#126bd2595c48e311fc2a7ab72876092a">00270</a> <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a>& <a class="code" href="classBM.html#126bd2595c48e311fc2a7ab72876092a" title="access function">_rv</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>;} |
| 173 | <a name="l00272"></a><a class="code" href="classBM.html#87f4a547d2c29180be88175e5eab9c88">00272</a> <span class="keywordtype">double</span> <a class="code" href="classBM.html#87f4a547d2c29180be88175e5eab9c88" title="access function">_ll</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>;} |
| 174 | <a name="l00273"></a>00273 }; |
| 175 | <a name="l00274"></a>00274 |
| 176 | <a name="l00284"></a><a class="code" href="classBMcond.html">00284</a> <span class="keyword">class </span><a class="code" href="classBMcond.html" title="Conditional Bayesian Filter.">BMcond</a> { |
| 177 | <a name="l00285"></a>00285 <span class="keyword">protected</span>: |
| 178 | <a name="l00287"></a><a class="code" href="classBMcond.html#9ba793c8ec453f04d372d17195ed8dec">00287</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classBMcond.html#9ba793c8ec453f04d372d17195ed8dec" title="Identificator of the conditioning variable.">rvc</a>; |
| 179 | <a name="l00288"></a>00288 <span class="keyword">public</span>: |
| 180 | <a name="l00290"></a>00290 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBMcond.html#3543cfe274c35f9033c24d8036a96c4d" title="Substitute val for rvc.">condition</a> ( <span class="keyword">const</span> vec &val ) =0; |
| 181 | <a name="l00292"></a><a class="code" href="classBMcond.html#9a38dcdabef902fd91da3c9fb6ac27f7">00292</a> <a class="code" href="classBMcond.html#9a38dcdabef902fd91da3c9fb6ac27f7" title="Default constructor.">BMcond</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv0 ) :<a class="code" href="classBMcond.html#9ba793c8ec453f04d372d17195ed8dec" title="Identificator of the conditioning variable.">rvc</a> ( rv0 ) {}; |
| 182 | <a name="l00294"></a><a class="code" href="classBMcond.html#d40c72250cf93640f982d06de20815b2">00294</a> <span class="keyword">virtual</span> <a class="code" href="classBMcond.html#d40c72250cf93640f982d06de20815b2" title="Destructor for future use.">~BMcond</a>() {}; |
| 183 | <a name="l00296"></a><a class="code" href="classBMcond.html#3fa60348b2da6b4208bb95b8d146900a">00296</a> <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a>& <a class="code" href="classBMcond.html#3fa60348b2da6b4208bb95b8d146900a" title="access function">_rvc</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classBMcond.html#9ba793c8ec453f04d372d17195ed8dec" title="Identificator of the conditioning variable.">rvc</a>;} |
| 184 | <a name="l00297"></a>00297 }; |
| 185 | <a name="l00298"></a>00298 |
| 186 | <a name="l00299"></a>00299 <span class="preprocessor">#endif // BM_H</span> |