Index: doc/html/libBM_8h-source.html
===================================================================
--- doc/html/libBM_8h-source.html (revision 280)
+++ doc/html/libBM_8h-source.html (revision 287)
@@ -112,7 +112,7 @@
 <a name="l00126"></a>00126         <span class="keywordtype">int</span> length()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1RV.html#b11bfdceb831ed30d33b852dd4a6b385" title="number of individual rvs">len</a>;} ;
 <a name="l00127"></a>00127         <span class="keywordtype">int</span> id ( <span class="keywordtype">int</span> at )<span class="keyword"> const</span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1RV.html#0a9a4769ab5a322495bea0cd8091500b" title="Vector of unique IDs.">ids</a> ( at );};
-<a name="l00128"></a>00128         <span class="keywordtype">int</span> size ( <span class="keywordtype">int</span> at )<span class="keyword"> const </span>{<span class="keywordflow">return</span> RV_SIZES ( <a class="code" href="classbdm_1_1RV.html#0a9a4769ab5a322495bea0cd8091500b" title="Vector of unique IDs.">ids</a>(at) );};
+<a name="l00128"></a>00128         <span class="keywordtype">int</span> size ( <span class="keywordtype">int</span> at )<span class="keyword"> const </span>{<span class="keywordflow">return</span> RV_SIZES ( <a class="code" href="classbdm_1_1RV.html#0a9a4769ab5a322495bea0cd8091500b" title="Vector of unique IDs.">ids</a> ( at ) );};
 <a name="l00129"></a>00129         <span class="keywordtype">int</span> time ( <span class="keywordtype">int</span> at )<span class="keyword"> const</span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1RV.html#ef6703854820bbf61736738f1bac6896" title="Vector of shifts from current time.">times</a> ( at );};
-<a name="l00130"></a>00130         std::string name ( <span class="keywordtype">int</span> at )<span class="keyword"> const </span>{<span class="keywordflow">return</span> RV_NAMES ( <a class="code" href="classbdm_1_1RV.html#0a9a4769ab5a322495bea0cd8091500b" title="Vector of unique IDs.">ids</a>(at) );};
+<a name="l00130"></a>00130         std::string name ( <span class="keywordtype">int</span> at )<span class="keyword"> const </span>{<span class="keywordflow">return</span> RV_NAMES ( <a class="code" href="classbdm_1_1RV.html#0a9a4769ab5a322495bea0cd8091500b" title="Vector of unique IDs.">ids</a> ( at ) );};
 <a name="l00131"></a>00131         <span class="keywordtype">void</span> set_time ( <span class="keywordtype">int</span> at, <span class="keywordtype">int</span> time0 ) {<a class="code" href="classbdm_1_1RV.html#ef6703854820bbf61736738f1bac6896" title="Vector of shifts from current time.">times</a> ( at ) =time0;};
 <a name="l00133"></a>00133 
@@ -161,5 +161,5 @@
 <a name="l00203"></a><a class="code" href="classbdm_1_1fnc.html#0786e40fade2663a70d654c1dda5d73e">00203</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1fnc.html#0786e40fade2663a70d654c1dda5d73e" title="function substitutes given value into an appropriate position">condition</a> ( <span class="keyword">const</span> vec &amp;val ) {};
 <a name="l00204"></a>00204 
-<a name="l00206"></a><a class="code" href="classbdm_1_1fnc.html#a2277a400fc9f4d6c0bf24dc7156183f">00206</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1fnc.html#a2277a400fc9f4d6c0bf24dc7156183f" title="access function">_dimy</a>()<span class="keyword"> const</span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1fnc.html#52156cb4a52a62d51fc7455985797a62" title="Length of the output vector.">dimy</a>;}
+<a name="l00206"></a><a class="code" href="classbdm_1_1fnc.html#083832294da9d1e40804158b979c4341">00206</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1fnc.html#083832294da9d1e40804158b979c4341" title="access function">dimension</a>()<span class="keyword"> const</span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1fnc.html#52156cb4a52a62d51fc7455985797a62" title="Length of the output vector.">dimy</a>;}
 <a name="l00207"></a>00207 };
 <a name="l00208"></a>00208 
@@ -191,257 +191,287 @@
 <a name="l00258"></a><a class="code" href="classbdm_1_1epdf.html#0c8d13d788094605b3cdab20a6e22b75">00258</a>         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1epdf.html#0c8d13d788094605b3cdab20a6e22b75" title="return expected value">mean</a>()<span class="keyword"> const </span>{it_error ( <span class="stringliteral">"not implemneted"</span> );<span class="keywordflow">return</span> vec ( 0 );};
 <a name="l00260"></a><a class="code" href="classbdm_1_1epdf.html#4543d40ccfc5d549b0c831a57a3ed84c">00260</a>         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1epdf.html#4543d40ccfc5d549b0c831a57a3ed84c" title="return expected variance (not covariance!)">variance</a>()<span class="keyword"> const </span>{it_error ( <span class="stringliteral">"not implemneted"</span> );<span class="keywordflow">return</span> vec ( 0 );};
-<a name="l00262"></a>00262 
-<a name="l00268"></a>00268 
-<a name="l00270"></a><a class="code" href="classbdm_1_1epdf.html#f423e28448dbb69ef4905295ec8de8ff">00270</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1epdf.html#f423e28448dbb69ef4905295ec8de8ff" title="Name its rv.">set_rv</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv0 ) {<a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Description of the random variable.">rv</a> = rv0; }<span class="comment">//it_assert_debug(isnamed(),""); };</span>
-<a name="l00272"></a><a class="code" href="classbdm_1_1epdf.html#c4b863ff84c7a4882fb3ad18556027f9">00272</a> <span class="comment"></span>        <span class="keywordtype">bool</span> <a class="code" href="classbdm_1_1epdf.html#c4b863ff84c7a4882fb3ad18556027f9" title="True if rv is assigned.">isnamed</a>()<span class="keyword"> const </span>{<span class="keywordtype">bool</span> b= ( <a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a>==<a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Description of the random variable.">rv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() );<span class="keywordflow">return</span> b;}
-<a name="l00274"></a><a class="code" href="classbdm_1_1epdf.html#a4ab378d5e004c3ff3e2d4e64f7bba21">00274</a>         <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>&amp; <a class="code" href="classbdm_1_1epdf.html#a4ab378d5e004c3ff3e2d4e64f7bba21" title="Return name (fails when isnamed is false).">_rv</a>()<span class="keyword"> const </span>{it_assert_debug ( <a class="code" href="classbdm_1_1epdf.html#c4b863ff84c7a4882fb3ad18556027f9" title="True if rv is assigned.">isnamed</a>(),<span class="stringliteral">""</span> ); <span class="keywordflow">return</span> <a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Description of the random variable.">rv</a>;}
-<a name="l00276"></a>00276 
-<a name="l00279"></a>00279 
-<a name="l00281"></a><a class="code" href="classbdm_1_1epdf.html#7083a65f7b7a0d0d13b2c516bd2ec29c">00281</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1epdf.html#7083a65f7b7a0d0d13b2c516bd2ec29c" title="Size of the random variable.">dimension</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a>;}
-<a name="l00283"></a>00283 
-<a name="l00284"></a>00284 };
-<a name="l00285"></a>00285 
-<a name="l00286"></a>00286 
-<a name="l00288"></a>00288 <span class="comment">//TODO Samplecond can be generalized</span>
-<a name="l00289"></a>00289 
-<a name="l00290"></a><a class="code" href="classbdm_1_1mpdf.html">00290</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a> {
-<a name="l00291"></a>00291 <span class="keyword">protected</span>:
-<a name="l00293"></a><a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6">00293</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6" title="dimension of the condition">dimc</a>;
-<a name="l00295"></a><a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288">00295</a>         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a>;
-<a name="l00297"></a><a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0">00297</a>         <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>;
-<a name="l00298"></a>00298 <span class="keyword">public</span>:
-<a name="l00301"></a>00301 
-<a name="l00302"></a>00302         <a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> ( ) :<a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6" title="dimension of the condition">dimc</a> ( 0 ),<a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a> ( ) {};
-<a name="l00304"></a><a class="code" href="classbdm_1_1mpdf.html#7089fcbd918f201fdf4256119e31f173">00304</a>         <a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &amp;m ) :<a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6" title="dimension of the condition">dimc</a> ( m.<a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6" title="dimension of the condition">dimc</a> ),<a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a> ( m.<a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a> ) {};
+<a name="l00262"></a><a class="code" href="classbdm_1_1epdf.html#0a7705e80601957f7226d333a0a6d539">00262</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1epdf.html#0a7705e80601957f7226d333a0a6d539" title="Lower and upper bounds of percentage % quantile, returns mean-2*sigma as default...">qbounds</a> ( vec &amp;lb, vec &amp;ub, <span class="keywordtype">double</span> percentage=0.95 )<span class="keyword"> const </span>{
+<a name="l00263"></a>00263                 vec mea=<a class="code" href="classbdm_1_1epdf.html#0c8d13d788094605b3cdab20a6e22b75" title="return expected value">mean</a>(); vec std=sqrt(<a class="code" href="classbdm_1_1epdf.html#4543d40ccfc5d549b0c831a57a3ed84c" title="return expected variance (not covariance!)">variance</a>()); 
+<a name="l00264"></a>00264                 lb = mea-2*std; ub=mea+2*std;
+<a name="l00265"></a>00265         };
+<a name="l00267"></a>00267 
+<a name="l00273"></a>00273 
+<a name="l00275"></a><a class="code" href="classbdm_1_1epdf.html#f423e28448dbb69ef4905295ec8de8ff">00275</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1epdf.html#f423e28448dbb69ef4905295ec8de8ff" title="Name its rv.">set_rv</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv0 ) {<a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Description of the random variable.">rv</a> = rv0; }<span class="comment">//it_assert_debug(isnamed(),""); };</span>
+<a name="l00277"></a><a class="code" href="classbdm_1_1epdf.html#c4b863ff84c7a4882fb3ad18556027f9">00277</a> <span class="comment"></span>        <span class="keywordtype">bool</span> <a class="code" href="classbdm_1_1epdf.html#c4b863ff84c7a4882fb3ad18556027f9" title="True if rv is assigned.">isnamed</a>()<span class="keyword"> const </span>{<span class="keywordtype">bool</span> b= ( <a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a>==<a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Description of the random variable.">rv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() );<span class="keywordflow">return</span> b;}
+<a name="l00279"></a><a class="code" href="classbdm_1_1epdf.html#a4ab378d5e004c3ff3e2d4e64f7bba21">00279</a>         <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>&amp; <a class="code" href="classbdm_1_1epdf.html#a4ab378d5e004c3ff3e2d4e64f7bba21" title="Return name (fails when isnamed is false).">_rv</a>()<span class="keyword"> const </span>{it_assert_debug ( <a class="code" href="classbdm_1_1epdf.html#c4b863ff84c7a4882fb3ad18556027f9" title="True if rv is assigned.">isnamed</a>(),<span class="stringliteral">""</span> ); <span class="keywordflow">return</span> <a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Description of the random variable.">rv</a>;}
+<a name="l00281"></a>00281 
+<a name="l00284"></a>00284 
+<a name="l00286"></a><a class="code" href="classbdm_1_1epdf.html#7083a65f7b7a0d0d13b2c516bd2ec29c">00286</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1epdf.html#7083a65f7b7a0d0d13b2c516bd2ec29c" title="Size of the random variable.">dimension</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a>;}
+<a name="l00288"></a>00288 
+<a name="l00289"></a>00289 };
+<a name="l00290"></a>00290 
+<a name="l00291"></a>00291 
+<a name="l00293"></a>00293 <span class="comment">//TODO Samplecond can be generalized</span>
+<a name="l00294"></a>00294 
+<a name="l00295"></a><a class="code" href="classbdm_1_1mpdf.html">00295</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a> {
+<a name="l00296"></a>00296 <span class="keyword">protected</span>:
+<a name="l00298"></a><a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6">00298</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6" title="dimension of the condition">dimc</a>;
+<a name="l00300"></a><a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288">00300</a>         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a>;
+<a name="l00302"></a><a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0">00302</a>         <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>;
+<a name="l00303"></a>00303 <span class="keyword">public</span>:
 <a name="l00306"></a>00306 
-<a name="l00309"></a>00309 
-<a name="l00311"></a><a class="code" href="classbdm_1_1mpdf.html#f0c1db6fcbb3aae2dd6123884457a367">00311</a>         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1mpdf.html#f0c1db6fcbb3aae2dd6123884457a367" title="Returns a sample from the density conditioned on cond, .">samplecond</a> ( <span class="keyword">const</span> vec &amp;cond ) {
-<a name="l00312"></a>00312                 this-&gt;<a class="code" href="classbdm_1_1mpdf.html#db94784a9aacf74c65c5a014f6743530" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( cond );
-<a name="l00313"></a>00313                 vec temp= <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classbdm_1_1epdf.html#75ba57a89681a8efec488f5796c7cc1b" title="Returns a sample,  from density .">sample</a>();
-<a name="l00314"></a>00314                 <span class="keywordflow">return</span> temp;
-<a name="l00315"></a>00315         };
-<a name="l00317"></a><a class="code" href="classbdm_1_1mpdf.html#afe4185b26baeb03688202e254d3b005">00317</a>         <span class="keyword">virtual</span> mat <a class="code" href="classbdm_1_1mpdf.html#afe4185b26baeb03688202e254d3b005" title="Returns.">samplecond_m</a> ( <span class="keyword">const</span> vec &amp;cond, <span class="keywordtype">int</span> N ) {
-<a name="l00318"></a>00318                 this-&gt;<a class="code" href="classbdm_1_1mpdf.html#db94784a9aacf74c65c5a014f6743530" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( cond );
-<a name="l00319"></a>00319                 mat temp ( <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classbdm_1_1epdf.html#7083a65f7b7a0d0d13b2c516bd2ec29c" title="Size of the random variable.">dimension</a>(),N ); vec smp ( <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classbdm_1_1epdf.html#7083a65f7b7a0d0d13b2c516bd2ec29c" title="Size of the random variable.">dimension</a>() );
-<a name="l00320"></a>00320                 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i&lt;N;i++ ) {smp=<a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classbdm_1_1epdf.html#75ba57a89681a8efec488f5796c7cc1b" title="Returns a sample,  from density .">sample</a>() ;temp.set_col ( i, smp );}
-<a name="l00321"></a>00321                 <span class="keywordflow">return</span> temp;
-<a name="l00322"></a>00322         };
-<a name="l00324"></a><a class="code" href="classbdm_1_1mpdf.html#db94784a9aacf74c65c5a014f6743530">00324</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1mpdf.html#db94784a9aacf74c65c5a014f6743530" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( <span class="keyword">const</span> vec &amp;cond ) {it_error ( <span class="stringliteral">"Not implemented"</span> );};
-<a name="l00325"></a>00325 
-<a name="l00327"></a><a class="code" href="classbdm_1_1mpdf.html#6336a8a72462e2a56a3989a220f18b1b">00327</a>         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1mpdf.html#6336a8a72462e2a56a3989a220f18b1b" title="Shortcut for conditioning and evaluation of the internal epdf. In some cases, this...">evallogcond</a> ( <span class="keyword">const</span> vec &amp;dt, <span class="keyword">const</span> vec &amp;cond ) {
-<a name="l00328"></a>00328                 <span class="keywordtype">double</span> tmp; this-&gt;<a class="code" href="classbdm_1_1mpdf.html#db94784a9aacf74c65c5a014f6743530" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( cond );tmp = <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classbdm_1_1epdf.html#deab266d63c236c277538867d5c3f249" title="Compute log-probability of argument val.">evallog</a> ( dt );          it_assert_debug ( std::isfinite ( tmp ),<span class="stringliteral">"Infinite value"</span> ); <span class="keywordflow">return</span> tmp;
-<a name="l00329"></a>00329         };
+<a name="l00307"></a>00307         <a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> ( ) :<a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6" title="dimension of the condition">dimc</a> ( 0 ),<a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a> ( ) {};
+<a name="l00309"></a><a class="code" href="classbdm_1_1mpdf.html#7089fcbd918f201fdf4256119e31f173">00309</a>         <a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &amp;m ) :<a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6" title="dimension of the condition">dimc</a> ( m.<a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6" title="dimension of the condition">dimc</a> ),<a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a> ( m.<a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a> ) {};
+<a name="l00311"></a>00311 
+<a name="l00314"></a>00314 
+<a name="l00316"></a><a class="code" href="classbdm_1_1mpdf.html#f0c1db6fcbb3aae2dd6123884457a367">00316</a>         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1mpdf.html#f0c1db6fcbb3aae2dd6123884457a367" title="Returns a sample from the density conditioned on cond, .">samplecond</a> ( <span class="keyword">const</span> vec &amp;cond ) {
+<a name="l00317"></a>00317                 this-&gt;<a class="code" href="classbdm_1_1mpdf.html#db94784a9aacf74c65c5a014f6743530" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( cond );
+<a name="l00318"></a>00318                 vec temp= <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classbdm_1_1epdf.html#75ba57a89681a8efec488f5796c7cc1b" title="Returns a sample,  from density .">sample</a>();
+<a name="l00319"></a>00319                 <span class="keywordflow">return</span> temp;
+<a name="l00320"></a>00320         };
+<a name="l00322"></a><a class="code" href="classbdm_1_1mpdf.html#afe4185b26baeb03688202e254d3b005">00322</a>         <span class="keyword">virtual</span> mat <a class="code" href="classbdm_1_1mpdf.html#afe4185b26baeb03688202e254d3b005" title="Returns.">samplecond_m</a> ( <span class="keyword">const</span> vec &amp;cond, <span class="keywordtype">int</span> N ) {
+<a name="l00323"></a>00323                 this-&gt;<a class="code" href="classbdm_1_1mpdf.html#db94784a9aacf74c65c5a014f6743530" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( cond );
+<a name="l00324"></a>00324                 mat temp ( <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classbdm_1_1epdf.html#7083a65f7b7a0d0d13b2c516bd2ec29c" title="Size of the random variable.">dimension</a>(),N ); vec smp ( <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classbdm_1_1epdf.html#7083a65f7b7a0d0d13b2c516bd2ec29c" title="Size of the random variable.">dimension</a>() );
+<a name="l00325"></a>00325                 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i&lt;N;i++ ) {smp=<a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classbdm_1_1epdf.html#75ba57a89681a8efec488f5796c7cc1b" title="Returns a sample,  from density .">sample</a>() ;temp.set_col ( i, smp );}
+<a name="l00326"></a>00326                 <span class="keywordflow">return</span> temp;
+<a name="l00327"></a>00327         };
+<a name="l00329"></a><a class="code" href="classbdm_1_1mpdf.html#db94784a9aacf74c65c5a014f6743530">00329</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1mpdf.html#db94784a9aacf74c65c5a014f6743530" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( <span class="keyword">const</span> vec &amp;cond ) {it_error ( <span class="stringliteral">"Not implemented"</span> );};
 <a name="l00330"></a>00330 
-<a name="l00332"></a><a class="code" href="classbdm_1_1mpdf.html#0b0ed1ed663071bb7cf4a1349eb94fcb">00332</a>         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1mpdf.html#0b0ed1ed663071bb7cf4a1349eb94fcb" title="Matrix version of evallogcond.">evallogcond_m</a> ( <span class="keyword">const</span> mat &amp;Dt, <span class="keyword">const</span> vec &amp;cond ) {this-&gt;<a class="code" href="classbdm_1_1mpdf.html#db94784a9aacf74c65c5a014f6743530" 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="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classbdm_1_1epdf.html#34956d4dd3176eeb5937cf48a1546b62" title="Compute log-probability of multiple values argument val.">evallog_m</a> ( Dt );};
-<a name="l00333"></a>00333 
-<a name="l00336"></a>00336 
-<a name="l00337"></a>00337         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> _rv() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classbdm_1_1epdf.html#a4ab378d5e004c3ff3e2d4e64f7bba21" title="Return name (fails when isnamed is false).">_rv</a>();}
-<a name="l00338"></a>00338         RV _rvc() {it_assert_debug ( isnamed(),<span class="stringliteral">""</span> ); <span class="keywordflow">return</span> <a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a>;}
-<a name="l00339"></a>00339         <span class="keywordtype">int</span> dimension() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;dimension();}
-<a name="l00340"></a>00340         <span class="keywordtype">int</span> dimensionc() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6" title="dimension of the condition">dimc</a>;}
-<a name="l00341"></a>00341         epdf&amp; _epdf() {<span class="keywordflow">return</span> *<a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>;}
-<a name="l00342"></a>00342         epdf* _e() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>;}
-<a name="l00344"></a>00344 
-<a name="l00347"></a>00347         <span class="keywordtype">void</span> set_rvc ( <span class="keyword">const</span> RV &amp;rvc0 ) {<a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a>=rvc0;}
-<a name="l00348"></a>00348         <span class="keywordtype">void</span> set_rv ( <span class="keyword">const</span> RV &amp;rv0 ) {<a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;set_rv ( rv0 );}
-<a name="l00349"></a>00349         <span class="keywordtype">bool</span> isnamed() {<span class="keywordflow">return</span> ( <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;isnamed() ) &amp;&amp; ( <a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6" title="dimension of the condition">dimc</a>==<a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a>._dsize() );}
-<a name="l00351"></a>00351 };
-<a name="l00352"></a>00352 
-<a name="l00378"></a><a class="code" href="classbdm_1_1datalink.html">00378</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1datalink.html" title="DataLink is a connection between two data vectors Up and Down.">datalink</a> {
-<a name="l00379"></a>00379 <span class="keyword">protected</span>:
-<a name="l00381"></a><a class="code" href="classbdm_1_1datalink.html#bc8ff50395fc1066a1e486dea18d987c">00381</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1datalink.html#bc8ff50395fc1066a1e486dea18d987c" title="Remember how long val should be.">downsize</a>;
-<a name="l00383"></a><a class="code" href="classbdm_1_1datalink.html#0f0d0af6848114d96108d3a6af25a045">00383</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1datalink.html#0f0d0af6848114d96108d3a6af25a045" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">upsize</a>;
-<a name="l00385"></a><a class="code" href="classbdm_1_1datalink.html#240b37d793c6bdc32824ed0a0541b1eb">00385</a>         ivec <a class="code" href="classbdm_1_1datalink.html#240b37d793c6bdc32824ed0a0541b1eb" title="val-to-val link, indeces of the upper val">v2v_up</a>;
-<a name="l00386"></a>00386 <span class="keyword">public</span>:
-<a name="l00388"></a><a class="code" href="classbdm_1_1datalink.html#b8b5d5074fc1310a37c3713d58b900e2">00388</a>         <a class="code" href="classbdm_1_1datalink.html#b8b5d5074fc1310a37c3713d58b900e2" title="Constructor.">datalink</a> () {};
-<a name="l00389"></a>00389         <a class="code" href="classbdm_1_1datalink.html#b8b5d5074fc1310a37c3713d58b900e2" title="Constructor.">datalink</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv_up ) {<a class="code" href="classbdm_1_1datalink.html#fb8337aac8329eb0ca96bfb3ff73ec67" title="set connection, rv must be fully present in rv_up">set_connection</a> ( rv,rv_up );};
-<a name="l00391"></a><a class="code" href="classbdm_1_1datalink.html#fb8337aac8329eb0ca96bfb3ff73ec67">00391</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1datalink.html#fb8337aac8329eb0ca96bfb3ff73ec67" title="set connection, rv must be fully present in rv_up">set_connection</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv_up ) {
-<a name="l00392"></a>00392                 <a class="code" href="classbdm_1_1datalink.html#bc8ff50395fc1066a1e486dea18d987c" title="Remember how long val should be.">downsize</a> = rv.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>();
-<a name="l00393"></a>00393                 <a class="code" href="classbdm_1_1datalink.html#0f0d0af6848114d96108d3a6af25a045" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">upsize</a> = rv_up.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>();
-<a name="l00394"></a>00394                 <a class="code" href="classbdm_1_1datalink.html#240b37d793c6bdc32824ed0a0541b1eb" title="val-to-val link, indeces of the upper val">v2v_up</a>= ( rv.<a class="code" href="classbdm_1_1RV.html#cbebdb5e0d30101a6eb63550ef701c55">dataind</a> ( rv_up ) );
-<a name="l00395"></a>00395 
-<a name="l00396"></a>00396                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink.html#240b37d793c6bdc32824ed0a0541b1eb" title="val-to-val link, indeces of the upper val">v2v_up</a>.length() ==<a class="code" href="classbdm_1_1datalink.html#bc8ff50395fc1066a1e486dea18d987c" title="Remember how long val should be.">downsize</a>,<span class="stringliteral">"rv is not fully in rv_up"</span> );
-<a name="l00397"></a>00397         }
-<a name="l00399"></a><a class="code" href="classbdm_1_1datalink.html#5b5368c3899eed2f670d09142c2548e5">00399</a>         vec <a class="code" href="classbdm_1_1datalink.html#5b5368c3899eed2f670d09142c2548e5" title="Get val for myself from val of &amp;quot;Up&amp;quot;.">pushdown</a> ( <span class="keyword">const</span> vec &amp;val_up ) {
-<a name="l00400"></a>00400                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink.html#0f0d0af6848114d96108d3a6af25a045" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">upsize</a>==val_up.length(),<span class="stringliteral">"Wrong val_up"</span> );
-<a name="l00401"></a>00401                 <span class="keywordflow">return</span> get_vec ( val_up,<a class="code" href="classbdm_1_1datalink.html#240b37d793c6bdc32824ed0a0541b1eb" title="val-to-val link, indeces of the upper val">v2v_up</a> );
+<a name="l00332"></a><a class="code" href="classbdm_1_1mpdf.html#6336a8a72462e2a56a3989a220f18b1b">00332</a>         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1mpdf.html#6336a8a72462e2a56a3989a220f18b1b" title="Shortcut for conditioning and evaluation of the internal epdf. In some cases, this...">evallogcond</a> ( <span class="keyword">const</span> vec &amp;dt, <span class="keyword">const</span> vec &amp;cond ) {
+<a name="l00333"></a>00333                 <span class="keywordtype">double</span> tmp; this-&gt;<a class="code" href="classbdm_1_1mpdf.html#db94784a9aacf74c65c5a014f6743530" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( cond );tmp = <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classbdm_1_1epdf.html#deab266d63c236c277538867d5c3f249" title="Compute log-probability of argument val.">evallog</a> ( dt );          it_assert_debug ( std::isfinite ( tmp ),<span class="stringliteral">"Infinite value"</span> ); <span class="keywordflow">return</span> tmp;
+<a name="l00334"></a>00334         };
+<a name="l00335"></a>00335 
+<a name="l00337"></a><a class="code" href="classbdm_1_1mpdf.html#0b0ed1ed663071bb7cf4a1349eb94fcb">00337</a>         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1mpdf.html#0b0ed1ed663071bb7cf4a1349eb94fcb" title="Matrix version of evallogcond.">evallogcond_m</a> ( <span class="keyword">const</span> mat &amp;Dt, <span class="keyword">const</span> vec &amp;cond ) {this-&gt;<a class="code" href="classbdm_1_1mpdf.html#db94784a9aacf74c65c5a014f6743530" 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="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classbdm_1_1epdf.html#34956d4dd3176eeb5937cf48a1546b62" title="Compute log-probability of multiple values argument val.">evallog_m</a> ( Dt );};
+<a name="l00338"></a>00338 
+<a name="l00341"></a>00341 
+<a name="l00342"></a>00342         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> _rv() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classbdm_1_1epdf.html#a4ab378d5e004c3ff3e2d4e64f7bba21" title="Return name (fails when isnamed is false).">_rv</a>();}
+<a name="l00343"></a>00343         RV _rvc() {it_assert_debug ( isnamed(),<span class="stringliteral">""</span> ); <span class="keywordflow">return</span> <a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a>;}
+<a name="l00344"></a>00344         <span class="keywordtype">int</span> dimension() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;dimension();}
+<a name="l00345"></a>00345         <span class="keywordtype">int</span> dimensionc() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6" title="dimension of the condition">dimc</a>;}
+<a name="l00346"></a>00346         epdf&amp; _epdf() {<span class="keywordflow">return</span> *<a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>;}
+<a name="l00347"></a>00347         epdf* _e() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>;}
+<a name="l00349"></a>00349 
+<a name="l00352"></a>00352         <span class="keywordtype">void</span> set_rvc ( <span class="keyword">const</span> RV &amp;rvc0 ) {<a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a>=rvc0;}
+<a name="l00353"></a>00353         <span class="keywordtype">void</span> set_rv ( <span class="keyword">const</span> RV &amp;rv0 ) {<a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;set_rv ( rv0 );}
+<a name="l00354"></a>00354         <span class="keywordtype">bool</span> isnamed() {<span class="keywordflow">return</span> ( <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>-&gt;isnamed() ) &amp;&amp; ( <a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6" title="dimension of the condition">dimc</a>==<a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a>._dsize() );}
+<a name="l00356"></a>00356 };
+<a name="l00357"></a>00357 
+<a name="l00383"></a><a class="code" href="classbdm_1_1datalink.html">00383</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1datalink.html" title="DataLink is a connection between two data vectors Up and Down.">datalink</a> {
+<a name="l00384"></a>00384 <span class="keyword">protected</span>:
+<a name="l00386"></a><a class="code" href="classbdm_1_1datalink.html#bc8ff50395fc1066a1e486dea18d987c">00386</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1datalink.html#bc8ff50395fc1066a1e486dea18d987c" title="Remember how long val should be.">downsize</a>;
+<a name="l00388"></a><a class="code" href="classbdm_1_1datalink.html#0f0d0af6848114d96108d3a6af25a045">00388</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1datalink.html#0f0d0af6848114d96108d3a6af25a045" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">upsize</a>;
+<a name="l00390"></a><a class="code" href="classbdm_1_1datalink.html#240b37d793c6bdc32824ed0a0541b1eb">00390</a>         ivec <a class="code" href="classbdm_1_1datalink.html#240b37d793c6bdc32824ed0a0541b1eb" title="val-to-val link, indeces of the upper val">v2v_up</a>;
+<a name="l00391"></a>00391 <span class="keyword">public</span>:
+<a name="l00393"></a><a class="code" href="classbdm_1_1datalink.html#b8b5d5074fc1310a37c3713d58b900e2">00393</a>         <a class="code" href="classbdm_1_1datalink.html#b8b5d5074fc1310a37c3713d58b900e2" title="Constructor.">datalink</a> () {};
+<a name="l00394"></a>00394         <a class="code" href="classbdm_1_1datalink.html#b8b5d5074fc1310a37c3713d58b900e2" title="Constructor.">datalink</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv_up ) {<a class="code" href="classbdm_1_1datalink.html#fb8337aac8329eb0ca96bfb3ff73ec67" title="set connection, rv must be fully present in rv_up">set_connection</a> ( rv,rv_up );};
+<a name="l00396"></a><a class="code" href="classbdm_1_1datalink.html#fb8337aac8329eb0ca96bfb3ff73ec67">00396</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1datalink.html#fb8337aac8329eb0ca96bfb3ff73ec67" title="set connection, rv must be fully present in rv_up">set_connection</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv_up ) {
+<a name="l00397"></a>00397                 <a class="code" href="classbdm_1_1datalink.html#bc8ff50395fc1066a1e486dea18d987c" title="Remember how long val should be.">downsize</a> = rv.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>();
+<a name="l00398"></a>00398                 <a class="code" href="classbdm_1_1datalink.html#0f0d0af6848114d96108d3a6af25a045" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">upsize</a> = rv_up.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>();
+<a name="l00399"></a>00399                 <a class="code" href="classbdm_1_1datalink.html#240b37d793c6bdc32824ed0a0541b1eb" title="val-to-val link, indeces of the upper val">v2v_up</a>= ( rv.<a class="code" href="classbdm_1_1RV.html#cbebdb5e0d30101a6eb63550ef701c55">dataind</a> ( rv_up ) );
+<a name="l00400"></a>00400 
+<a name="l00401"></a>00401                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink.html#240b37d793c6bdc32824ed0a0541b1eb" title="val-to-val link, indeces of the upper val">v2v_up</a>.length() ==<a class="code" href="classbdm_1_1datalink.html#bc8ff50395fc1066a1e486dea18d987c" title="Remember how long val should be.">downsize</a>,<span class="stringliteral">"rv is not fully in rv_up"</span> );
 <a name="l00402"></a>00402         }
-<a name="l00404"></a><a class="code" href="classbdm_1_1datalink.html#610e966f2edb1fcd6a5b28267c571793">00404</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1datalink.html#610e966f2edb1fcd6a5b28267c571793" title="Fill val of &amp;quot;Up&amp;quot; by my pieces.">pushup</a> ( vec &amp;val_up, <span class="keyword">const</span> vec &amp;val ) {
-<a name="l00405"></a>00405                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink.html#bc8ff50395fc1066a1e486dea18d987c" title="Remember how long val should be.">downsize</a>==val.length(),<span class="stringliteral">"Wrong val"</span> );
-<a name="l00406"></a>00406                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink.html#0f0d0af6848114d96108d3a6af25a045" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">upsize</a>==val_up.length(),<span class="stringliteral">"Wrong val_up"</span> );
-<a name="l00407"></a>00407                 set_subvector ( val_up, <a class="code" href="classbdm_1_1datalink.html#240b37d793c6bdc32824ed0a0541b1eb" title="val-to-val link, indeces of the upper val">v2v_up</a>, val );
-<a name="l00408"></a>00408         }
-<a name="l00409"></a>00409 };
-<a name="l00410"></a>00410 
-<a name="l00412"></a><a class="code" href="classbdm_1_1datalink__m2e.html">00412</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1datalink__m2e.html" title="data link between">datalink_m2e</a>: <span class="keyword">public</span> <a class="code" href="classbdm_1_1datalink.html" title="DataLink is a connection between two data vectors Up and Down.">datalink</a> {
-<a name="l00413"></a>00413 <span class="keyword">protected</span>:
-<a name="l00415"></a><a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9">00415</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9" title="Remember how long cond should be.">condsize</a>;
-<a name="l00417"></a><a class="code" href="classbdm_1_1datalink__m2e.html#43fe3e2d7aa04134053ec15793722783">00417</a>         ivec <a class="code" href="classbdm_1_1datalink__m2e.html#43fe3e2d7aa04134053ec15793722783" title="upper_val-to-local_cond link, indeces of the upper val">v2c_up</a>;
-<a name="l00419"></a><a class="code" href="classbdm_1_1datalink__m2e.html#9e0048d87bda78e9b8d38761440c7abc">00419</a>         ivec <a class="code" href="classbdm_1_1datalink__m2e.html#9e0048d87bda78e9b8d38761440c7abc" title="upper_val-to-local_cond link, ideces of the local cond">v2c_lo</a>;
-<a name="l00420"></a>00420 
-<a name="l00421"></a>00421 <span class="keyword">public</span>:
-<a name="l00423"></a><a class="code" href="classbdm_1_1datalink__m2e.html#31bb5b6cd04b4d99a02fc8d1ad5ce202">00423</a>         <a class="code" href="classbdm_1_1datalink__m2e.html#31bb5b6cd04b4d99a02fc8d1ad5ce202" title="Constructor.">datalink_m2e</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv,  <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rvc, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv_up ) :
-<a name="l00424"></a>00424                         <a class="code" href="classbdm_1_1datalink.html" title="DataLink is a connection between two data vectors Up and Down.">datalink</a> ( rv,rv_up ), <a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9" title="Remember how long cond should be.">condsize</a> ( rvc._dsize() ) {
-<a name="l00425"></a>00425                 <span class="comment">//establish v2c connection</span>
-<a name="l00426"></a>00426                 rvc.<a class="code" href="classbdm_1_1RV.html#cbebdb5e0d30101a6eb63550ef701c55">dataind</a> ( rv_up, <a class="code" href="classbdm_1_1datalink__m2e.html#9e0048d87bda78e9b8d38761440c7abc" title="upper_val-to-local_cond link, ideces of the local cond">v2c_lo</a>, <a class="code" href="classbdm_1_1datalink__m2e.html#43fe3e2d7aa04134053ec15793722783" title="upper_val-to-local_cond link, indeces of the upper val">v2c_up</a> );
-<a name="l00427"></a>00427         }
-<a name="l00429"></a><a class="code" href="classbdm_1_1datalink__m2e.html#7ba850822e3cf9a4b079afc7e7c01703">00429</a>         vec <a class="code" href="classbdm_1_1datalink__m2e.html#7ba850822e3cf9a4b079afc7e7c01703" title="Construct condition.">get_cond</a> ( <span class="keyword">const</span> vec &amp;val_up ) {
-<a name="l00430"></a>00430                 vec tmp ( <a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9" title="Remember how long cond should be.">condsize</a> );
-<a name="l00431"></a>00431                 set_subvector ( tmp,<a class="code" href="classbdm_1_1datalink__m2e.html#9e0048d87bda78e9b8d38761440c7abc" title="upper_val-to-local_cond link, ideces of the local cond">v2c_lo</a>,val_up ( <a class="code" href="classbdm_1_1datalink__m2e.html#43fe3e2d7aa04134053ec15793722783" title="upper_val-to-local_cond link, indeces of the upper val">v2c_up</a> ) );
-<a name="l00432"></a>00432                 <span class="keywordflow">return</span> tmp;
-<a name="l00433"></a>00433         }
-<a name="l00434"></a>00434         <span class="keywordtype">void</span> pushup_cond ( vec &amp;val_up, <span class="keyword">const</span> vec &amp;val, <span class="keyword">const</span> vec &amp;cond ) {
-<a name="l00435"></a>00435                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink.html#bc8ff50395fc1066a1e486dea18d987c" title="Remember how long val should be.">downsize</a>==val.length(),<span class="stringliteral">"Wrong val"</span> );
-<a name="l00436"></a>00436                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink.html#0f0d0af6848114d96108d3a6af25a045" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">upsize</a>==val_up.length(),<span class="stringliteral">"Wrong val_up"</span> );
-<a name="l00437"></a>00437                 set_subvector ( val_up, <a class="code" href="classbdm_1_1datalink.html#240b37d793c6bdc32824ed0a0541b1eb" title="val-to-val link, indeces of the upper val">v2v_up</a>, val );
-<a name="l00438"></a>00438                 set_subvector ( val_up, <a class="code" href="classbdm_1_1datalink__m2e.html#43fe3e2d7aa04134053ec15793722783" title="upper_val-to-local_cond link, indeces of the upper val">v2c_up</a>, cond );
-<a name="l00439"></a>00439         }
-<a name="l00440"></a>00440 };
-<a name="l00443"></a><a class="code" href="classbdm_1_1datalink__m2m.html">00443</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1datalink__m2m.html">datalink_m2m</a>: <span class="keyword">public</span> <a class="code" href="classbdm_1_1datalink__m2e.html" title="data link between">datalink_m2e</a> {
-<a name="l00444"></a>00444 <span class="keyword">protected</span>:
-<a name="l00446"></a><a class="code" href="classbdm_1_1datalink__m2m.html#d64dda6f92654628276bbcebb7600d0d">00446</a>         ivec <a class="code" href="classbdm_1_1datalink__m2m.html#d64dda6f92654628276bbcebb7600d0d" title="cond-to-cond link, indeces of the upper cond">c2c_up</a>;
-<a name="l00448"></a><a class="code" href="classbdm_1_1datalink__m2m.html#0ea05c47de4538b7042ff878e6e309a5">00448</a>         ivec <a class="code" href="classbdm_1_1datalink__m2m.html#0ea05c47de4538b7042ff878e6e309a5" title="cond-to-cond link, indeces of the local cond">c2c_lo</a>;
-<a name="l00449"></a>00449 <span class="keyword">public</span>:
-<a name="l00451"></a><a class="code" href="classbdm_1_1datalink__m2m.html#540c4b60686fdf1a7915300ae11bc41b">00451</a>         <a class="code" href="classbdm_1_1datalink__m2m.html#540c4b60686fdf1a7915300ae11bc41b" title="Constructor.">datalink_m2m</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rvc, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv_up, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rvc_up ) :
-<a name="l00452"></a>00452                         <a class="code" href="classbdm_1_1datalink__m2e.html" title="data link between">datalink_m2e</a> ( rv, rvc, rv_up ) {
-<a name="l00453"></a>00453                 <span class="comment">//establish c2c connection</span>
-<a name="l00454"></a>00454                 rvc.<a class="code" href="classbdm_1_1RV.html#cbebdb5e0d30101a6eb63550ef701c55">dataind</a> ( rvc_up, <a class="code" href="classbdm_1_1datalink__m2m.html#0ea05c47de4538b7042ff878e6e309a5" title="cond-to-cond link, indeces of the local cond">c2c_lo</a>, <a class="code" href="classbdm_1_1datalink__m2m.html#d64dda6f92654628276bbcebb7600d0d" title="cond-to-cond link, indeces of the upper cond">c2c_up</a> );
-<a name="l00455"></a>00455                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink__m2m.html#0ea05c47de4538b7042ff878e6e309a5" title="cond-to-cond link, indeces of the local cond">c2c_lo</a>.length() +<a class="code" href="classbdm_1_1datalink__m2e.html#9e0048d87bda78e9b8d38761440c7abc" title="upper_val-to-local_cond link, ideces of the local cond">v2c_lo</a>.length() ==<a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9" title="Remember how long cond should be.">condsize</a>, <span class="stringliteral">"cond is not fully given"</span> );
-<a name="l00456"></a>00456         }
-<a name="l00458"></a><a class="code" href="classbdm_1_1datalink__m2m.html#911fb7fcfa80d4e31db8e0cc03141a90">00458</a>         vec <a class="code" href="classbdm_1_1datalink__m2m.html#911fb7fcfa80d4e31db8e0cc03141a90" title="Get cond for myself from val and cond of &amp;quot;Up&amp;quot;.">get_cond</a> ( <span class="keyword">const</span> vec &amp;val_up, <span class="keyword">const</span> vec &amp;cond_up ) {
-<a name="l00459"></a>00459                 vec tmp ( <a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9" title="Remember how long cond should be.">condsize</a> );
-<a name="l00460"></a>00460                 set_subvector ( tmp,<a class="code" href="classbdm_1_1datalink__m2e.html#9e0048d87bda78e9b8d38761440c7abc" title="upper_val-to-local_cond link, ideces of the local cond">v2c_lo</a>,val_up ( <a class="code" href="classbdm_1_1datalink__m2e.html#43fe3e2d7aa04134053ec15793722783" title="upper_val-to-local_cond link, indeces of the upper val">v2c_up</a> ) );
-<a name="l00461"></a>00461                 set_subvector ( tmp,<a class="code" href="classbdm_1_1datalink__m2m.html#0ea05c47de4538b7042ff878e6e309a5" title="cond-to-cond link, indeces of the local cond">c2c_lo</a>,cond_up ( <a class="code" href="classbdm_1_1datalink__m2m.html#d64dda6f92654628276bbcebb7600d0d" title="cond-to-cond link, indeces of the upper cond">c2c_up</a> ) );
-<a name="l00462"></a>00462                 <span class="keywordflow">return</span> tmp;
-<a name="l00463"></a>00463         }
-<a name="l00465"></a>00465 
-<a name="l00466"></a>00466 };
-<a name="l00467"></a>00467 
-<a name="l00473"></a><a class="code" href="classbdm_1_1logger.html">00473</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a> {
-<a name="l00474"></a>00474 <span class="keyword">protected</span>:
-<a name="l00476"></a><a class="code" href="classbdm_1_1logger.html#c54566a4554089443a20b2a49ed1a61f">00476</a>         Array&lt;RV&gt; <a class="code" href="classbdm_1_1logger.html#c54566a4554089443a20b2a49ed1a61f" title="RVs of all logged variables.">entries</a>;
-<a name="l00478"></a><a class="code" href="classbdm_1_1logger.html#68ca1f05cf3d414ba0f39211977b8d02">00478</a>         Array&lt;string&gt; <a class="code" href="classbdm_1_1logger.html#68ca1f05cf3d414ba0f39211977b8d02" title="Names of logged quantities, e.g. names of algorithm variants.">names</a>;
-<a name="l00479"></a>00479 <span class="keyword">public</span>:
-<a name="l00481"></a><a class="code" href="classbdm_1_1logger.html#f9c2fe7db5ddbda0098a4a5bd2c29fbf">00481</a>         <a class="code" href="classbdm_1_1logger.html#f9c2fe7db5ddbda0098a4a5bd2c29fbf" title="Default constructor.">logger</a> ( ) : <a class="code" href="classbdm_1_1logger.html#c54566a4554089443a20b2a49ed1a61f" title="RVs of all logged variables.">entries</a> ( 0 ),<a class="code" href="classbdm_1_1logger.html#68ca1f05cf3d414ba0f39211977b8d02" title="Names of logged quantities, e.g. names of algorithm variants.">names</a> ( 0 ) {}
-<a name="l00482"></a>00482 
-<a name="l00485"></a><a class="code" href="classbdm_1_1logger.html#cfb4807e20b3d00f3d33e55ada528dc1">00485</a>         <span class="keyword">virtual</span> <span class="keywordtype">int</span> <span class="keyword">add</span> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv, <span class="keywordtype">string</span> name=<span class="stringliteral">""</span> ) {
-<a name="l00486"></a>00486                 <span class="keywordtype">int</span> id;
-<a name="l00487"></a>00487                 <span class="keywordflow">if</span> ( rv._dsize() &gt;0 ) {
-<a name="l00488"></a>00488                         <span class="keywordtype">id</span>=<a class="code" href="classbdm_1_1logger.html#c54566a4554089443a20b2a49ed1a61f" title="RVs of all logged variables.">entries</a>.length();
-<a name="l00489"></a>00489                         <a class="code" href="classbdm_1_1logger.html#68ca1f05cf3d414ba0f39211977b8d02" title="Names of logged quantities, e.g. names of algorithm variants.">names</a>=concat ( <a class="code" href="classbdm_1_1logger.html#68ca1f05cf3d414ba0f39211977b8d02" title="Names of logged quantities, e.g. names of algorithm variants.">names</a>, name ); <span class="comment">// diff</span>
-<a name="l00490"></a>00490                         <a class="code" href="classbdm_1_1logger.html#c54566a4554089443a20b2a49ed1a61f" title="RVs of all logged variables.">entries</a>.set_length ( <span class="keywordtype">id</span>+1,<span class="keyword">true</span> );
-<a name="l00491"></a>00491                         <a class="code" href="classbdm_1_1logger.html#c54566a4554089443a20b2a49ed1a61f" title="RVs of all logged variables.">entries</a> ( <span class="keywordtype">id</span> ) = rv;
-<a name="l00492"></a>00492                 }
-<a name="l00493"></a>00493                 <span class="keywordflow">else</span> { <span class="keywordtype">id</span> =-1;}
-<a name="l00494"></a>00494                 <span class="keywordflow">return</span> id; <span class="comment">// identifier of the last entry</span>
-<a name="l00495"></a>00495         }
-<a name="l00496"></a>00496 
-<a name="l00498"></a>00498         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1logger.html#397c014b0aaf3581516e2a105d26a5c9" title="log this vector">logit</a> ( <span class="keywordtype">int</span> <span class="keywordtype">id</span>, <span class="keyword">const</span> vec &amp;v ) =0;
-<a name="l00499"></a>00499 
-<a name="l00501"></a>00501         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1logger.html#4f31c03578a7b9b30d8b1f8c338a37e8" title="Shifts storage position for another time step.">step</a>() =0;
-<a name="l00502"></a>00502 
-<a name="l00504"></a><a class="code" href="classbdm_1_1logger.html#0e3fc7d13e23a8f71fc7c8a5ea68559d">00504</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1logger.html#0e3fc7d13e23a8f71fc7c8a5ea68559d" title="Finalize storing information.">finalize</a>() {};
-<a name="l00505"></a>00505 
-<a name="l00507"></a><a class="code" href="classbdm_1_1logger.html#cd6291a73491f755dc7bc88d022eb2fc">00507</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1logger.html#cd6291a73491f755dc7bc88d022eb2fc" title="Initialize the storage.">init</a>() {};
-<a name="l00508"></a>00508 
-<a name="l00509"></a>00509 };
+<a name="l00404"></a><a class="code" href="classbdm_1_1datalink.html#5b5368c3899eed2f670d09142c2548e5">00404</a>         vec <a class="code" href="classbdm_1_1datalink.html#5b5368c3899eed2f670d09142c2548e5" title="Get val for myself from val of &amp;quot;Up&amp;quot;.">pushdown</a> ( <span class="keyword">const</span> vec &amp;val_up ) {
+<a name="l00405"></a>00405                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink.html#0f0d0af6848114d96108d3a6af25a045" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">upsize</a>==val_up.length(),<span class="stringliteral">"Wrong val_up"</span> );
+<a name="l00406"></a>00406                 <span class="keywordflow">return</span> get_vec ( val_up,<a class="code" href="classbdm_1_1datalink.html#240b37d793c6bdc32824ed0a0541b1eb" title="val-to-val link, indeces of the upper val">v2v_up</a> );
+<a name="l00407"></a>00407         }
+<a name="l00409"></a><a class="code" href="classbdm_1_1datalink.html#610e966f2edb1fcd6a5b28267c571793">00409</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1datalink.html#610e966f2edb1fcd6a5b28267c571793" title="Fill val of &amp;quot;Up&amp;quot; by my pieces.">pushup</a> ( vec &amp;val_up, <span class="keyword">const</span> vec &amp;val ) {
+<a name="l00410"></a>00410                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink.html#bc8ff50395fc1066a1e486dea18d987c" title="Remember how long val should be.">downsize</a>==val.length(),<span class="stringliteral">"Wrong val"</span> );
+<a name="l00411"></a>00411                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink.html#0f0d0af6848114d96108d3a6af25a045" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">upsize</a>==val_up.length(),<span class="stringliteral">"Wrong val_up"</span> );
+<a name="l00412"></a>00412                 set_subvector ( val_up, <a class="code" href="classbdm_1_1datalink.html#240b37d793c6bdc32824ed0a0541b1eb" title="val-to-val link, indeces of the upper val">v2v_up</a>, val );
+<a name="l00413"></a>00413         }
+<a name="l00414"></a>00414 };
+<a name="l00415"></a>00415 
+<a name="l00417"></a><a class="code" href="classbdm_1_1datalink__m2e.html">00417</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1datalink__m2e.html" title="data link between">datalink_m2e</a>: <span class="keyword">public</span> <a class="code" href="classbdm_1_1datalink.html" title="DataLink is a connection between two data vectors Up and Down.">datalink</a> {
+<a name="l00418"></a>00418 <span class="keyword">protected</span>:
+<a name="l00420"></a><a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9">00420</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9" title="Remember how long cond should be.">condsize</a>;
+<a name="l00422"></a><a class="code" href="classbdm_1_1datalink__m2e.html#43fe3e2d7aa04134053ec15793722783">00422</a>         ivec <a class="code" href="classbdm_1_1datalink__m2e.html#43fe3e2d7aa04134053ec15793722783" title="upper_val-to-local_cond link, indeces of the upper val">v2c_up</a>;
+<a name="l00424"></a><a class="code" href="classbdm_1_1datalink__m2e.html#9e0048d87bda78e9b8d38761440c7abc">00424</a>         ivec <a class="code" href="classbdm_1_1datalink__m2e.html#9e0048d87bda78e9b8d38761440c7abc" title="upper_val-to-local_cond link, ideces of the local cond">v2c_lo</a>;
+<a name="l00425"></a>00425 
+<a name="l00426"></a>00426 <span class="keyword">public</span>:
+<a name="l00428"></a><a class="code" href="classbdm_1_1datalink__m2e.html#31bb5b6cd04b4d99a02fc8d1ad5ce202">00428</a>         <a class="code" href="classbdm_1_1datalink__m2e.html#31bb5b6cd04b4d99a02fc8d1ad5ce202" title="Constructor.">datalink_m2e</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv,  <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rvc, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv_up ) :
+<a name="l00429"></a>00429                         <a class="code" href="classbdm_1_1datalink.html" title="DataLink is a connection between two data vectors Up and Down.">datalink</a> ( rv,rv_up ), <a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9" title="Remember how long cond should be.">condsize</a> ( rvc._dsize() ) {
+<a name="l00430"></a>00430                 <span class="comment">//establish v2c connection</span>
+<a name="l00431"></a>00431                 rvc.<a class="code" href="classbdm_1_1RV.html#cbebdb5e0d30101a6eb63550ef701c55">dataind</a> ( rv_up, <a class="code" href="classbdm_1_1datalink__m2e.html#9e0048d87bda78e9b8d38761440c7abc" title="upper_val-to-local_cond link, ideces of the local cond">v2c_lo</a>, <a class="code" href="classbdm_1_1datalink__m2e.html#43fe3e2d7aa04134053ec15793722783" title="upper_val-to-local_cond link, indeces of the upper val">v2c_up</a> );
+<a name="l00432"></a>00432         }
+<a name="l00434"></a><a class="code" href="classbdm_1_1datalink__m2e.html#7ba850822e3cf9a4b079afc7e7c01703">00434</a>         vec <a class="code" href="classbdm_1_1datalink__m2e.html#7ba850822e3cf9a4b079afc7e7c01703" title="Construct condition.">get_cond</a> ( <span class="keyword">const</span> vec &amp;val_up ) {
+<a name="l00435"></a>00435                 vec tmp ( <a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9" title="Remember how long cond should be.">condsize</a> );
+<a name="l00436"></a>00436                 set_subvector ( tmp,<a class="code" href="classbdm_1_1datalink__m2e.html#9e0048d87bda78e9b8d38761440c7abc" title="upper_val-to-local_cond link, ideces of the local cond">v2c_lo</a>,val_up ( <a class="code" href="classbdm_1_1datalink__m2e.html#43fe3e2d7aa04134053ec15793722783" title="upper_val-to-local_cond link, indeces of the upper val">v2c_up</a> ) );
+<a name="l00437"></a>00437                 <span class="keywordflow">return</span> tmp;
+<a name="l00438"></a>00438         }
+<a name="l00439"></a>00439         <span class="keywordtype">void</span> pushup_cond ( vec &amp;val_up, <span class="keyword">const</span> vec &amp;val, <span class="keyword">const</span> vec &amp;cond ) {
+<a name="l00440"></a>00440                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink.html#bc8ff50395fc1066a1e486dea18d987c" title="Remember how long val should be.">downsize</a>==val.length(),<span class="stringliteral">"Wrong val"</span> );
+<a name="l00441"></a>00441                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink.html#0f0d0af6848114d96108d3a6af25a045" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">upsize</a>==val_up.length(),<span class="stringliteral">"Wrong val_up"</span> );
+<a name="l00442"></a>00442                 set_subvector ( val_up, <a class="code" href="classbdm_1_1datalink.html#240b37d793c6bdc32824ed0a0541b1eb" title="val-to-val link, indeces of the upper val">v2v_up</a>, val );
+<a name="l00443"></a>00443                 set_subvector ( val_up, <a class="code" href="classbdm_1_1datalink__m2e.html#43fe3e2d7aa04134053ec15793722783" title="upper_val-to-local_cond link, indeces of the upper val">v2c_up</a>, cond );
+<a name="l00444"></a>00444         }
+<a name="l00445"></a>00445 };
+<a name="l00448"></a><a class="code" href="classbdm_1_1datalink__m2m.html">00448</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1datalink__m2m.html">datalink_m2m</a>: <span class="keyword">public</span> <a class="code" href="classbdm_1_1datalink__m2e.html" title="data link between">datalink_m2e</a> {
+<a name="l00449"></a>00449 <span class="keyword">protected</span>:
+<a name="l00451"></a><a class="code" href="classbdm_1_1datalink__m2m.html#d64dda6f92654628276bbcebb7600d0d">00451</a>         ivec <a class="code" href="classbdm_1_1datalink__m2m.html#d64dda6f92654628276bbcebb7600d0d" title="cond-to-cond link, indeces of the upper cond">c2c_up</a>;
+<a name="l00453"></a><a class="code" href="classbdm_1_1datalink__m2m.html#0ea05c47de4538b7042ff878e6e309a5">00453</a>         ivec <a class="code" href="classbdm_1_1datalink__m2m.html#0ea05c47de4538b7042ff878e6e309a5" title="cond-to-cond link, indeces of the local cond">c2c_lo</a>;
+<a name="l00454"></a>00454 <span class="keyword">public</span>:
+<a name="l00456"></a><a class="code" href="classbdm_1_1datalink__m2m.html#540c4b60686fdf1a7915300ae11bc41b">00456</a>         <a class="code" href="classbdm_1_1datalink__m2m.html#540c4b60686fdf1a7915300ae11bc41b" title="Constructor.">datalink_m2m</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rvc, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv_up, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rvc_up ) :
+<a name="l00457"></a>00457                         <a class="code" href="classbdm_1_1datalink__m2e.html" title="data link between">datalink_m2e</a> ( rv, rvc, rv_up ) {
+<a name="l00458"></a>00458                 <span class="comment">//establish c2c connection</span>
+<a name="l00459"></a>00459                 rvc.<a class="code" href="classbdm_1_1RV.html#cbebdb5e0d30101a6eb63550ef701c55">dataind</a> ( rvc_up, <a class="code" href="classbdm_1_1datalink__m2m.html#0ea05c47de4538b7042ff878e6e309a5" title="cond-to-cond link, indeces of the local cond">c2c_lo</a>, <a class="code" href="classbdm_1_1datalink__m2m.html#d64dda6f92654628276bbcebb7600d0d" title="cond-to-cond link, indeces of the upper cond">c2c_up</a> );
+<a name="l00460"></a>00460                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink__m2m.html#0ea05c47de4538b7042ff878e6e309a5" title="cond-to-cond link, indeces of the local cond">c2c_lo</a>.length() +<a class="code" href="classbdm_1_1datalink__m2e.html#9e0048d87bda78e9b8d38761440c7abc" title="upper_val-to-local_cond link, ideces of the local cond">v2c_lo</a>.length() ==<a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9" title="Remember how long cond should be.">condsize</a>, <span class="stringliteral">"cond is not fully given"</span> );
+<a name="l00461"></a>00461         }
+<a name="l00463"></a><a class="code" href="classbdm_1_1datalink__m2m.html#911fb7fcfa80d4e31db8e0cc03141a90">00463</a>         vec <a class="code" href="classbdm_1_1datalink__m2m.html#911fb7fcfa80d4e31db8e0cc03141a90" title="Get cond for myself from val and cond of &amp;quot;Up&amp;quot;.">get_cond</a> ( <span class="keyword">const</span> vec &amp;val_up, <span class="keyword">const</span> vec &amp;cond_up ) {
+<a name="l00464"></a>00464                 vec tmp ( <a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9" title="Remember how long cond should be.">condsize</a> );
+<a name="l00465"></a>00465                 set_subvector ( tmp,<a class="code" href="classbdm_1_1datalink__m2e.html#9e0048d87bda78e9b8d38761440c7abc" title="upper_val-to-local_cond link, ideces of the local cond">v2c_lo</a>,val_up ( <a class="code" href="classbdm_1_1datalink__m2e.html#43fe3e2d7aa04134053ec15793722783" title="upper_val-to-local_cond link, indeces of the upper val">v2c_up</a> ) );
+<a name="l00466"></a>00466                 set_subvector ( tmp,<a class="code" href="classbdm_1_1datalink__m2m.html#0ea05c47de4538b7042ff878e6e309a5" title="cond-to-cond link, indeces of the local cond">c2c_lo</a>,cond_up ( <a class="code" href="classbdm_1_1datalink__m2m.html#d64dda6f92654628276bbcebb7600d0d" title="cond-to-cond link, indeces of the upper cond">c2c_up</a> ) );
+<a name="l00467"></a>00467                 <span class="keywordflow">return</span> tmp;
+<a name="l00468"></a>00468         }
+<a name="l00470"></a>00470 
+<a name="l00471"></a>00471 };
+<a name="l00472"></a>00472 
+<a name="l00478"></a><a class="code" href="classbdm_1_1logger.html">00478</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a> {
+<a name="l00479"></a>00479 <span class="keyword">protected</span>:
+<a name="l00481"></a><a class="code" href="classbdm_1_1logger.html#c54566a4554089443a20b2a49ed1a61f">00481</a>         Array&lt;RV&gt; <a class="code" href="classbdm_1_1logger.html#c54566a4554089443a20b2a49ed1a61f" title="RVs of all logged variables.">entries</a>;
+<a name="l00483"></a><a class="code" href="classbdm_1_1logger.html#68ca1f05cf3d414ba0f39211977b8d02">00483</a>         Array&lt;string&gt; <a class="code" href="classbdm_1_1logger.html#68ca1f05cf3d414ba0f39211977b8d02" title="Names of logged quantities, e.g. names of algorithm variants.">names</a>;
+<a name="l00484"></a>00484 <span class="keyword">public</span>:
+<a name="l00486"></a><a class="code" href="classbdm_1_1logger.html#f9c2fe7db5ddbda0098a4a5bd2c29fbf">00486</a>         <a class="code" href="classbdm_1_1logger.html#f9c2fe7db5ddbda0098a4a5bd2c29fbf" title="Default constructor.">logger</a> ( ) : <a class="code" href="classbdm_1_1logger.html#c54566a4554089443a20b2a49ed1a61f" title="RVs of all logged variables.">entries</a> ( 0 ),<a class="code" href="classbdm_1_1logger.html#68ca1f05cf3d414ba0f39211977b8d02" title="Names of logged quantities, e.g. names of algorithm variants.">names</a> ( 0 ) {}
+<a name="l00487"></a>00487 
+<a name="l00490"></a><a class="code" href="classbdm_1_1logger.html#cfb4807e20b3d00f3d33e55ada528dc1">00490</a>         <span class="keyword">virtual</span> <span class="keywordtype">int</span> <span class="keyword">add</span> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv, <span class="keywordtype">string</span> name=<span class="stringliteral">""</span> ) {
+<a name="l00491"></a>00491                 <span class="keywordtype">int</span> id;
+<a name="l00492"></a>00492                 <span class="keywordflow">if</span> ( rv._dsize() &gt;0 ) {
+<a name="l00493"></a>00493                         <span class="keywordtype">id</span>=<a class="code" href="classbdm_1_1logger.html#c54566a4554089443a20b2a49ed1a61f" title="RVs of all logged variables.">entries</a>.length();
+<a name="l00494"></a>00494                         <a class="code" href="classbdm_1_1logger.html#68ca1f05cf3d414ba0f39211977b8d02" title="Names of logged quantities, e.g. names of algorithm variants.">names</a>=concat ( <a class="code" href="classbdm_1_1logger.html#68ca1f05cf3d414ba0f39211977b8d02" title="Names of logged quantities, e.g. names of algorithm variants.">names</a>, name ); <span class="comment">// diff</span>
+<a name="l00495"></a>00495                         <a class="code" href="classbdm_1_1logger.html#c54566a4554089443a20b2a49ed1a61f" title="RVs of all logged variables.">entries</a>.set_length ( <span class="keywordtype">id</span>+1,<span class="keyword">true</span> );
+<a name="l00496"></a>00496                         <a class="code" href="classbdm_1_1logger.html#c54566a4554089443a20b2a49ed1a61f" title="RVs of all logged variables.">entries</a> ( <span class="keywordtype">id</span> ) = rv;
+<a name="l00497"></a>00497                 }
+<a name="l00498"></a>00498                 <span class="keywordflow">else</span> { <span class="keywordtype">id</span> =-1;}
+<a name="l00499"></a>00499                 <span class="keywordflow">return</span> id; <span class="comment">// identifier of the last entry</span>
+<a name="l00500"></a>00500         }
+<a name="l00501"></a>00501 
+<a name="l00503"></a>00503         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1logger.html#397c014b0aaf3581516e2a105d26a5c9" title="log this vector">logit</a> ( <span class="keywordtype">int</span> <span class="keywordtype">id</span>, <span class="keyword">const</span> vec &amp;v ) =0;
+<a name="l00504"></a>00504 
+<a name="l00506"></a>00506         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1logger.html#4f31c03578a7b9b30d8b1f8c338a37e8" title="Shifts storage position for another time step.">step</a>() =0;
+<a name="l00507"></a>00507 
+<a name="l00509"></a><a class="code" href="classbdm_1_1logger.html#0e3fc7d13e23a8f71fc7c8a5ea68559d">00509</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1logger.html#0e3fc7d13e23a8f71fc7c8a5ea68559d" title="Finalize storing information.">finalize</a>() {};
 <a name="l00510"></a>00510 
-<a name="l00514"></a><a class="code" href="classbdm_1_1mepdf.html">00514</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1mepdf.html" title="Unconditional mpdf, allows using epdf in the role of mpdf.">mepdf</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> {
-<a name="l00515"></a>00515 <span class="keyword">public</span>:
-<a name="l00517"></a><a class="code" href="classbdm_1_1mepdf.html#27cc32d1a810516c25bda51ddf886376">00517</a>         <a class="code" href="classbdm_1_1mepdf.html#27cc32d1a810516c25bda51ddf886376" title="Default constructor.">mepdf</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* em ) :<a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> ( ) {<a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>=<span class="keyword">const_cast&lt;</span><a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>*<span class="keyword">&gt;</span> ( em );};
-<a name="l00518"></a><a class="code" href="classbdm_1_1mepdf.html#b2b898058169e7ed9a6dc7cd4e1c147c">00518</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1mepdf.html#b2b898058169e7ed9a6dc7cd4e1c147c" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( <span class="keyword">const</span> vec &amp;cond ) {}
-<a name="l00519"></a>00519 };
-<a name="l00520"></a>00520 
-<a name="l00523"></a><a class="code" href="classbdm_1_1compositepdf.html">00523</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1compositepdf.html" title="Abstract composition of pdfs, will be used for specific classes this abstract class...">compositepdf</a> {
-<a name="l00524"></a>00524 <span class="keyword">protected</span>:
-<a name="l00526"></a><a class="code" href="classbdm_1_1compositepdf.html#7ca3cd8ed92a7154f5b9ff13b1e9d52a">00526</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1compositepdf.html#7ca3cd8ed92a7154f5b9ff13b1e9d52a" title="Number of mpdfs in the composite.">n</a>;
-<a name="l00528"></a><a class="code" href="classbdm_1_1compositepdf.html#23faf2debc4dde10836393b8c665914a">00528</a>         Array&lt;mpdf*&gt; <a class="code" href="classbdm_1_1compositepdf.html#23faf2debc4dde10836393b8c665914a" title="Elements of composition.">mpdfs</a>;
-<a name="l00529"></a>00529 <span class="keyword">public</span>:
-<a name="l00530"></a>00530         <a class="code" href="classbdm_1_1compositepdf.html" title="Abstract composition of pdfs, will be used for specific classes this abstract class...">compositepdf</a> ( Array&lt;mpdf*&gt; A0 ) : <a class="code" href="classbdm_1_1compositepdf.html#7ca3cd8ed92a7154f5b9ff13b1e9d52a" title="Number of mpdfs in the composite.">n</a> ( A0.length() ), <a class="code" href="classbdm_1_1compositepdf.html#23faf2debc4dde10836393b8c665914a" title="Elements of composition.">mpdfs</a> ( A0 ) {};
-<a name="l00532"></a>00532         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1compositepdf.html#c73d39acc4378eee6a63155c3517d3c9" title="find common rv, flag">getrv</a> ( <span class="keywordtype">bool</span> checkoverlap=<span class="keyword">false</span> );
-<a name="l00534"></a>00534         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1compositepdf.html#c71fc2c51f49d797e61f479f543c75ce" title="common rvc of all mpdfs is written to rvc">setrvc</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv, <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rvc );
-<a name="l00535"></a>00535 };
-<a name="l00536"></a>00536 
-<a name="l00544"></a><a class="code" href="classbdm_1_1DS.html">00544</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1DS.html" title="Abstract class for discrete-time sources of data.">DS</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a> {
-<a name="l00545"></a>00545 <span class="keyword">protected</span>:
-<a name="l00546"></a>00546         <span class="keywordtype">int</span> dtsize;
-<a name="l00547"></a>00547         <span class="keywordtype">int</span> utsize;
-<a name="l00549"></a><a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec">00549</a>         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>;
-<a name="l00551"></a><a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702">00551</a>         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>; <span class="comment">//</span>
-<a name="l00553"></a><a class="code" href="classbdm_1_1DS.html#b4b7bdb9d98a11ab587aa0ad803bb867">00553</a> <span class="comment"></span>        <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1DS.html#b4b7bdb9d98a11ab587aa0ad803bb867" title="Remember its own index in Logger L.">L_dt</a>, L_ut;
-<a name="l00554"></a>00554 <span class="keyword">public</span>:
-<a name="l00556"></a><a class="code" href="classbdm_1_1DS.html#bedd82e08ae6686b4b1732a122c2201a">00556</a>         <a class="code" href="classbdm_1_1DS.html#bedd82e08ae6686b4b1732a122c2201a" title="default constructors">DS</a>() :<a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a> ( ),<a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a> ( ) {};
-<a name="l00558"></a><a class="code" href="classbdm_1_1DS.html#c1ec862dec7164fee3284c6f9a51b0ba">00558</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#c1ec862dec7164fee3284c6f9a51b0ba" title="Returns full vector of observed data=[output, input].">getdata</a> ( vec &amp;dt ) {it_error ( <span class="stringliteral">"abstract class"</span> );};
-<a name="l00560"></a><a class="code" href="classbdm_1_1DS.html#a0bf451c7fea73ff4150ff9e83da4832">00560</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#c1ec862dec7164fee3284c6f9a51b0ba" title="Returns full vector of observed data=[output, input].">getdata</a> ( vec &amp;dt, <span class="keyword">const</span> ivec &amp;indeces ) {it_error ( <span class="stringliteral">"abstract class"</span> );};
-<a name="l00562"></a><a class="code" href="classbdm_1_1DS.html#f5baeee8528e5e4c5c7a344b2e3f192a">00562</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#f5baeee8528e5e4c5c7a344b2e3f192a" title="Accepts action variable and schedule it for application.">write</a> ( vec &amp;ut ) {it_error ( <span class="stringliteral">"abstract class"</span> );};
-<a name="l00564"></a><a class="code" href="classbdm_1_1DS.html#6bced13f84f6bf04449728817e049e1d">00564</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#f5baeee8528e5e4c5c7a344b2e3f192a" title="Accepts action variable and schedule it for application.">write</a> ( vec &amp;ut, <span class="keyword">const</span> ivec &amp;indeces ) {it_error ( <span class="stringliteral">"abstract class"</span> );};
-<a name="l00565"></a>00565 
-<a name="l00567"></a>00567         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#9a14c64d881e838ddc3a5617ee8a973b" title="Moves from  to , i.e. perfroms the actions and reads response of the system.">step</a>() =0;
-<a name="l00568"></a>00568 
-<a name="l00570"></a><a class="code" href="classbdm_1_1DS.html#3c9e417d85052396fe74c164857ee67e">00570</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#3c9e417d85052396fe74c164857ee67e" title="Register DS for logging into logger L.">log_add</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &amp;L ) {
-<a name="l00571"></a>00571                 it_assert_debug ( dtsize==<a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>(),<span class="stringliteral">""</span> );
-<a name="l00572"></a>00572                 it_assert_debug ( utsize==<a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>(),<span class="stringliteral">""</span> );
+<a name="l00512"></a><a class="code" href="classbdm_1_1logger.html#cd6291a73491f755dc7bc88d022eb2fc">00512</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1logger.html#cd6291a73491f755dc7bc88d022eb2fc" title="Initialize the storage.">init</a>() {};
+<a name="l00513"></a>00513 
+<a name="l00514"></a>00514 };
+<a name="l00515"></a>00515 
+<a name="l00519"></a><a class="code" href="classbdm_1_1mepdf.html">00519</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1mepdf.html" title="Unconditional mpdf, allows using epdf in the role of mpdf.">mepdf</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> {
+<a name="l00520"></a>00520 <span class="keyword">public</span>:
+<a name="l00522"></a><a class="code" href="classbdm_1_1mepdf.html#27cc32d1a810516c25bda51ddf886376">00522</a>         <a class="code" href="classbdm_1_1mepdf.html#27cc32d1a810516c25bda51ddf886376" title="Default constructor.">mepdf</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* em ) :<a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> ( ) {<a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>=<span class="keyword">const_cast&lt;</span><a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>*<span class="keyword">&gt;</span> ( em );};
+<a name="l00523"></a><a class="code" href="classbdm_1_1mepdf.html#b2b898058169e7ed9a6dc7cd4e1c147c">00523</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1mepdf.html#b2b898058169e7ed9a6dc7cd4e1c147c" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( <span class="keyword">const</span> vec &amp;cond ) {}
+<a name="l00524"></a>00524 };
+<a name="l00525"></a>00525 
+<a name="l00528"></a><a class="code" href="classbdm_1_1compositepdf.html">00528</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1compositepdf.html" title="Abstract composition of pdfs, will be used for specific classes this abstract class...">compositepdf</a> {
+<a name="l00529"></a>00529 <span class="keyword">protected</span>:
+<a name="l00531"></a><a class="code" href="classbdm_1_1compositepdf.html#7ca3cd8ed92a7154f5b9ff13b1e9d52a">00531</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1compositepdf.html#7ca3cd8ed92a7154f5b9ff13b1e9d52a" title="Number of mpdfs in the composite.">n</a>;
+<a name="l00533"></a><a class="code" href="classbdm_1_1compositepdf.html#23faf2debc4dde10836393b8c665914a">00533</a>         Array&lt;mpdf*&gt; <a class="code" href="classbdm_1_1compositepdf.html#23faf2debc4dde10836393b8c665914a" title="Elements of composition.">mpdfs</a>;
+<a name="l00534"></a>00534 <span class="keyword">public</span>:
+<a name="l00535"></a>00535         <a class="code" href="classbdm_1_1compositepdf.html" title="Abstract composition of pdfs, will be used for specific classes this abstract class...">compositepdf</a> ( Array&lt;mpdf*&gt; A0 ) : <a class="code" href="classbdm_1_1compositepdf.html#7ca3cd8ed92a7154f5b9ff13b1e9d52a" title="Number of mpdfs in the composite.">n</a> ( A0.length() ), <a class="code" href="classbdm_1_1compositepdf.html#23faf2debc4dde10836393b8c665914a" title="Elements of composition.">mpdfs</a> ( A0 ) {};
+<a name="l00537"></a>00537         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1compositepdf.html#c73d39acc4378eee6a63155c3517d3c9" title="find common rv, flag">getrv</a> ( <span class="keywordtype">bool</span> checkoverlap=<span class="keyword">false</span> );
+<a name="l00539"></a>00539         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1compositepdf.html#c71fc2c51f49d797e61f479f543c75ce" title="common rvc of all mpdfs is written to rvc">setrvc</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv, <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rvc );
+<a name="l00540"></a>00540 };
+<a name="l00541"></a>00541 
+<a name="l00549"></a><a class="code" href="classbdm_1_1DS.html">00549</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1DS.html" title="Abstract class for discrete-time sources of data.">DS</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a> {
+<a name="l00550"></a>00550 <span class="keyword">protected</span>:
+<a name="l00551"></a>00551         <span class="keywordtype">int</span> dtsize;
+<a name="l00552"></a>00552         <span class="keywordtype">int</span> utsize;
+<a name="l00554"></a><a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec">00554</a>         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>;
+<a name="l00556"></a><a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702">00556</a>         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>; <span class="comment">//</span>
+<a name="l00558"></a><a class="code" href="classbdm_1_1DS.html#b4b7bdb9d98a11ab587aa0ad803bb867">00558</a> <span class="comment"></span>        <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1DS.html#b4b7bdb9d98a11ab587aa0ad803bb867" title="Remember its own index in Logger L.">L_dt</a>, L_ut;
+<a name="l00559"></a>00559 <span class="keyword">public</span>:
+<a name="l00561"></a><a class="code" href="classbdm_1_1DS.html#bedd82e08ae6686b4b1732a122c2201a">00561</a>         <a class="code" href="classbdm_1_1DS.html#bedd82e08ae6686b4b1732a122c2201a" title="default constructors">DS</a>() :<a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a> ( ),<a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a> ( ) {};
+<a name="l00563"></a><a class="code" href="classbdm_1_1DS.html#c1ec862dec7164fee3284c6f9a51b0ba">00563</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#c1ec862dec7164fee3284c6f9a51b0ba" title="Returns full vector of observed data=[output, input].">getdata</a> ( vec &amp;dt ) {it_error ( <span class="stringliteral">"abstract class"</span> );};
+<a name="l00565"></a><a class="code" href="classbdm_1_1DS.html#a0bf451c7fea73ff4150ff9e83da4832">00565</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#c1ec862dec7164fee3284c6f9a51b0ba" title="Returns full vector of observed data=[output, input].">getdata</a> ( vec &amp;dt, <span class="keyword">const</span> ivec &amp;indeces ) {it_error ( <span class="stringliteral">"abstract class"</span> );};
+<a name="l00567"></a><a class="code" href="classbdm_1_1DS.html#f5baeee8528e5e4c5c7a344b2e3f192a">00567</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#f5baeee8528e5e4c5c7a344b2e3f192a" title="Accepts action variable and schedule it for application.">write</a> ( vec &amp;ut ) {it_error ( <span class="stringliteral">"abstract class"</span> );};
+<a name="l00569"></a><a class="code" href="classbdm_1_1DS.html#6bced13f84f6bf04449728817e049e1d">00569</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#f5baeee8528e5e4c5c7a344b2e3f192a" title="Accepts action variable and schedule it for application.">write</a> ( vec &amp;ut, <span class="keyword">const</span> ivec &amp;indeces ) {it_error ( <span class="stringliteral">"abstract class"</span> );};
+<a name="l00570"></a>00570 
+<a name="l00572"></a>00572         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#9a14c64d881e838ddc3a5617ee8a973b" title="Moves from  to , i.e. perfroms the actions and reads response of the system.">step</a>() =0;
 <a name="l00573"></a>00573 
-<a name="l00574"></a>00574                 <a class="code" href="classbdm_1_1DS.html#b4b7bdb9d98a11ab587aa0ad803bb867" title="Remember its own index in Logger L.">L_dt</a>=L.<a class="code" href="classbdm_1_1logger.html#cfb4807e20b3d00f3d33e55ada528dc1">add</a> ( <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>,<span class="stringliteral">""</span> );
-<a name="l00575"></a>00575                 L_ut=L.<a class="code" href="classbdm_1_1logger.html#cfb4807e20b3d00f3d33e55ada528dc1">add</a> ( <a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>,<span class="stringliteral">""</span> );
-<a name="l00576"></a>00576         }
-<a name="l00578"></a><a class="code" href="classbdm_1_1DS.html#e03d2c93cddd5c3a03107ddd3ae999cf">00578</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#e03d2c93cddd5c3a03107ddd3ae999cf" title="Register DS for logging into logger L.">logit</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &amp;L ) {
-<a name="l00579"></a>00579                 vec tmp ( <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() +<a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() );
-<a name="l00580"></a>00580                 <a class="code" href="classbdm_1_1DS.html#c1ec862dec7164fee3284c6f9a51b0ba" title="Returns full vector of observed data=[output, input].">getdata</a> ( tmp );
-<a name="l00581"></a>00581                 <span class="comment">// d is first in getdata</span>
-<a name="l00582"></a>00582                 L.<a class="code" href="classbdm_1_1logger.html#397c014b0aaf3581516e2a105d26a5c9" title="log this vector">logit</a> ( <a class="code" href="classbdm_1_1DS.html#b4b7bdb9d98a11ab587aa0ad803bb867" title="Remember its own index in Logger L.">L_dt</a>,tmp.left ( <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() ) );
-<a name="l00583"></a>00583                 <span class="comment">// u follows after d in getdata</span>
-<a name="l00584"></a>00584                 L.<a class="code" href="classbdm_1_1logger.html#397c014b0aaf3581516e2a105d26a5c9" title="log this vector">logit</a> ( L_ut,tmp.mid ( <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>(), <a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() ) );
-<a name="l00585"></a>00585         }
-<a name="l00587"></a><a class="code" href="classbdm_1_1DS.html#ed2113851294ed96abe60fc3f05aa660">00587</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1DS.html#ed2113851294ed96abe60fc3f05aa660" title="access function">_drv</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> concat ( <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>,<a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a> );}
-<a name="l00589"></a><a class="code" href="classbdm_1_1DS.html#a6a9a375da64c82fc227bda3418a1f33">00589</a>         <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>&amp; <a class="code" href="classbdm_1_1DS.html#a6a9a375da64c82fc227bda3418a1f33" title="access function">_urv</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>;}
-<a name="l00590"></a>00590 };
-<a name="l00591"></a>00591 
-<a name="l00596"></a><a class="code" href="classbdm_1_1BM.html">00596</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a> :<span class="keyword">public</span> <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a> {
-<a name="l00597"></a>00597 <span class="keyword">protected</span>:
-<a name="l00599"></a><a class="code" href="classbdm_1_1BM.html#c400357e37d27a4834b2b1d9211009ed">00599</a>         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1BM.html#c400357e37d27a4834b2b1d9211009ed" title="Random variable of the data (optional).">drv</a>;
-<a name="l00601"></a><a class="code" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a">00601</a>         <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a" title="Logarithm of marginalized data likelihood.">ll</a>;
-<a name="l00603"></a><a class="code" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee">00603</a>         <span class="keywordtype">bool</span> <a class="code" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>;
-<a name="l00604"></a>00604 <span class="keyword">public</span>:
-<a name="l00607"></a>00607 
-<a name="l00608"></a>00608         <a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a> () :<a class="code" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a" title="Logarithm of marginalized data likelihood.">ll</a> ( 0 ),<a class="code" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a> ( false ) {};
-<a name="l00609"></a>00609         <a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a> &amp;B ) :  <a class="code" href="classbdm_1_1BM.html#c400357e37d27a4834b2b1d9211009ed" title="Random variable of the data (optional).">drv</a> ( B.<a class="code" href="classbdm_1_1BM.html#c400357e37d27a4834b2b1d9211009ed" title="Random variable of the data (optional).">drv</a> ), <a class="code" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a" title="Logarithm of marginalized data likelihood.">ll</a> ( B.<a class="code" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a" title="Logarithm of marginalized data likelihood.">ll</a> ), <a class="code" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a> ( B.<a class="code" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a> ) {}
-<a name="l00612"></a><a class="code" href="classbdm_1_1BM.html#c0f027ff91d8459937c6f60ff8e553ff">00612</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a>* <a class="code" href="classbdm_1_1BM.html#c0f027ff91d8459937c6f60ff8e553ff">_copy_</a> () {<span class="keywordflow">return</span> NULL;};
-<a name="l00614"></a>00614 
-<a name="l00617"></a>00617 
-<a name="l00621"></a>00621         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1BM.html#60b1779a577367c369a932cabd3a6188" title="Incremental Bayes rule.">bayes</a> ( <span class="keyword">const</span> vec &amp;dt ) = 0;
-<a name="l00623"></a>00623         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1BM.html#1dee3fddaf021e62d925289660a707dc" title="Batch Bayes rule (columns of Dt are observations).">bayesB</a> ( <span class="keyword">const</span> mat &amp;Dt );
-<a name="l00626"></a><a class="code" href="classbdm_1_1BM.html#50257e0c1e5b5c73153ea6e716ad8ae0">00626</a>         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1BM.html#50257e0c1e5b5c73153ea6e716ad8ae0">logpred</a> ( <span class="keyword">const</span> vec &amp;dt )<span class="keyword"> const</span>{it_error ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> 0.0;}
-<a name="l00628"></a><a class="code" href="classbdm_1_1BM.html#0e8ebe61fb14990abe1254bd3dda5fae">00628</a>         vec <a class="code" href="classbdm_1_1BM.html#0e8ebe61fb14990abe1254bd3dda5fae" title="Matrix version of logpred.">logpred_m</a> ( <span class="keyword">const</span> mat &amp;dt )<span class="keyword"> const</span>{vec tmp ( dt.cols() );<span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i&lt;dt.cols();i++ ) {tmp ( i ) =<a class="code" href="classbdm_1_1BM.html#50257e0c1e5b5c73153ea6e716ad8ae0">logpred</a> ( dt.get_col ( i ) );}<span class="keywordflow">return</span> tmp;}
+<a name="l00575"></a><a class="code" href="classbdm_1_1DS.html#3c9e417d85052396fe74c164857ee67e">00575</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#3c9e417d85052396fe74c164857ee67e" title="Register DS for logging into logger L.">log_add</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &amp;L ) {
+<a name="l00576"></a>00576                 it_assert_debug ( dtsize==<a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>(),<span class="stringliteral">""</span> );
+<a name="l00577"></a>00577                 it_assert_debug ( utsize==<a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>(),<span class="stringliteral">""</span> );
+<a name="l00578"></a>00578 
+<a name="l00579"></a>00579                 <a class="code" href="classbdm_1_1DS.html#b4b7bdb9d98a11ab587aa0ad803bb867" title="Remember its own index in Logger L.">L_dt</a>=L.<a class="code" href="classbdm_1_1logger.html#cfb4807e20b3d00f3d33e55ada528dc1">add</a> ( <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>,<span class="stringliteral">""</span> );
+<a name="l00580"></a>00580                 L_ut=L.<a class="code" href="classbdm_1_1logger.html#cfb4807e20b3d00f3d33e55ada528dc1">add</a> ( <a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>,<span class="stringliteral">""</span> );
+<a name="l00581"></a>00581         }
+<a name="l00583"></a><a class="code" href="classbdm_1_1DS.html#e03d2c93cddd5c3a03107ddd3ae999cf">00583</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#e03d2c93cddd5c3a03107ddd3ae999cf" title="Register DS for logging into logger L.">logit</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &amp;L ) {
+<a name="l00584"></a>00584                 vec tmp ( <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() +<a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() );
+<a name="l00585"></a>00585                 <a class="code" href="classbdm_1_1DS.html#c1ec862dec7164fee3284c6f9a51b0ba" title="Returns full vector of observed data=[output, input].">getdata</a> ( tmp );
+<a name="l00586"></a>00586                 <span class="comment">// d is first in getdata</span>
+<a name="l00587"></a>00587                 L.<a class="code" href="classbdm_1_1logger.html#397c014b0aaf3581516e2a105d26a5c9" title="log this vector">logit</a> ( <a class="code" href="classbdm_1_1DS.html#b4b7bdb9d98a11ab587aa0ad803bb867" title="Remember its own index in Logger L.">L_dt</a>,tmp.left ( <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() ) );
+<a name="l00588"></a>00588                 <span class="comment">// u follows after d in getdata</span>
+<a name="l00589"></a>00589                 L.<a class="code" href="classbdm_1_1logger.html#397c014b0aaf3581516e2a105d26a5c9" title="log this vector">logit</a> ( L_ut,tmp.mid ( <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>(), <a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() ) );
+<a name="l00590"></a>00590         }
+<a name="l00592"></a><a class="code" href="classbdm_1_1DS.html#ed2113851294ed96abe60fc3f05aa660">00592</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1DS.html#ed2113851294ed96abe60fc3f05aa660" title="access function">_drv</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> concat ( <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>,<a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a> );}
+<a name="l00594"></a><a class="code" href="classbdm_1_1DS.html#a6a9a375da64c82fc227bda3418a1f33">00594</a>         <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>&amp; <a class="code" href="classbdm_1_1DS.html#a6a9a375da64c82fc227bda3418a1f33" title="access function">_urv</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>;}
+<a name="l00595"></a>00595 };
+<a name="l00596"></a>00596 
+<a name="l00618"></a><a class="code" href="classbdm_1_1BM.html">00618</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a> :<span class="keyword">public</span> <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a> {
+<a name="l00619"></a>00619 <span class="keyword">protected</span>:
+<a name="l00621"></a><a class="code" href="classbdm_1_1BM.html#c400357e37d27a4834b2b1d9211009ed">00621</a>         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1BM.html#c400357e37d27a4834b2b1d9211009ed" title="Random variable of the data (optional).">drv</a>;
+<a name="l00623"></a><a class="code" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a">00623</a>         <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a" title="Logarithm of marginalized data likelihood.">ll</a>;
+<a name="l00625"></a><a class="code" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee">00625</a>         <span class="keywordtype">bool</span> <a class="code" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>;
+<a name="l00626"></a>00626 <span class="keyword">public</span>:
 <a name="l00629"></a>00629 
-<a name="l00631"></a><a class="code" href="classbdm_1_1BM.html#688d7a2aced1e06aa1c468d73a9e5eba">00631</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* <a class="code" href="classbdm_1_1BM.html#688d7a2aced1e06aa1c468d73a9e5eba" title="Constructs a predictive density .">epredictor</a> ( )<span class="keyword"> const </span>{it_error ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> NULL;};
-<a name="l00633"></a><a class="code" href="classbdm_1_1BM.html#598b25e3f3d96a5bc00a5faeb5b3c912">00633</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a>* <a class="code" href="classbdm_1_1BM.html#598b25e3f3d96a5bc00a5faeb5b3c912" title="Constructs a conditional density 1-step ahead predictor.">predictor</a> ( )<span class="keyword"> const </span>{it_error ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> NULL;};
-<a name="l00635"></a>00635 
-<a name="l00638"></a>00638 
-<a name="l00639"></a>00639         <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>&amp; _drv()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1BM.html#c400357e37d27a4834b2b1d9211009ed" title="Random variable of the data (optional).">drv</a>;}
-<a name="l00640"></a>00640         <span class="keywordtype">void</span> set_drv ( <span class="keyword">const</span> RV &amp;rv ) {<a class="code" href="classbdm_1_1BM.html#c400357e37d27a4834b2b1d9211009ed" title="Random variable of the data (optional).">drv</a>=rv;}
-<a name="l00641"></a>00641         <span class="keywordtype">void</span> set_rv ( <span class="keyword">const</span> RV &amp;rv ) {<span class="keyword">const_cast&lt;</span>epdf&amp;<span class="keyword">&gt;</span> ( posterior() ).set_rv ( rv );}
-<a name="l00642"></a>00642         <span class="keywordtype">double</span> _ll()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a" title="Logarithm of marginalized data likelihood.">ll</a>;}
-<a name="l00643"></a>00643         <span class="keywordtype">void</span> set_evalll ( <span class="keywordtype">bool</span> evl0 ) {<a class="code" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>=evl0;}
-<a name="l00644"></a>00644         <span class="keyword">virtual</span> <span class="keyword">const</span> epdf&amp; posterior() <span class="keyword">const</span> =0;
-<a name="l00645"></a>00645         <span class="keyword">virtual</span> <span class="keyword">const</span> epdf* _e() <span class="keyword">const</span> =0;
-<a name="l00647"></a>00647 
-<a name="l00648"></a>00648 };
-<a name="l00649"></a>00649 
-<a name="l00659"></a><a class="code" href="classbdm_1_1BMcond.html">00659</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1BMcond.html" title="Conditional Bayesian Filter.">BMcond</a> :<span class="keyword">public</span> <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a> {
-<a name="l00660"></a>00660 <span class="keyword">protected</span>:
-<a name="l00662"></a><a class="code" href="classbdm_1_1BMcond.html#1164a90f782a2a323b1ee17242100b39">00662</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1BMcond.html#1164a90f782a2a323b1ee17242100b39" title="dimension of the conditioning variable">dimc</a>;
-<a name="l00664"></a><a class="code" href="classbdm_1_1BMcond.html#9a12750776d977408aada06a70093297">00664</a>         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1BMcond.html#9a12750776d977408aada06a70093297" title="Identificator of the conditioning variable.">rvc</a>;
-<a name="l00665"></a>00665 <span class="keyword">public</span>:
-<a name="l00667"></a>00667         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1BMcond.html#a67bac171f89ef18d0191f8f74189f25" title="Substitute val for rvc.">condition</a> ( <span class="keyword">const</span> vec &amp;val ) =0;
-<a name="l00669"></a><a class="code" href="classbdm_1_1BMcond.html#ecf4a1c5d2bbb28105564ef3d278c40b">00669</a>         <a class="code" href="classbdm_1_1BMcond.html#ecf4a1c5d2bbb28105564ef3d278c40b" title="Default constructor.">BMcond</a> ( ) :<a class="code" href="classbdm_1_1BMcond.html#9a12750776d977408aada06a70093297" title="Identificator of the conditioning variable.">rvc</a> ( ) {};
-<a name="l00671"></a><a class="code" href="classbdm_1_1BMcond.html#7d68d46cfcc36f9cc07a15a5403b5a1a">00671</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1BMcond.html#7d68d46cfcc36f9cc07a15a5403b5a1a" title="Destructor for future use.">~BMcond</a>() {};
-<a name="l00673"></a><a class="code" href="classbdm_1_1BMcond.html#7506910f93250b44fea505ec4ffb19dc">00673</a>         <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>&amp; <a class="code" href="classbdm_1_1BMcond.html#7506910f93250b44fea505ec4ffb19dc" title="access function">_rvc</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1BMcond.html#9a12750776d977408aada06a70093297" title="Identificator of the conditioning variable.">rvc</a>;}
-<a name="l00674"></a>00674 };
-<a name="l00675"></a>00675 
-<a name="l00676"></a>00676 }; <span class="comment">//namespace</span>
-<a name="l00677"></a>00677 <span class="preprocessor">#endif // BM_H</span>
+<a name="l00630"></a>00630         <a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a> () :<a class="code" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a" title="Logarithm of marginalized data likelihood.">ll</a> ( 0 ),<a class="code" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a> ( true ), <a class="code" href="classbdm_1_1BM.html#109c1a626a69031658e3a44e9e500cca" title="IDs of storages in loggers.">LIDs</a> ( 3 ), <a class="code" href="classbdm_1_1BM.html#a5e0000d2c9df99b029eceff222f7d77" title="Option for logging bounds.">opt_L_bounds</a> ( false ) {};
+<a name="l00631"></a>00631         <a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a> &amp;B ) :  <a class="code" href="classbdm_1_1BM.html#c400357e37d27a4834b2b1d9211009ed" title="Random variable of the data (optional).">drv</a> ( B.<a class="code" href="classbdm_1_1BM.html#c400357e37d27a4834b2b1d9211009ed" title="Random variable of the data (optional).">drv</a> ), <a class="code" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a" title="Logarithm of marginalized data likelihood.">ll</a> ( B.<a class="code" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a" title="Logarithm of marginalized data likelihood.">ll</a> ), <a class="code" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a> ( B.<a class="code" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a> ) {}
+<a name="l00634"></a><a class="code" href="classbdm_1_1BM.html#40f01563651c1e4fe926189e41a6b8ab">00634</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a>* <a class="code" href="classbdm_1_1BM.html#40f01563651c1e4fe926189e41a6b8ab">_copy_</a> ()<span class="keyword"> const </span>{<span class="keywordflow">return</span> NULL;};
+<a name="l00636"></a>00636 
+<a name="l00639"></a>00639 
+<a name="l00643"></a>00643         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1BM.html#60b1779a577367c369a932cabd3a6188" title="Incremental Bayes rule.">bayes</a> ( <span class="keyword">const</span> vec &amp;dt ) = 0;
+<a name="l00645"></a>00645         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1BM.html#1dee3fddaf021e62d925289660a707dc" title="Batch Bayes rule (columns of Dt are observations).">bayesB</a> ( <span class="keyword">const</span> mat &amp;Dt );
+<a name="l00648"></a><a class="code" href="classbdm_1_1BM.html#50257e0c1e5b5c73153ea6e716ad8ae0">00648</a>         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1BM.html#50257e0c1e5b5c73153ea6e716ad8ae0">logpred</a> ( <span class="keyword">const</span> vec &amp;dt )<span class="keyword"> const</span>{it_error ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> 0.0;}
+<a name="l00650"></a><a class="code" href="classbdm_1_1BM.html#0e8ebe61fb14990abe1254bd3dda5fae">00650</a>         vec <a class="code" href="classbdm_1_1BM.html#0e8ebe61fb14990abe1254bd3dda5fae" title="Matrix version of logpred.">logpred_m</a> ( <span class="keyword">const</span> mat &amp;dt )<span class="keyword"> const</span>{vec tmp ( dt.cols() );<span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i&lt;dt.cols();i++ ) {tmp ( i ) =<a class="code" href="classbdm_1_1BM.html#50257e0c1e5b5c73153ea6e716ad8ae0">logpred</a> ( dt.get_col ( i ) );}<span class="keywordflow">return</span> tmp;}
+<a name="l00651"></a>00651 
+<a name="l00653"></a><a class="code" href="classbdm_1_1BM.html#688d7a2aced1e06aa1c468d73a9e5eba">00653</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* <a class="code" href="classbdm_1_1BM.html#688d7a2aced1e06aa1c468d73a9e5eba" title="Constructs a predictive density .">epredictor</a> ( )<span class="keyword"> const </span>{it_error ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> NULL;};
+<a name="l00655"></a><a class="code" href="classbdm_1_1BM.html#598b25e3f3d96a5bc00a5faeb5b3c912">00655</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a>* <a class="code" href="classbdm_1_1BM.html#598b25e3f3d96a5bc00a5faeb5b3c912" title="Constructs a conditional density 1-step ahead predictor.">predictor</a> ( )<span class="keyword"> const </span>{it_error ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> NULL;};
+<a name="l00657"></a>00657 
+<a name="l00662"></a>00662 
+<a name="l00664"></a><a class="code" href="classbdm_1_1BM.html#de95c590d650b2db423d53992f0906cb">00664</a>         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1BM.html#de95c590d650b2db423d53992f0906cb" title="Name of extension variable.">rvc</a>;
+<a name="l00666"></a><a class="code" href="classbdm_1_1BM.html#b5e8e016be16e4029c789063cb3f3b33">00666</a>         <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>&amp; <a class="code" href="classbdm_1_1BM.html#b5e8e016be16e4029c789063cb3f3b33" title="access function">_rvc</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1BM.html#de95c590d650b2db423d53992f0906cb" title="Name of extension variable.">rvc</a>;}
+<a name="l00667"></a>00667 
+<a name="l00669"></a><a class="code" href="classbdm_1_1BM.html#6799f4b16a6a59ed58b1d0d6e17116f4">00669</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1BM.html#6799f4b16a6a59ed58b1d0d6e17116f4" title="Substitute val for rvc.">condition</a> ( <span class="keyword">const</span> vec &amp;val ) {it_error ( <span class="stringliteral">"Not implemented!"</span> );};
+<a name="l00670"></a>00670 
+<a name="l00672"></a>00672 
+<a name="l00673"></a>00673 
+<a name="l00676"></a>00676 
+<a name="l00677"></a>00677         <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>&amp; _drv()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1BM.html#c400357e37d27a4834b2b1d9211009ed" title="Random variable of the data (optional).">drv</a>;}
+<a name="l00678"></a>00678         <span class="keywordtype">void</span> set_drv ( <span class="keyword">const</span> RV &amp;rv ) {<a class="code" href="classbdm_1_1BM.html#c400357e37d27a4834b2b1d9211009ed" title="Random variable of the data (optional).">drv</a>=rv;}
+<a name="l00679"></a>00679         <span class="keywordtype">void</span> set_rv ( <span class="keyword">const</span> RV &amp;rv ) {<span class="keyword">const_cast&lt;</span>epdf&amp;<span class="keyword">&gt;</span> ( posterior() ).set_rv ( rv );}
+<a name="l00680"></a>00680         <span class="keywordtype">double</span> _ll()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a" title="Logarithm of marginalized data likelihood.">ll</a>;}
+<a name="l00681"></a>00681         <span class="keywordtype">void</span> set_evalll ( <span class="keywordtype">bool</span> evl0 ) {<a class="code" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>=evl0;}
+<a name="l00682"></a>00682         <span class="keyword">virtual</span> <span class="keyword">const</span> epdf&amp; posterior() <span class="keyword">const</span> =0;
+<a name="l00683"></a>00683         <span class="keyword">virtual</span> <span class="keyword">const</span> epdf* _e() <span class="keyword">const</span> =0;
+<a name="l00685"></a>00685 
+<a name="l00688"></a>00688 
+<a name="l00690"></a><a class="code" href="classbdm_1_1BM.html#224dd68a83c1472b43163763fa93c477">00690</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1BM.html#224dd68a83c1472b43163763fa93c477" title="Set boolean options from a string.">set_options</a> ( <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;opt ) {
+<a name="l00691"></a>00691                 <a class="code" href="classbdm_1_1BM.html#a5e0000d2c9df99b029eceff222f7d77" title="Option for logging bounds.">opt_L_bounds</a>= ( opt.find ( <span class="stringliteral">"logbounds"</span> ) !=string::npos );
+<a name="l00692"></a>00692         }
+<a name="l00694"></a><a class="code" href="classbdm_1_1BM.html#109c1a626a69031658e3a44e9e500cca">00694</a>         ivec <a class="code" href="classbdm_1_1BM.html#109c1a626a69031658e3a44e9e500cca" title="IDs of storages in loggers.">LIDs</a>;
+<a name="l00695"></a>00695 
+<a name="l00697"></a><a class="code" href="classbdm_1_1BM.html#a5e0000d2c9df99b029eceff222f7d77">00697</a>         <span class="keywordtype">bool</span> <a class="code" href="classbdm_1_1BM.html#a5e0000d2c9df99b029eceff222f7d77" title="Option for logging bounds.">opt_L_bounds</a>;
+<a name="l00699"></a><a class="code" href="classbdm_1_1BM.html#aa5d1f7e638db229403e3917bf155ee3">00699</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1BM.html#aa5d1f7e638db229403e3917bf155ee3" title="Add all logged variables to a logger.">log_add</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> *L, <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;name=<span class="stringliteral">""</span> ) {
+<a name="l00700"></a>00700                 <span class="comment">// internal</span>
+<a name="l00701"></a>00701                 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> r;
+<a name="l00702"></a>00702                 <span class="keywordflow">if</span> ( posterior().isnamed() ) {r=posterior().<a class="code" href="classbdm_1_1epdf.html#a4ab378d5e004c3ff3e2d4e64f7bba21" title="Return name (fails when isnamed is false).">_rv</a>();}
+<a name="l00703"></a>00703                 <span class="keywordflow">else</span>{r=<a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> ( <span class="stringliteral">"est"</span>, posterior().dimension() );};
+<a name="l00704"></a>00704 
+<a name="l00705"></a>00705                 <span class="comment">// Add mean value</span>
+<a name="l00706"></a>00706                 <a class="code" href="classbdm_1_1BM.html#109c1a626a69031658e3a44e9e500cca" title="IDs of storages in loggers.">LIDs</a> ( 0 ) =L-&gt;<a class="code" href="classbdm_1_1logger.html#cfb4807e20b3d00f3d33e55ada528dc1">add</a> ( r,name );
+<a name="l00707"></a>00707                 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1BM.html#a5e0000d2c9df99b029eceff222f7d77" title="Option for logging bounds.">opt_L_bounds</a> ) {
+<a name="l00708"></a>00708                         <a class="code" href="classbdm_1_1BM.html#109c1a626a69031658e3a44e9e500cca" title="IDs of storages in loggers.">LIDs</a> ( 1 ) =L-&gt;<a class="code" href="classbdm_1_1logger.html#cfb4807e20b3d00f3d33e55ada528dc1">add</a> ( r,name+<span class="stringliteral">"_lb"</span> );
+<a name="l00709"></a>00709                         <a class="code" href="classbdm_1_1BM.html#109c1a626a69031658e3a44e9e500cca" title="IDs of storages in loggers.">LIDs</a> ( 2 ) =L-&gt;<a class="code" href="classbdm_1_1logger.html#cfb4807e20b3d00f3d33e55ada528dc1">add</a> ( r,name+<span class="stringliteral">"_ub"</span> );
+<a name="l00710"></a>00710                 }
+<a name="l00711"></a>00711         }
+<a name="l00712"></a>00712         <span class="keywordtype">void</span> logit ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> *L ) {
+<a name="l00713"></a>00713                 L-&gt;<a class="code" href="classbdm_1_1logger.html#397c014b0aaf3581516e2a105d26a5c9" title="log this vector">logit</a> ( <a class="code" href="classbdm_1_1BM.html#109c1a626a69031658e3a44e9e500cca" title="IDs of storages in loggers.">LIDs</a> ( 0 ), posterior().mean() );
+<a name="l00714"></a>00714                 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1BM.html#a5e0000d2c9df99b029eceff222f7d77" title="Option for logging bounds.">opt_L_bounds</a> ) {
+<a name="l00715"></a>00715                         vec ub,lb;
+<a name="l00716"></a>00716                         posterior().<a class="code" href="classbdm_1_1epdf.html#0a7705e80601957f7226d333a0a6d539" title="Lower and upper bounds of percentage % quantile, returns mean-2*sigma as default...">qbounds</a>(lb,ub);
+<a name="l00717"></a>00717                         L-&gt;<a class="code" href="classbdm_1_1logger.html#397c014b0aaf3581516e2a105d26a5c9" title="log this vector">logit</a> ( <a class="code" href="classbdm_1_1BM.html#109c1a626a69031658e3a44e9e500cca" title="IDs of storages in loggers.">LIDs</a> ( 1 ), lb );
+<a name="l00718"></a>00718                         L-&gt;<a class="code" href="classbdm_1_1logger.html#397c014b0aaf3581516e2a105d26a5c9" title="log this vector">logit</a> ( <a class="code" href="classbdm_1_1BM.html#109c1a626a69031658e3a44e9e500cca" title="IDs of storages in loggers.">LIDs</a> ( 2 ), ub );
+<a name="l00719"></a>00719                 }
+<a name="l00720"></a>00720         }
+<a name="l00722"></a>00722 };
+<a name="l00723"></a>00723 
+<a name="l00724"></a>00724 }; <span class="comment">//namespace</span>
+<a name="l00725"></a>00725 <span class="preprocessor">#endif // BM_H</span>
 </pre></div></div>
-<hr size="1"><address style="text-align: right;"><small>Generated on Wed Feb 18 17:38:39 2009 for mixpp by&nbsp;
+<hr size="1"><address style="text-align: right;"><small>Generated on Wed Mar 4 18:50:10 2009 for mixpp by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
