Index: doc/html/libBM_8h-source.html
===================================================================
--- doc/html/libBM_8h-source.html (revision 255)
+++ doc/html/libBM_8h-source.html (revision 261)
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
-<title>mixpp: work/git/mixpp/bdm/stat/libBM.h Source File</title>
+<title>mixpp: libBM.h Source File</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
@@ -12,13 +12,14 @@
       <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
       <li><a href="modules.html"><span>Modules</span></a></li>
-      <li><a href="annotated.html"><span>Classes</span></a></li>
+      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
+      <li><a href="classes.html"><span>Classes</span></a></li>
       <li class="current"><a href="files.html"><span>Files</span></a></li>
     </ul>
   </div>
-<h1>work/git/mixpp/bdm/stat/libBM.h</h1><a href="libBM_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
+<h1>libBM.h</h1><a href="libBM_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
 <a name="l00017"></a>00017 <span class="preprocessor">#ifndef BM_H</span>
 <a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define BM_H</span>
 <a name="l00019"></a>00019 <span class="preprocessor"></span>
-<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;itpp/itbase.h&gt;</span>
+<a name="l00020"></a>00020 
 <a name="l00021"></a>00021 <span class="preprocessor">#include "../itpp_ext.h"</span>
 <a name="l00022"></a>00022 <span class="comment">//#include &lt;std&gt;</span>
@@ -27,296 +28,299 @@
 <a name="l00025"></a>00025 <span class="keyword">using namespace </span>itpp;
 <a name="l00026"></a>00026 
-<a name="l00028"></a><a class="code" href="classbdm_1_1base.html">00028</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1base.html" title="Root class of BDM objects.">base</a>{};
-<a name="l00029"></a>00029 
-<a name="l00031"></a><a class="code" href="classbdm_1_1str.html">00031</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1str.html" title="Structure of RV (used internally), i.e. expanded RVs.">str</a> {
-<a name="l00032"></a>00032 <span class="keyword">public</span>:
-<a name="l00034"></a><a class="code" href="classbdm_1_1str.html#64675a73fc7324177175f19b3baeb0b0">00034</a>         ivec <a class="code" href="classbdm_1_1str.html#64675a73fc7324177175f19b3baeb0b0" title="vector id ids (non-unique!)">ids</a>;
-<a name="l00036"></a><a class="code" href="classbdm_1_1str.html#905dc0f240e40432c103708c4a34f80a">00036</a>         ivec <a class="code" href="classbdm_1_1str.html#905dc0f240e40432c103708c4a34f80a" title="vector of times">times</a>;
-<a name="l00038"></a><a class="code" href="classbdm_1_1str.html#7c6b9dccc6814d7bd1e8e2208a0d3f3f">00038</a>         <a class="code" href="classbdm_1_1str.html#7c6b9dccc6814d7bd1e8e2208a0d3f3f" title="Default constructor.">str</a> ( ivec ids0, ivec times0 ) :<a class="code" href="classbdm_1_1str.html#64675a73fc7324177175f19b3baeb0b0" title="vector id ids (non-unique!)">ids</a> ( ids0 ),<a class="code" href="classbdm_1_1str.html#905dc0f240e40432c103708c4a34f80a" title="vector of times">times</a> ( times0 ) {
-<a name="l00039"></a>00039                 it_assert_debug ( times0.length() ==ids0.length(),<span class="stringliteral">"Incompatible input"</span> );
-<a name="l00040"></a>00040         };
-<a name="l00041"></a>00041 };
-<a name="l00042"></a>00042 
-<a name="l00049"></a><a class="code" href="classbdm_1_1RV.html">00049</a> <span class="keyword">class </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_1base.html" title="Root class of BDM objects.">base</a>{
-<a name="l00050"></a>00050 <span class="keyword">protected</span>:
-<a name="l00052"></a><a class="code" href="classbdm_1_1RV.html#38203096d950671def44de8cf1c6bb2e">00052</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1RV.html#38203096d950671def44de8cf1c6bb2e" title="size = sum of sizes">tsize</a>;
-<a name="l00054"></a><a class="code" href="classbdm_1_1RV.html#b11bfdceb831ed30d33b852dd4a6b385">00054</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1RV.html#b11bfdceb831ed30d33b852dd4a6b385" title="len = number of individual rvs">len</a>;
-<a name="l00056"></a><a class="code" href="classbdm_1_1RV.html#0a9a4769ab5a322495bea0cd8091500b">00056</a>         ivec <a class="code" href="classbdm_1_1RV.html#0a9a4769ab5a322495bea0cd8091500b" title="Vector of unique IDs.">ids</a>;
-<a name="l00058"></a><a class="code" href="classbdm_1_1RV.html#0112d25045f6f8fabdc9e821029928ee">00058</a>         ivec <a class="code" href="classbdm_1_1RV.html#0112d25045f6f8fabdc9e821029928ee" title="Vector of sizes.">sizes</a>;
-<a name="l00060"></a><a class="code" href="classbdm_1_1RV.html#ef6703854820bbf61736738f1bac6896">00060</a>         ivec <a class="code" href="classbdm_1_1RV.html#ef6703854820bbf61736738f1bac6896" title="Vector of shifts from current time.">times</a>;
-<a name="l00062"></a><a class="code" href="classbdm_1_1RV.html#9a87c46918c3c0db0bdca854a48a44aa">00062</a>         Array&lt;std::string&gt; <a class="code" href="classbdm_1_1RV.html#9a87c46918c3c0db0bdca854a48a44aa" title="Array of names.">names</a>;
-<a name="l00063"></a>00063 
-<a name="l00064"></a>00064 <span class="keyword">private</span>:
-<a name="l00066"></a>00066         <span class="keywordtype">void</span> init ( ivec in_ids, Array&lt;std::string&gt; in_names, ivec in_sizes, ivec in_times );
-<a name="l00067"></a>00067 <span class="keyword">public</span>:
-<a name="l00069"></a>00069         <a class="code" href="classbdm_1_1RV.html#e319ca900261a5005a9b4b353ec16412" title="Constructor of empty RV.">RV</a> ( Array&lt;std::string&gt; in_names, ivec in_sizes, ivec in_times );
-<a name="l00071"></a>00071         <a class="code" href="classbdm_1_1RV.html#e319ca900261a5005a9b4b353ec16412" title="Constructor of empty RV.">RV</a> ( Array&lt;std::string&gt; in_names, ivec in_sizes );
-<a name="l00073"></a>00073         <a class="code" href="classbdm_1_1RV.html#e319ca900261a5005a9b4b353ec16412" title="Constructor of empty RV.">RV</a> ( Array&lt;std::string&gt; in_names );
-<a name="l00075"></a>00075         <a class="code" href="classbdm_1_1RV.html#e319ca900261a5005a9b4b353ec16412" title="Constructor of empty RV.">RV</a> ();
-<a name="l00076"></a>00076 
-<a name="l00078"></a>00078         <span class="keyword">friend</span> std::ostream &amp;<a class="code" href="classbdm_1_1RV.html#cad6f15535d10437f6690cb4492176a8" title="Printing output e.g. for debugging.">operator&lt;&lt; </a>( std::ostream &amp;os, <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 name="l00079"></a>00079 
-<a name="l00081"></a><a class="code" href="classbdm_1_1RV.html#2174751a00ce19f941edd2c1a861be67">00081</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1RV.html#2174751a00ce19f941edd2c1a861be67" title="Return number of scalars in the RV.">count</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1RV.html#38203096d950671def44de8cf1c6bb2e" title="size = sum of sizes">tsize</a>;} ;
-<a name="l00083"></a><a class="code" href="classbdm_1_1RV.html#e9ec8c3e756651ff352ab5e3d3acda4b">00083</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1RV.html#e9ec8c3e756651ff352ab5e3d3acda4b" title="Return length (number of entries) of the RV.">length</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1RV.html#b11bfdceb831ed30d33b852dd4a6b385" title="len = number of individual rvs">len</a>;} ;
-<a name="l00084"></a>00084 
-<a name="l00085"></a>00085         <span class="comment">//TODO why not inline and later??</span>
+<a name="l00028"></a><a class="code" href="classbdm_1_1bdmroot.html">00028</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a>{
+<a name="l00029"></a>00029         <span class="keyword">virtual</span> <span class="keywordtype">void</span> print(){}
+<a name="l00030"></a>00030 };
+<a name="l00031"></a>00031 
+<a name="l00033"></a><a class="code" href="classbdm_1_1str.html">00033</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1str.html" title="Structure of RV (used internally), i.e. expanded RVs.">str</a> {
+<a name="l00034"></a>00034 <span class="keyword">public</span>:
+<a name="l00036"></a><a class="code" href="classbdm_1_1str.html#64675a73fc7324177175f19b3baeb0b0">00036</a>         ivec <a class="code" href="classbdm_1_1str.html#64675a73fc7324177175f19b3baeb0b0" title="vector id ids (non-unique!)">ids</a>;
+<a name="l00038"></a><a class="code" href="classbdm_1_1str.html#905dc0f240e40432c103708c4a34f80a">00038</a>         ivec <a class="code" href="classbdm_1_1str.html#905dc0f240e40432c103708c4a34f80a" title="vector of times">times</a>;
+<a name="l00040"></a><a class="code" href="classbdm_1_1str.html#7c6b9dccc6814d7bd1e8e2208a0d3f3f">00040</a>         <a class="code" href="classbdm_1_1str.html#7c6b9dccc6814d7bd1e8e2208a0d3f3f" title="Default constructor.">str</a> ( ivec ids0, ivec times0 ) :<a class="code" href="classbdm_1_1str.html#64675a73fc7324177175f19b3baeb0b0" title="vector id ids (non-unique!)">ids</a> ( ids0 ),<a class="code" href="classbdm_1_1str.html#905dc0f240e40432c103708c4a34f80a" title="vector of times">times</a> ( times0 ) {
+<a name="l00041"></a>00041                 it_assert_debug ( times0.length() ==ids0.length(),<span class="stringliteral">"Incompatible input"</span> );
+<a name="l00042"></a>00042         };
+<a name="l00043"></a>00043 };
+<a name="l00044"></a>00044 
+<a name="l00051"></a><a class="code" href="classbdm_1_1RV.html">00051</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> :<span class="keyword">public</span> <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a>{
+<a name="l00052"></a>00052 <span class="keyword">protected</span>:
+<a name="l00054"></a><a class="code" href="classbdm_1_1RV.html#38203096d950671def44de8cf1c6bb2e">00054</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1RV.html#38203096d950671def44de8cf1c6bb2e" title="size = sum of sizes">tsize</a>;
+<a name="l00056"></a><a class="code" href="classbdm_1_1RV.html#b11bfdceb831ed30d33b852dd4a6b385">00056</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1RV.html#b11bfdceb831ed30d33b852dd4a6b385" title="len = number of individual rvs">len</a>;
+<a name="l00058"></a><a class="code" href="classbdm_1_1RV.html#0a9a4769ab5a322495bea0cd8091500b">00058</a>         ivec <a class="code" href="classbdm_1_1RV.html#0a9a4769ab5a322495bea0cd8091500b" title="Vector of unique IDs.">ids</a>;
+<a name="l00060"></a><a class="code" href="classbdm_1_1RV.html#0112d25045f6f8fabdc9e821029928ee">00060</a>         ivec <a class="code" href="classbdm_1_1RV.html#0112d25045f6f8fabdc9e821029928ee" title="Vector of sizes.">sizes</a>;
+<a name="l00062"></a><a class="code" href="classbdm_1_1RV.html#ef6703854820bbf61736738f1bac6896">00062</a>         ivec <a class="code" href="classbdm_1_1RV.html#ef6703854820bbf61736738f1bac6896" title="Vector of shifts from current time.">times</a>;
+<a name="l00064"></a><a class="code" href="classbdm_1_1RV.html#9a87c46918c3c0db0bdca854a48a44aa">00064</a>         Array&lt;std::string&gt; <a class="code" href="classbdm_1_1RV.html#9a87c46918c3c0db0bdca854a48a44aa" title="Array of names.">names</a>;
+<a name="l00065"></a>00065 
+<a name="l00066"></a>00066 <span class="keyword">private</span>:
+<a name="l00068"></a>00068         <span class="keywordtype">void</span> init ( ivec in_ids, Array&lt;std::string&gt; in_names, ivec in_sizes, ivec in_times );
+<a name="l00069"></a>00069 <span class="keyword">public</span>:
+<a name="l00071"></a>00071         <a class="code" href="classbdm_1_1RV.html#e319ca900261a5005a9b4b353ec16412" title="Constructor of empty RV.">RV</a> ( Array&lt;std::string&gt; in_names, ivec in_sizes, ivec in_times );
+<a name="l00073"></a>00073         <a class="code" href="classbdm_1_1RV.html#e319ca900261a5005a9b4b353ec16412" title="Constructor of empty RV.">RV</a> ( Array&lt;std::string&gt; in_names, ivec in_sizes );
+<a name="l00075"></a>00075         <a class="code" href="classbdm_1_1RV.html#e319ca900261a5005a9b4b353ec16412" title="Constructor of empty RV.">RV</a> ( Array&lt;std::string&gt; in_names );
+<a name="l00077"></a>00077         <a class="code" href="classbdm_1_1RV.html#e319ca900261a5005a9b4b353ec16412" title="Constructor of empty RV.">RV</a> ();
+<a name="l00078"></a>00078 
+<a name="l00080"></a>00080         <span class="keyword">friend</span> std::ostream &amp;<a class="code" href="classbdm_1_1RV.html#cad6f15535d10437f6690cb4492176a8" title="Printing output e.g. for debugging.">operator&lt;&lt; </a>( std::ostream &amp;os, <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 name="l00081"></a>00081 
+<a name="l00083"></a><a class="code" href="classbdm_1_1RV.html#2174751a00ce19f941edd2c1a861be67">00083</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1RV.html#2174751a00ce19f941edd2c1a861be67" title="Return number of scalars in the RV.">count</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1RV.html#38203096d950671def44de8cf1c6bb2e" title="size = sum of sizes">tsize</a>;} ;
+<a name="l00085"></a><a class="code" href="classbdm_1_1RV.html#e9ec8c3e756651ff352ab5e3d3acda4b">00085</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1RV.html#e9ec8c3e756651ff352ab5e3d3acda4b" title="Return length (number of entries) of the RV.">length</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1RV.html#b11bfdceb831ed30d33b852dd4a6b385" title="len = number of individual rvs">len</a>;} ;
 <a name="l00086"></a>00086 
-<a name="l00088"></a>00088         ivec <a class="code" href="classbdm_1_1RV.html#1367055b2608ad9d50d01a2da6cec869" title="Find indexes of self in another rv,.">findself</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;rv2 ) <span class="keyword">const</span>;
-<a name="l00090"></a>00090         <span class="keywordtype">bool</span> <a class="code" href="classbdm_1_1RV.html#3bb011af88ae98f5c97955bb2c95cfee" title="Compare if rv2 is identical to this RV.">equal</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;rv2 ) <span class="keyword">const</span>;
-<a name="l00092"></a>00092         <span class="keywordtype">bool</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;rv2 );
-<a name="l00094"></a>00094         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1RV.html#aec44dabdf0a6d90fbae95e1356eda39" title="Subtract another variable from the current one.">subt</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;rv2 ) <span class="keyword">const</span>;
-<a name="l00096"></a>00096         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1RV.html#c0c04ab99ded62e1e05bcefb151ebeb9" title="Select only variables at indeces ind.">subselect</a> ( <span class="keyword">const</span> ivec &amp;ind ) <span class="keyword">const</span>;
-<a name="l00098"></a>00098         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1RV.html#6f3daf0f857fff53a1c0a445fe160966" title="Select only variables at indeces ind.">operator() </a>( <span class="keyword">const</span> ivec &amp;ind ) <span class="keyword">const</span>;
-<a name="l00100"></a>00100         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1RV.html#bd77cb0899f7fba1d0e34396137b7f1f" title="Shift time shifted by delta.">t</a> ( <span class="keywordtype">int</span> delta );
-<a name="l00102"></a>00102         <a class="code" href="classbdm_1_1str.html" title="Structure of RV (used internally), i.e. expanded RVs.">str</a> <a class="code" href="classbdm_1_1RV.html#8bdd7f4072749c7cc864b78a418ca388" title="generate str from rv, by expanding sizes">tostr</a>() <span class="keyword">const</span>;
-<a name="l00105"></a>00105         ivec <a class="code" href="classbdm_1_1RV.html#cbebdb5e0d30101a6eb63550ef701c55">dataind</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;crv ) <span class="keyword">const</span>;
-<a name="l00108"></a>00108         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1RV.html#cbebdb5e0d30101a6eb63550ef701c55">dataind</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;rv2, ivec &amp;selfi, ivec &amp;rv2i ) <span class="keyword">const</span>;
-<a name="l00109"></a>00109 
-<a name="l00111"></a><a class="code" href="classbdm_1_1RV.html#ae0c6e729851a43c82a5b1c199474ef2">00111</a>         Array&lt;std::string&gt;&amp; <a class="code" href="classbdm_1_1RV.html#ae0c6e729851a43c82a5b1c199474ef2" title="access function">_names</a>() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1RV.html#9a87c46918c3c0db0bdca854a48a44aa" title="Array of names.">names</a>;};
-<a name="l00112"></a>00112 
-<a name="l00114"></a><a class="code" href="classbdm_1_1RV.html#172390b8525ef5aac684228241fff7b5">00114</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1RV.html#172390b8525ef5aac684228241fff7b5" title="access function">id</a> ( <span class="keywordtype">int</span> at ) {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1RV.html#0a9a4769ab5a322495bea0cd8091500b" title="Vector of unique IDs.">ids</a> ( at );};
-<a name="l00116"></a><a class="code" href="classbdm_1_1RV.html#8e64d02005a02aef72f214286977d8de">00116</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1RV.html#8e64d02005a02aef72f214286977d8de" title="access function">size</a> ( <span class="keywordtype">int</span> at ) {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1RV.html#0112d25045f6f8fabdc9e821029928ee" title="Vector of sizes.">sizes</a> ( at );};
-<a name="l00118"></a><a class="code" href="classbdm_1_1RV.html#aff4de8185750b506492623847520518">00118</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1RV.html#aff4de8185750b506492623847520518" title="access function">time</a> ( <span class="keywordtype">int</span> at ) {<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="l00120"></a><a class="code" href="classbdm_1_1RV.html#d05af87595cfb7fa2e0fadeae5597fa8">00120</a>         std::string <a class="code" href="classbdm_1_1RV.html#d05af87595cfb7fa2e0fadeae5597fa8" title="access function">name</a> ( <span class="keywordtype">int</span> at ) {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1RV.html#9a87c46918c3c0db0bdca854a48a44aa" title="Array of names.">names</a> ( at );};
-<a name="l00121"></a>00121 
-<a name="l00123"></a><a class="code" href="classbdm_1_1RV.html#602cea0aecebc5146d81657df5127543">00123</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1RV.html#602cea0aecebc5146d81657df5127543" title="access function">set_id</a> ( <span class="keywordtype">int</span> at, <span class="keywordtype">int</span> id0 ) {<a class="code" href="classbdm_1_1RV.html#0a9a4769ab5a322495bea0cd8091500b" title="Vector of unique IDs.">ids</a> ( at ) =id0;};
-<a name="l00125"></a><a class="code" href="classbdm_1_1RV.html#0b2c9e73ff66847c3644ebc3eb559a03">00125</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1RV.html#0b2c9e73ff66847c3644ebc3eb559a03" title="access function">set_size</a> ( <span class="keywordtype">int</span> at, <span class="keywordtype">int</span> size0 ) {<a class="code" href="classbdm_1_1RV.html#0112d25045f6f8fabdc9e821029928ee" title="Vector of sizes.">sizes</a> ( at ) =size0; <a class="code" href="classbdm_1_1RV.html#38203096d950671def44de8cf1c6bb2e" title="size = sum of sizes">tsize</a>=sum ( <a class="code" href="classbdm_1_1RV.html#0112d25045f6f8fabdc9e821029928ee" title="Vector of sizes.">sizes</a> );};
-<a name="l00127"></a><a class="code" href="classbdm_1_1RV.html#fb2892d12dc978549e9491aed327dfd4">00127</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1RV.html#fb2892d12dc978549e9491aed327dfd4" title="access function">set_time</a> ( <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="l00128"></a>00128 
-<a name="l00130"></a>00130         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1RV.html#176e9c0c35b51fee0ad8813a39883a63" title="Assign unused ids to this rv.">newids</a>();
-<a name="l00131"></a>00131 };
+<a name="l00087"></a>00087         <span class="comment">//TODO why not inline and later??</span>
+<a name="l00088"></a>00088 
+<a name="l00090"></a>00090         ivec <a class="code" href="classbdm_1_1RV.html#1367055b2608ad9d50d01a2da6cec869" title="Find indexes of self in another rv,.">findself</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;rv2 ) <span class="keyword">const</span>;
+<a name="l00092"></a>00092         <span class="keywordtype">bool</span> <a class="code" href="classbdm_1_1RV.html#3bb011af88ae98f5c97955bb2c95cfee" title="Compare if rv2 is identical to this RV.">equal</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;rv2 ) <span class="keyword">const</span>;
+<a name="l00094"></a>00094         <span class="keywordtype">bool</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;rv2 );
+<a name="l00096"></a>00096         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1RV.html#aec44dabdf0a6d90fbae95e1356eda39" title="Subtract another variable from the current one.">subt</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;rv2 ) <span class="keyword">const</span>;
+<a name="l00098"></a>00098         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1RV.html#c0c04ab99ded62e1e05bcefb151ebeb9" title="Select only variables at indeces ind.">subselect</a> ( <span class="keyword">const</span> ivec &amp;ind ) <span class="keyword">const</span>;
+<a name="l00100"></a>00100         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1RV.html#6f3daf0f857fff53a1c0a445fe160966" title="Select only variables at indeces ind.">operator() </a>( <span class="keyword">const</span> ivec &amp;ind ) <span class="keyword">const</span>;
+<a name="l00102"></a>00102         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1RV.html#bd77cb0899f7fba1d0e34396137b7f1f" title="Shift time shifted by delta.">t</a> ( <span class="keywordtype">int</span> delta );
+<a name="l00104"></a>00104         <a class="code" href="classbdm_1_1str.html" title="Structure of RV (used internally), i.e. expanded RVs.">str</a> <a class="code" href="classbdm_1_1RV.html#8bdd7f4072749c7cc864b78a418ca388" title="generate str from rv, by expanding sizes">tostr</a>() <span class="keyword">const</span>;
+<a name="l00107"></a>00107         ivec <a class="code" href="classbdm_1_1RV.html#cbebdb5e0d30101a6eb63550ef701c55">dataind</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;crv ) <span class="keyword">const</span>;
+<a name="l00110"></a>00110         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1RV.html#cbebdb5e0d30101a6eb63550ef701c55">dataind</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;rv2, ivec &amp;selfi, ivec &amp;rv2i ) <span class="keyword">const</span>;
+<a name="l00112"></a><a class="code" href="classbdm_1_1RV.html#8bfda300b769a05598c55cb94fe61f52">00112</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1RV.html#8bfda300b769a05598c55cb94fe61f52" title="Minimum time-offset.">mint</a> () {<span class="keywordflow">return</span> min(<a class="code" href="classbdm_1_1RV.html#ef6703854820bbf61736738f1bac6896" title="Vector of shifts from current time.">times</a>);};
+<a name="l00113"></a>00113 
+<a name="l00115"></a><a class="code" href="classbdm_1_1RV.html#ae0c6e729851a43c82a5b1c199474ef2">00115</a>         Array&lt;std::string&gt;&amp; <a class="code" href="classbdm_1_1RV.html#ae0c6e729851a43c82a5b1c199474ef2" title="access function">_names</a>() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1RV.html#9a87c46918c3c0db0bdca854a48a44aa" title="Array of names.">names</a>;};
+<a name="l00116"></a>00116 
+<a name="l00118"></a><a class="code" href="classbdm_1_1RV.html#172390b8525ef5aac684228241fff7b5">00118</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1RV.html#172390b8525ef5aac684228241fff7b5" title="access function">id</a> ( <span class="keywordtype">int</span> at ) {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1RV.html#0a9a4769ab5a322495bea0cd8091500b" title="Vector of unique IDs.">ids</a> ( at );};
+<a name="l00120"></a><a class="code" href="classbdm_1_1RV.html#8e64d02005a02aef72f214286977d8de">00120</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1RV.html#8e64d02005a02aef72f214286977d8de" title="access function">size</a> ( <span class="keywordtype">int</span> at ) {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1RV.html#0112d25045f6f8fabdc9e821029928ee" title="Vector of sizes.">sizes</a> ( at );};
+<a name="l00122"></a><a class="code" href="classbdm_1_1RV.html#aff4de8185750b506492623847520518">00122</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1RV.html#aff4de8185750b506492623847520518" title="access function">time</a> ( <span class="keywordtype">int</span> at ) {<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="l00124"></a><a class="code" href="classbdm_1_1RV.html#d05af87595cfb7fa2e0fadeae5597fa8">00124</a>         std::string <a class="code" href="classbdm_1_1RV.html#d05af87595cfb7fa2e0fadeae5597fa8" title="access function">name</a> ( <span class="keywordtype">int</span> at ) {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1RV.html#9a87c46918c3c0db0bdca854a48a44aa" title="Array of names.">names</a> ( at );};
+<a name="l00125"></a>00125 
+<a name="l00127"></a><a class="code" href="classbdm_1_1RV.html#602cea0aecebc5146d81657df5127543">00127</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1RV.html#602cea0aecebc5146d81657df5127543" title="access function">set_id</a> ( <span class="keywordtype">int</span> at, <span class="keywordtype">int</span> id0 ) {<a class="code" href="classbdm_1_1RV.html#0a9a4769ab5a322495bea0cd8091500b" title="Vector of unique IDs.">ids</a> ( at ) =id0;};
+<a name="l00129"></a><a class="code" href="classbdm_1_1RV.html#0b2c9e73ff66847c3644ebc3eb559a03">00129</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1RV.html#0b2c9e73ff66847c3644ebc3eb559a03" title="access function">set_size</a> ( <span class="keywordtype">int</span> at, <span class="keywordtype">int</span> size0 ) {<a class="code" href="classbdm_1_1RV.html#0112d25045f6f8fabdc9e821029928ee" title="Vector of sizes.">sizes</a> ( at ) =size0; <a class="code" href="classbdm_1_1RV.html#38203096d950671def44de8cf1c6bb2e" title="size = sum of sizes">tsize</a>=sum ( <a class="code" href="classbdm_1_1RV.html#0112d25045f6f8fabdc9e821029928ee" title="Vector of sizes.">sizes</a> );};
+<a name="l00131"></a><a class="code" href="classbdm_1_1RV.html#fb2892d12dc978549e9491aed327dfd4">00131</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1RV.html#fb2892d12dc978549e9491aed327dfd4" title="access function">set_time</a> ( <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="l00132"></a>00132 
-<a name="l00134"></a>00134 RV concat ( <span class="keyword">const</span> RV &amp;rv1, <span class="keyword">const</span> RV &amp;rv2 );
-<a name="l00135"></a>00135 
-<a name="l00137"></a>00137 <span class="keyword">extern</span> RV RV0;
-<a name="l00138"></a>00138 
-<a name="l00140"></a>00140 
-<a name="l00141"></a><a class="code" href="classbdm_1_1fnc.html">00141</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1fnc.html" title="Class representing function  of variable  represented by rv.">fnc</a> :<a class="code" href="classbdm_1_1base.html" title="Root class of BDM objects.">base</a>{
-<a name="l00142"></a>00142 <span class="keyword">protected</span>:
-<a name="l00144"></a><a class="code" href="classbdm_1_1fnc.html#52156cb4a52a62d51fc7455985797a62">00144</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1fnc.html#52156cb4a52a62d51fc7455985797a62" title="Length of the output vector.">dimy</a>;
-<a name="l00145"></a>00145 <span class="keyword">public</span>:
-<a name="l00147"></a><a class="code" href="classbdm_1_1fnc.html#d3667c337c88a1c51f672688d8070409">00147</a>         <a class="code" href="classbdm_1_1fnc.html#d3667c337c88a1c51f672688d8070409" title="default constructor">fnc</a> ( <span class="keywordtype">int</span> dy ) :<a class="code" href="classbdm_1_1fnc.html#52156cb4a52a62d51fc7455985797a62" title="Length of the output vector.">dimy</a> ( dy ) {};
-<a name="l00149"></a><a class="code" href="classbdm_1_1fnc.html#6277b11d7fffc7ef8a2fa3e84ae5bad4">00149</a>         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1fnc.html#6277b11d7fffc7ef8a2fa3e84ae5bad4" title="function evaluates numerical value of  at  cond ">eval</a> ( <span class="keyword">const</span> vec &amp;cond ) {
-<a name="l00150"></a>00150                 <span class="keywordflow">return</span> vec ( 0 );
-<a name="l00151"></a>00151         };
-<a name="l00152"></a>00152         
-<a name="l00154"></a><a class="code" href="classbdm_1_1fnc.html#0786e40fade2663a70d654c1dda5d73e">00154</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="l00155"></a>00155 
-<a name="l00157"></a><a class="code" href="classbdm_1_1fnc.html#a2277a400fc9f4d6c0bf24dc7156183f">00157</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="l00158"></a>00158 
-<a name="l00160"></a><a class="code" href="classbdm_1_1fnc.html#66455bb4154dcf871964e30a637386d1">00160</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1fnc.html#66455bb4154dcf871964e30a637386d1" title="Destructor for future use;.">~fnc</a>() {};
-<a name="l00161"></a>00161 };
+<a name="l00134"></a>00134         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1RV.html#176e9c0c35b51fee0ad8813a39883a63" title="Assign unused ids to this rv.">newids</a>();
+<a name="l00135"></a>00135 };
+<a name="l00136"></a>00136 
+<a name="l00138"></a>00138 RV <a class="code" href="namespacebdm.html#b9016687c0e874ca5cdcf75ae28811aa" title="Concat two random variables.">concat</a> ( <span class="keyword">const</span> RV &amp;rv1, <span class="keyword">const</span> RV &amp;rv2 );
+<a name="l00139"></a>00139 
+<a name="l00141"></a>00141 <span class="keyword">extern</span> RV <a class="code" href="namespacebdm.html#bdd4760f14ec7d6fea083aa2170f6236" title="Default empty RV that can be used as default argument.">RV0</a>;
+<a name="l00142"></a>00142 
+<a name="l00144"></a>00144 
+<a name="l00145"></a><a class="code" href="classbdm_1_1fnc.html">00145</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1fnc.html" title="Class representing function  of variable  represented by rv.">fnc</a> :<span class="keyword">public</span> <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a>{
+<a name="l00146"></a>00146 <span class="keyword">protected</span>:
+<a name="l00148"></a><a class="code" href="classbdm_1_1fnc.html#52156cb4a52a62d51fc7455985797a62">00148</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1fnc.html#52156cb4a52a62d51fc7455985797a62" title="Length of the output vector.">dimy</a>;
+<a name="l00149"></a>00149 <span class="keyword">public</span>:
+<a name="l00151"></a><a class="code" href="classbdm_1_1fnc.html#d3667c337c88a1c51f672688d8070409">00151</a>         <a class="code" href="classbdm_1_1fnc.html#d3667c337c88a1c51f672688d8070409" title="default constructor">fnc</a> ( <span class="keywordtype">int</span> dy ) :<a class="code" href="classbdm_1_1fnc.html#52156cb4a52a62d51fc7455985797a62" title="Length of the output vector.">dimy</a> ( dy ) {};
+<a name="l00153"></a><a class="code" href="classbdm_1_1fnc.html#6277b11d7fffc7ef8a2fa3e84ae5bad4">00153</a>         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1fnc.html#6277b11d7fffc7ef8a2fa3e84ae5bad4" title="function evaluates numerical value of  at  cond ">eval</a> ( <span class="keyword">const</span> vec &amp;cond ) {
+<a name="l00154"></a>00154                 <span class="keywordflow">return</span> vec ( 0 );
+<a name="l00155"></a>00155         };
+<a name="l00156"></a>00156         
+<a name="l00158"></a><a class="code" href="classbdm_1_1fnc.html#0786e40fade2663a70d654c1dda5d73e">00158</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="l00159"></a>00159 
+<a name="l00161"></a><a class="code" href="classbdm_1_1fnc.html#a2277a400fc9f4d6c0bf24dc7156183f">00161</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="l00162"></a>00162 
-<a name="l00163"></a>00163 <span class="keyword">class </span>mpdf;
-<a name="l00164"></a>00164 
+<a name="l00164"></a><a class="code" href="classbdm_1_1fnc.html#66455bb4154dcf871964e30a637386d1">00164</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1fnc.html#66455bb4154dcf871964e30a637386d1" title="Destructor for future use;.">~fnc</a>() {};
+<a name="l00165"></a>00165 };
 <a name="l00166"></a>00166 
-<a name="l00167"></a><a class="code" href="classbdm_1_1epdf.html">00167</a> <span class="keyword">class </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_1base.html" title="Root class of BDM objects.">base</a> {
-<a name="l00168"></a>00168 <span class="keyword">protected</span>:
-<a name="l00170"></a><a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8">00170</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_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Identified of the random variable.">rv</a>;
-<a name="l00171"></a>00171 <span class="keyword">public</span>:
-<a name="l00173"></a><a class="code" href="classbdm_1_1epdf.html#992f3de956fb3439c62225156aafb6f6">00173</a>         <a class="code" href="classbdm_1_1epdf.html#992f3de956fb3439c62225156aafb6f6" title="default constructor">epdf</a>() :<a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Identified of the random variable.">rv</a> ( ) {};
-<a name="l00174"></a>00174 
-<a name="l00176"></a><a class="code" href="classbdm_1_1epdf.html#fdfed7aa18f2870951888b1dde977415">00176</a>         <a class="code" href="classbdm_1_1epdf.html#992f3de956fb3439c62225156aafb6f6" title="default constructor">epdf</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="Identified of the random variable.">rv</a> ( rv0 ) {};
-<a name="l00177"></a>00177 
-<a name="l00178"></a>00178 <span class="comment">//      //! Returns the required moment of the epdf</span>
-<a name="l00179"></a>00179 <span class="comment">//      virtual vec moment ( const int order = 1 );</span>
-<a name="l00180"></a>00180 
-<a name="l00182"></a>00182         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1epdf.html#09721eb148bc49d6ec2f1956039f3a10" title="Returns a sample,  from density .">sample</a> () <span class="keyword">const</span> =0;
-<a name="l00184"></a>00184         <span class="keyword">virtual</span> mat <a class="code" href="classbdm_1_1epdf.html#b4cf45fd83cc7573ede9fe1215256058" title="Returns N samples from density .">sample_m</a> ( <span class="keywordtype">int</span> N ) <span class="keyword">const</span>;
-<a name="l00185"></a>00185         
-<a name="l00187"></a>00187         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1epdf.html#a8e39e2ff5e5cf5471bc159530d3b2d3" title="Compute log-probability of argument val.">evallog</a> ( <span class="keyword">const</span> vec &amp;val ) <span class="keyword">const</span> =0;
-<a name="l00188"></a>00188 
-<a name="l00190"></a><a class="code" href="classbdm_1_1epdf.html#34956d4dd3176eeb5937cf48a1546b62">00190</a>         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1epdf.html#34956d4dd3176eeb5937cf48a1546b62" title="Compute log-probability of multiple values argument val.">evallog_m</a> ( <span class="keyword">const</span> mat &amp;Val )<span class="keyword"> const </span>{
-<a name="l00191"></a>00191                 vec x ( Val.cols() );
-<a name="l00192"></a>00192                 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i&lt;Val.cols();i++ ) {x ( i ) =<a class="code" href="classbdm_1_1epdf.html#a8e39e2ff5e5cf5471bc159530d3b2d3" title="Compute log-probability of argument val.">evallog</a> ( Val.get_col ( i ) ) ;}
-<a name="l00193"></a>00193                 <span class="keywordflow">return</span> x;
-<a name="l00194"></a>00194         }
-<a name="l00196"></a><a class="code" href="classbdm_1_1epdf.html#e584eac5579c1b6384947ecf66166c77">00196</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_1epdf.html#e584eac5579c1b6384947ecf66166c77" title="Return conditional density on the given RV, the remaining rvs will be in conditioning...">condition</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#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Identified of the random variable.">rv</a> )<span class="keyword"> const  </span>{it_warning ( <span class="stringliteral">"Not implemented"</span> ); <span class="keywordflow">return</span> NULL;}
-<a name="l00198"></a><a class="code" href="classbdm_1_1epdf.html#3fb2ece54f720b62ad325e61214fa0a1">00198</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_1epdf.html#3fb2ece54f720b62ad325e61214fa0a1" title="Return marginal density on the given RV, the remainig rvs are intergrated out.">marginal</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#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Identified of the random variable.">rv</a> )<span class="keyword"> const </span>{it_warning ( <span class="stringliteral">"Not implemented"</span> ); <span class="keywordflow">return</span> NULL;}
-<a name="l00199"></a>00199 
-<a name="l00201"></a>00201         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1epdf.html#565300f603ca00c989e16389d9eb42f5" title="return expected value">mean</a>() <span class="keyword">const</span> =0;
-<a name="l00202"></a>00202 
-<a name="l00204"></a>00204         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1epdf.html#45c2b64faa4bf526799e4154a6ec6097" title="return expected variance (not covariance!)">variance</a>() <span class="keyword">const</span> = 0;
-<a name="l00205"></a>00205         
-<a name="l00207"></a><a class="code" href="classbdm_1_1epdf.html#a4fa8637e7307cb051c400c2ce0ca0c8">00207</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1epdf.html#a4fa8637e7307cb051c400c2ce0ca0c8" title="Destructor for future use;.">~epdf</a>() {};
-<a name="l00209"></a><a class="code" href="classbdm_1_1epdf.html#a4ab378d5e004c3ff3e2d4e64f7bba21">00209</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="access function, possibly dangerous!">_rv</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Identified of the random variable.">rv</a>;}
-<a name="l00211"></a><a class="code" href="classbdm_1_1epdf.html#62e88cbce0ce77a8692f5e15d76e805f">00211</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1epdf.html#62e88cbce0ce77a8692f5e15d76e805f" title="modifier function - useful when copying epdfs">_renewrv</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;in_rv ) {<a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Identified of the random variable.">rv</a>=in_rv;}
-<a name="l00213"></a>00213 };
-<a name="l00214"></a>00214 
-<a name="l00215"></a>00215 
-<a name="l00217"></a>00217 <span class="comment">//TODO Samplecond can be generalized</span>
+<a name="l00167"></a>00167 <span class="keyword">class </span>mpdf;
+<a name="l00168"></a>00168 
+<a name="l00170"></a>00170 
+<a name="l00171"></a><a class="code" href="classbdm_1_1epdf.html">00171</a> <span class="keyword">class </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">public</span> <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a> {
+<a name="l00172"></a>00172 <span class="keyword">protected</span>:
+<a name="l00174"></a><a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8">00174</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_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Identified of the random variable.">rv</a>;
+<a name="l00175"></a>00175 <span class="keyword">public</span>:
+<a name="l00177"></a><a class="code" href="classbdm_1_1epdf.html#992f3de956fb3439c62225156aafb6f6">00177</a>         <a class="code" href="classbdm_1_1epdf.html#992f3de956fb3439c62225156aafb6f6" title="default constructor">epdf</a>() :<a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Identified of the random variable.">rv</a> ( ) {};
+<a name="l00178"></a>00178 
+<a name="l00180"></a><a class="code" href="classbdm_1_1epdf.html#fdfed7aa18f2870951888b1dde977415">00180</a>         <a class="code" href="classbdm_1_1epdf.html#992f3de956fb3439c62225156aafb6f6" title="default constructor">epdf</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="Identified of the random variable.">rv</a> ( rv0 ) {};
+<a name="l00181"></a>00181 
+<a name="l00182"></a>00182 <span class="comment">//      //! Returns the required moment of the epdf</span>
+<a name="l00183"></a>00183 <span class="comment">//      virtual vec moment ( const int order = 1 );</span>
+<a name="l00184"></a>00184 
+<a name="l00186"></a>00186         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1epdf.html#09721eb148bc49d6ec2f1956039f3a10" title="Returns a sample,  from density .">sample</a> () <span class="keyword">const</span> =0;
+<a name="l00188"></a>00188         <span class="keyword">virtual</span> mat <a class="code" href="classbdm_1_1epdf.html#b4cf45fd83cc7573ede9fe1215256058" title="Returns N samples from density .">sample_m</a> ( <span class="keywordtype">int</span> N ) <span class="keyword">const</span>;
+<a name="l00189"></a>00189         
+<a name="l00191"></a>00191         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1epdf.html#a8e39e2ff5e5cf5471bc159530d3b2d3" title="Compute log-probability of argument val.">evallog</a> ( <span class="keyword">const</span> vec &amp;val ) <span class="keyword">const</span> =0;
+<a name="l00192"></a>00192 
+<a name="l00194"></a><a class="code" href="classbdm_1_1epdf.html#34956d4dd3176eeb5937cf48a1546b62">00194</a>         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1epdf.html#34956d4dd3176eeb5937cf48a1546b62" title="Compute log-probability of multiple values argument val.">evallog_m</a> ( <span class="keyword">const</span> mat &amp;Val )<span class="keyword"> const </span>{
+<a name="l00195"></a>00195                 vec x ( Val.cols() );
+<a name="l00196"></a>00196                 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i&lt;Val.cols();i++ ) {x ( i ) =<a class="code" href="classbdm_1_1epdf.html#a8e39e2ff5e5cf5471bc159530d3b2d3" title="Compute log-probability of argument val.">evallog</a> ( Val.get_col ( i ) ) ;}
+<a name="l00197"></a>00197                 <span class="keywordflow">return</span> x;
+<a name="l00198"></a>00198         }
+<a name="l00200"></a><a class="code" href="classbdm_1_1epdf.html#e584eac5579c1b6384947ecf66166c77">00200</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_1epdf.html#e584eac5579c1b6384947ecf66166c77" title="Return conditional density on the given RV, the remaining rvs will be in conditioning...">condition</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#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Identified of the random variable.">rv</a> )<span class="keyword"> const  </span>{it_warning ( <span class="stringliteral">"Not implemented"</span> ); <span class="keywordflow">return</span> NULL;}
+<a name="l00202"></a><a class="code" href="classbdm_1_1epdf.html#3fb2ece54f720b62ad325e61214fa0a1">00202</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_1epdf.html#3fb2ece54f720b62ad325e61214fa0a1" title="Return marginal density on the given RV, the remainig rvs are intergrated out.">marginal</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#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Identified of the random variable.">rv</a> )<span class="keyword"> const </span>{it_warning ( <span class="stringliteral">"Not implemented"</span> ); <span class="keywordflow">return</span> NULL;}
+<a name="l00203"></a>00203 
+<a name="l00205"></a>00205         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1epdf.html#565300f603ca00c989e16389d9eb42f5" title="return expected value">mean</a>() <span class="keyword">const</span> =0;
+<a name="l00206"></a>00206 
+<a name="l00208"></a>00208         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1epdf.html#45c2b64faa4bf526799e4154a6ec6097" title="return expected variance (not covariance!)">variance</a>() <span class="keyword">const</span> = 0;
+<a name="l00209"></a>00209         
+<a name="l00211"></a><a class="code" href="classbdm_1_1epdf.html#a4fa8637e7307cb051c400c2ce0ca0c8">00211</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1epdf.html#a4fa8637e7307cb051c400c2ce0ca0c8" title="Destructor for future use;.">~epdf</a>() {};
+<a name="l00213"></a><a class="code" href="classbdm_1_1epdf.html#a4ab378d5e004c3ff3e2d4e64f7bba21">00213</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="access function, possibly dangerous!">_rv</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Identified of the random variable.">rv</a>;}
+<a name="l00215"></a><a class="code" href="classbdm_1_1epdf.html#62e88cbce0ce77a8692f5e15d76e805f">00215</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1epdf.html#62e88cbce0ce77a8692f5e15d76e805f" title="modifier function - useful when copying epdfs">_renewrv</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;in_rv ) {<a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Identified of the random variable.">rv</a>=in_rv;}
+<a name="l00217"></a>00217 };
 <a name="l00218"></a>00218 
-<a name="l00219"></a><a class="code" href="classbdm_1_1mpdf.html">00219</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> {
-<a name="l00220"></a>00220 <span class="keyword">protected</span>:
-<a name="l00222"></a><a class="code" href="classbdm_1_1mpdf.html#9bcfb45435d30983f436d41c298cbb51">00222</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#9bcfb45435d30983f436d41c298cbb51" title="modeled random variable">rv</a>;
-<a name="l00224"></a><a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288">00224</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="l00226"></a><a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0">00226</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="l00227"></a>00227 <span class="keyword">public</span>:
-<a name="l00228"></a>00228 
-<a name="l00230"></a><a class="code" href="classbdm_1_1mpdf.html#e4848a428d8ef0549c6e4a9ed386d9f2">00230</a>         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1mpdf.html#e4848a428d8ef0549c6e4a9ed386d9f2" title="Returns a sample from the density conditioned on cond, .">samplecond</a> ( <span class="keyword">const</span> vec &amp;cond, <span class="keywordtype">double</span> &amp;ll ) {
-<a name="l00231"></a>00231                 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="l00232"></a>00232                 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#09721eb148bc49d6ec2f1956039f3a10" title="Returns a sample,  from density .">sample</a>();
-<a name="l00233"></a>00233                 ll=<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#a8e39e2ff5e5cf5471bc159530d3b2d3" title="Compute log-probability of argument val.">evallog</a> ( temp );<span class="keywordflow">return</span> temp;
-<a name="l00234"></a>00234         };
-<a name="l00236"></a><a class="code" href="classbdm_1_1mpdf.html#ee26963a637b2ea1fb1933652981e652">00236</a>         <span class="keyword">virtual</span> mat <a class="code" href="classbdm_1_1mpdf.html#ee26963a637b2ea1fb1933652981e652" title="Returns.">samplecond_m</a> ( <span class="keyword">const</span> vec &amp;cond, vec &amp;ll, <span class="keywordtype">int</span> N ) {
-<a name="l00237"></a>00237                 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="l00238"></a>00238                 mat temp ( <a class="code" href="classbdm_1_1mpdf.html#9bcfb45435d30983f436d41c298cbb51" title="modeled random variable">rv</a>.<a class="code" href="classbdm_1_1RV.html#2174751a00ce19f941edd2c1a861be67" title="Return number of scalars in the RV.">count</a>(),N ); vec smp ( <a class="code" href="classbdm_1_1mpdf.html#9bcfb45435d30983f436d41c298cbb51" title="modeled random variable">rv</a>.<a class="code" href="classbdm_1_1RV.html#2174751a00ce19f941edd2c1a861be67" title="Return number of scalars in the RV.">count</a>() );
-<a name="l00239"></a>00239                 <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#09721eb148bc49d6ec2f1956039f3a10" title="Returns a sample,  from density .">sample</a>() ;temp.set_col ( i, smp );ll ( i ) =<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#a8e39e2ff5e5cf5471bc159530d3b2d3" title="Compute log-probability of argument val.">evallog</a> ( smp );}
-<a name="l00240"></a>00240                 <span class="keywordflow">return</span> temp;
-<a name="l00241"></a>00241         };
-<a name="l00243"></a><a class="code" href="classbdm_1_1mpdf.html#db94784a9aacf74c65c5a014f6743530">00243</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="l00244"></a>00244 
-<a name="l00246"></a><a class="code" href="classbdm_1_1mpdf.html#6336a8a72462e2a56a3989a220f18b1b">00246</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 ) {<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#a8e39e2ff5e5cf5471bc159530d3b2d3" 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="l00247"></a>00247         };
+<a name="l00219"></a>00219 
+<a name="l00221"></a>00221 <span class="comment">//TODO Samplecond can be generalized</span>
+<a name="l00222"></a>00222 
+<a name="l00223"></a><a class="code" href="classbdm_1_1mpdf.html">00223</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="l00224"></a>00224 <span class="keyword">protected</span>:
+<a name="l00226"></a><a class="code" href="classbdm_1_1mpdf.html#9bcfb45435d30983f436d41c298cbb51">00226</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#9bcfb45435d30983f436d41c298cbb51" title="modeled random variable">rv</a>;
+<a name="l00228"></a><a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288">00228</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="l00230"></a><a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0">00230</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="l00231"></a>00231 <span class="keyword">public</span>:
+<a name="l00232"></a>00232 
+<a name="l00234"></a><a class="code" href="classbdm_1_1mpdf.html#e4848a428d8ef0549c6e4a9ed386d9f2">00234</a>         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1mpdf.html#e4848a428d8ef0549c6e4a9ed386d9f2" title="Returns a sample from the density conditioned on cond, .">samplecond</a> ( <span class="keyword">const</span> vec &amp;cond, <span class="keywordtype">double</span> &amp;ll ) {
+<a name="l00235"></a>00235                 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="l00236"></a>00236                 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#09721eb148bc49d6ec2f1956039f3a10" title="Returns a sample,  from density .">sample</a>();
+<a name="l00237"></a>00237                 ll=<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#a8e39e2ff5e5cf5471bc159530d3b2d3" title="Compute log-probability of argument val.">evallog</a> ( temp );<span class="keywordflow">return</span> temp;
+<a name="l00238"></a>00238         };
+<a name="l00240"></a><a class="code" href="classbdm_1_1mpdf.html#ee26963a637b2ea1fb1933652981e652">00240</a>         <span class="keyword">virtual</span> mat <a class="code" href="classbdm_1_1mpdf.html#ee26963a637b2ea1fb1933652981e652" title="Returns.">samplecond_m</a> ( <span class="keyword">const</span> vec &amp;cond, vec &amp;ll, <span class="keywordtype">int</span> N ) {
+<a name="l00241"></a>00241                 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="l00242"></a>00242                 mat temp ( <a class="code" href="classbdm_1_1mpdf.html#9bcfb45435d30983f436d41c298cbb51" title="modeled random variable">rv</a>.<a class="code" href="classbdm_1_1RV.html#2174751a00ce19f941edd2c1a861be67" title="Return number of scalars in the RV.">count</a>(),N ); vec smp ( <a class="code" href="classbdm_1_1mpdf.html#9bcfb45435d30983f436d41c298cbb51" title="modeled random variable">rv</a>.<a class="code" href="classbdm_1_1RV.html#2174751a00ce19f941edd2c1a861be67" title="Return number of scalars in the RV.">count</a>() );
+<a name="l00243"></a>00243                 <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#09721eb148bc49d6ec2f1956039f3a10" title="Returns a sample,  from density .">sample</a>() ;temp.set_col ( i, smp );ll ( i ) =<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#a8e39e2ff5e5cf5471bc159530d3b2d3" title="Compute log-probability of argument val.">evallog</a> ( smp );}
+<a name="l00244"></a>00244                 <span class="keywordflow">return</span> temp;
+<a name="l00245"></a>00245         };
+<a name="l00247"></a><a class="code" href="classbdm_1_1mpdf.html#db94784a9aacf74c65c5a014f6743530">00247</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="l00248"></a>00248 
-<a name="l00250"></a><a class="code" href="classbdm_1_1mpdf.html#0b0ed1ed663071bb7cf4a1349eb94fcb">00250</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="l00251"></a>00251 
-<a name="l00253"></a><a class="code" href="classbdm_1_1mpdf.html#2d83cf2a5ba40cab11dfe158ced9ee9a">00253</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1mpdf.html#2d83cf2a5ba40cab11dfe158ced9ee9a" title="Destructor for future use;.">~mpdf</a>() {};
-<a name="l00254"></a>00254 
-<a name="l00256"></a><a class="code" href="classbdm_1_1mpdf.html#5fd998aa9e223231ab20f29762e594f7">00256</a>         <a class="code" href="classbdm_1_1mpdf.html#5fd998aa9e223231ab20f29762e594f7" title="Default constructor.">mpdf</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, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rvc0 ) :<a class="code" href="classbdm_1_1mpdf.html#9bcfb45435d30983f436d41c298cbb51" title="modeled random variable">rv</a> ( rv0 ),<a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a> ( rvc0 ) {};
-<a name="l00258"></a><a class="code" href="classbdm_1_1mpdf.html#b3aba7311038bf990d706a64cab60cf8">00258</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#b3aba7311038bf990d706a64cab60cf8" title="access function">_rvc</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a>;}
-<a name="l00260"></a><a class="code" href="classbdm_1_1mpdf.html#222d5280e309c5a053ba73841e98c151">00260</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#222d5280e309c5a053ba73841e98c151" title="access function">_rv</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1mpdf.html#9bcfb45435d30983f436d41c298cbb51" title="modeled random variable">rv</a>;}
-<a name="l00262"></a><a class="code" href="classbdm_1_1mpdf.html#1892fe3933488942253679f068e9e7f6">00262</a>         <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>&amp; <a class="code" href="classbdm_1_1mpdf.html#1892fe3933488942253679f068e9e7f6" title="access function">_epdf</a>() {<span class="keywordflow">return</span> *<a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>;}
-<a name="l00264"></a><a class="code" href="classbdm_1_1mpdf.html#05e843fd11c410a99dad2b88c55aca80">00264</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#05e843fd11c410a99dad2b88c55aca80" title="access function">_e</a>() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>;}
-<a name="l00265"></a>00265 };
-<a name="l00266"></a>00266 
-<a name="l00269"></a><a class="code" href="classbdm_1_1datalink__e2e.html">00269</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1datalink__e2e.html">datalink_e2e</a> {
-<a name="l00270"></a>00270 <span class="keyword">protected</span>:
-<a name="l00272"></a><a class="code" href="classbdm_1_1datalink__e2e.html#eb4ee03764c2531083ec19759b7a52d3">00272</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1datalink__e2e.html#eb4ee03764c2531083ec19759b7a52d3" title="Remember how long val should be.">valsize</a>;
-<a name="l00274"></a><a class="code" href="classbdm_1_1datalink__e2e.html#ed0830e7a13f4f0f4beaae939cf11f6b">00274</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1datalink__e2e.html#ed0830e7a13f4f0f4beaae939cf11f6b" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">valupsize</a>;
-<a name="l00276"></a><a class="code" href="classbdm_1_1datalink__e2e.html#fa38045c8f1230757d62d38e71a49b97">00276</a>         ivec <a class="code" href="classbdm_1_1datalink__e2e.html#fa38045c8f1230757d62d38e71a49b97" title="val-to-val link, indeces of the upper val">v2v_up</a>;
-<a name="l00277"></a>00277 <span class="keyword">public</span>:
-<a name="l00279"></a><a class="code" href="classbdm_1_1datalink__e2e.html#c85912b85a0a47ff0931d07e2d653264">00279</a>         <a class="code" href="classbdm_1_1datalink__e2e.html#c85912b85a0a47ff0931d07e2d653264" title="Constructor.">datalink_e2e</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="l00280"></a>00280                         <a class="code" href="classbdm_1_1datalink__e2e.html#eb4ee03764c2531083ec19759b7a52d3" title="Remember how long val should be.">valsize</a> ( rv.count() ), <a class="code" href="classbdm_1_1datalink__e2e.html#ed0830e7a13f4f0f4beaae939cf11f6b" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">valupsize</a> ( rv_up.count() ), <a class="code" href="classbdm_1_1datalink__e2e.html#fa38045c8f1230757d62d38e71a49b97" title="val-to-val link, indeces of the upper val">v2v_up</a> ( rv.dataind ( rv_up ) )  {
-<a name="l00281"></a>00281                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink__e2e.html#fa38045c8f1230757d62d38e71a49b97" title="val-to-val link, indeces of the upper val">v2v_up</a>.length() ==<a class="code" href="classbdm_1_1datalink__e2e.html#eb4ee03764c2531083ec19759b7a52d3" title="Remember how long val should be.">valsize</a>,<span class="stringliteral">"rv is not fully in rv_up"</span> );
-<a name="l00282"></a>00282         }
-<a name="l00284"></a><a class="code" href="classbdm_1_1datalink__e2e.html#4938c157340dc0dbc8f7bd3491678d86">00284</a>         vec <a class="code" href="classbdm_1_1datalink__e2e.html#4938c157340dc0dbc8f7bd3491678d86" title="Get val for myself from val of &amp;quot;Up&amp;quot;.">get_val</a> ( <span class="keyword">const</span> vec &amp;val_up ) {it_assert_debug ( <a class="code" href="classbdm_1_1datalink__e2e.html#ed0830e7a13f4f0f4beaae939cf11f6b" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">valupsize</a>==val_up.length(),<span class="stringliteral">"Wrong val_up"</span> ); <span class="keywordflow">return</span> get_vec ( val_up,<a class="code" href="classbdm_1_1datalink__e2e.html#fa38045c8f1230757d62d38e71a49b97" title="val-to-val link, indeces of the upper val">v2v_up</a> );}
-<a name="l00286"></a><a class="code" href="classbdm_1_1datalink__e2e.html#7646ec2f0f83bee2852e0fae6b0756a2">00286</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1datalink__e2e.html#7646ec2f0f83bee2852e0fae6b0756a2" title="Fill val of &amp;quot;Up&amp;quot; by my pieces.">fill_val</a> ( vec &amp;val_up, <span class="keyword">const</span> vec &amp;val ) {
-<a name="l00287"></a>00287                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink__e2e.html#eb4ee03764c2531083ec19759b7a52d3" title="Remember how long val should be.">valsize</a>==val.length(),<span class="stringliteral">"Wrong val"</span> );
-<a name="l00288"></a>00288                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink__e2e.html#ed0830e7a13f4f0f4beaae939cf11f6b" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">valupsize</a>==val_up.length(),<span class="stringliteral">"Wrong val_up"</span> );
-<a name="l00289"></a>00289                 set_subvector ( val_up, <a class="code" href="classbdm_1_1datalink__e2e.html#fa38045c8f1230757d62d38e71a49b97" title="val-to-val link, indeces of the upper val">v2v_up</a>, val );
-<a name="l00290"></a>00290         }
-<a name="l00291"></a>00291 };
-<a name="l00292"></a>00292 
-<a name="l00294"></a><a class="code" href="classbdm_1_1datalink__m2e.html">00294</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__e2e.html">datalink_e2e</a> {
-<a name="l00295"></a>00295 <span class="keyword">protected</span>:
-<a name="l00297"></a><a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9">00297</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="l00299"></a><a class="code" href="classbdm_1_1datalink__m2e.html#43fe3e2d7aa04134053ec15793722783">00299</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="l00301"></a><a class="code" href="classbdm_1_1datalink__m2e.html#9e0048d87bda78e9b8d38761440c7abc">00301</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="l00302"></a>00302 
-<a name="l00303"></a>00303 <span class="keyword">public</span>:
-<a name="l00305"></a><a class="code" href="classbdm_1_1datalink__m2e.html#31bb5b6cd04b4d99a02fc8d1ad5ce202">00305</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="l00306"></a>00306                         <a class="code" href="classbdm_1_1datalink__e2e.html">datalink_e2e</a> ( rv,rv_up ), <a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9" title="Remember how long cond should be.">condsize</a> ( rvc.count() ) {
-<a name="l00307"></a>00307                 <span class="comment">//establish v2c connection</span>
-<a name="l00308"></a>00308                 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="l00309"></a>00309         }
-<a name="l00311"></a><a class="code" href="classbdm_1_1datalink__m2e.html#7ba850822e3cf9a4b079afc7e7c01703">00311</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="l00312"></a>00312                 vec tmp ( <a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9" title="Remember how long cond should be.">condsize</a> );
-<a name="l00313"></a>00313                 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="l00314"></a>00314                 <span class="keywordflow">return</span> tmp;
-<a name="l00315"></a>00315         }
-<a name="l00316"></a>00316         <span class="keywordtype">void</span> fill_val_cond ( vec &amp;val_up, <span class="keyword">const</span> vec &amp;val, <span class="keyword">const</span> vec &amp;cond ) {
-<a name="l00317"></a>00317                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink__e2e.html#eb4ee03764c2531083ec19759b7a52d3" title="Remember how long val should be.">valsize</a>==val.length(),<span class="stringliteral">"Wrong val"</span> );
-<a name="l00318"></a>00318                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink__e2e.html#ed0830e7a13f4f0f4beaae939cf11f6b" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">valupsize</a>==val_up.length(),<span class="stringliteral">"Wrong val_up"</span> );
-<a name="l00319"></a>00319                 set_subvector ( val_up, <a class="code" href="classbdm_1_1datalink__e2e.html#fa38045c8f1230757d62d38e71a49b97" title="val-to-val link, indeces of the upper val">v2v_up</a>, val );
-<a name="l00320"></a>00320                 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="l00321"></a>00321         }
-<a name="l00322"></a>00322 };
-<a name="l00325"></a><a class="code" href="classbdm_1_1datalink__m2m.html">00325</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="l00326"></a>00326 <span class="keyword">protected</span>:
-<a name="l00328"></a><a class="code" href="classbdm_1_1datalink__m2m.html#d64dda6f92654628276bbcebb7600d0d">00328</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="l00330"></a><a class="code" href="classbdm_1_1datalink__m2m.html#0ea05c47de4538b7042ff878e6e309a5">00330</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="l00250"></a><a class="code" href="classbdm_1_1mpdf.html#6336a8a72462e2a56a3989a220f18b1b">00250</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 ) {<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#a8e39e2ff5e5cf5471bc159530d3b2d3" 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="l00251"></a>00251         };
+<a name="l00252"></a>00252 
+<a name="l00254"></a><a class="code" href="classbdm_1_1mpdf.html#0b0ed1ed663071bb7cf4a1349eb94fcb">00254</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="l00255"></a>00255 
+<a name="l00257"></a><a class="code" href="classbdm_1_1mpdf.html#2d83cf2a5ba40cab11dfe158ced9ee9a">00257</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1mpdf.html#2d83cf2a5ba40cab11dfe158ced9ee9a" title="Destructor for future use;.">~mpdf</a>() {};
+<a name="l00258"></a>00258 
+<a name="l00260"></a><a class="code" href="classbdm_1_1mpdf.html#5fd998aa9e223231ab20f29762e594f7">00260</a>         <a class="code" href="classbdm_1_1mpdf.html#5fd998aa9e223231ab20f29762e594f7" title="Default constructor.">mpdf</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, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rvc0 ) :<a class="code" href="classbdm_1_1mpdf.html#9bcfb45435d30983f436d41c298cbb51" title="modeled random variable">rv</a> ( rv0 ),<a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a> ( rvc0 ) {};
+<a name="l00262"></a><a class="code" href="classbdm_1_1mpdf.html#b3aba7311038bf990d706a64cab60cf8">00262</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#b3aba7311038bf990d706a64cab60cf8" title="access function">_rvc</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1mpdf.html#5a5f08950daa08b85b01ddf4e1c36288" title="random variable in condition">rvc</a>;}
+<a name="l00264"></a><a class="code" href="classbdm_1_1mpdf.html#222d5280e309c5a053ba73841e98c151">00264</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#222d5280e309c5a053ba73841e98c151" title="access function">_rv</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1mpdf.html#9bcfb45435d30983f436d41c298cbb51" title="modeled random variable">rv</a>;}
+<a name="l00266"></a><a class="code" href="classbdm_1_1mpdf.html#1892fe3933488942253679f068e9e7f6">00266</a>         <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>&amp; <a class="code" href="classbdm_1_1mpdf.html#1892fe3933488942253679f068e9e7f6" title="access function">_epdf</a>() {<span class="keywordflow">return</span> *<a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>;}
+<a name="l00268"></a><a class="code" href="classbdm_1_1mpdf.html#05e843fd11c410a99dad2b88c55aca80">00268</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#05e843fd11c410a99dad2b88c55aca80" title="access function">_e</a>() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>;}
+<a name="l00269"></a>00269 };
+<a name="l00270"></a>00270 
+<a name="l00297"></a><a class="code" href="classbdm_1_1datalink__e2e.html">00297</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1datalink__e2e.html" title="DataLink is a connection between two data vectors Up and Down.">datalink_e2e</a> {
+<a name="l00298"></a>00298 <span class="keyword">protected</span>:
+<a name="l00300"></a><a class="code" href="classbdm_1_1datalink__e2e.html#eb4ee03764c2531083ec19759b7a52d3">00300</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1datalink__e2e.html#eb4ee03764c2531083ec19759b7a52d3" title="Remember how long val should be.">valsize</a>;
+<a name="l00302"></a><a class="code" href="classbdm_1_1datalink__e2e.html#ed0830e7a13f4f0f4beaae939cf11f6b">00302</a>         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1datalink__e2e.html#ed0830e7a13f4f0f4beaae939cf11f6b" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">valupsize</a>;
+<a name="l00304"></a><a class="code" href="classbdm_1_1datalink__e2e.html#fa38045c8f1230757d62d38e71a49b97">00304</a>         ivec <a class="code" href="classbdm_1_1datalink__e2e.html#fa38045c8f1230757d62d38e71a49b97" title="val-to-val link, indeces of the upper val">v2v_up</a>;
+<a name="l00305"></a>00305 <span class="keyword">public</span>:
+<a name="l00307"></a><a class="code" href="classbdm_1_1datalink__e2e.html#c85912b85a0a47ff0931d07e2d653264">00307</a>         <a class="code" href="classbdm_1_1datalink__e2e.html#c85912b85a0a47ff0931d07e2d653264" title="Constructor.">datalink_e2e</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="l00308"></a>00308                         <a class="code" href="classbdm_1_1datalink__e2e.html#eb4ee03764c2531083ec19759b7a52d3" title="Remember how long val should be.">valsize</a> ( rv.count() ), <a class="code" href="classbdm_1_1datalink__e2e.html#ed0830e7a13f4f0f4beaae939cf11f6b" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">valupsize</a> ( rv_up.count() ), <a class="code" href="classbdm_1_1datalink__e2e.html#fa38045c8f1230757d62d38e71a49b97" title="val-to-val link, indeces of the upper val">v2v_up</a> ( rv.dataind ( rv_up ) )  {
+<a name="l00309"></a>00309                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink__e2e.html#fa38045c8f1230757d62d38e71a49b97" title="val-to-val link, indeces of the upper val">v2v_up</a>.length() ==<a class="code" href="classbdm_1_1datalink__e2e.html#eb4ee03764c2531083ec19759b7a52d3" title="Remember how long val should be.">valsize</a>,<span class="stringliteral">"rv is not fully in rv_up"</span> );
+<a name="l00310"></a>00310         }
+<a name="l00312"></a><a class="code" href="classbdm_1_1datalink__e2e.html#4938c157340dc0dbc8f7bd3491678d86">00312</a>         vec <a class="code" href="classbdm_1_1datalink__e2e.html#4938c157340dc0dbc8f7bd3491678d86" title="Get val for myself from val of &amp;quot;Up&amp;quot;.">get_val</a> ( <span class="keyword">const</span> vec &amp;val_up ) {it_assert_debug ( <a class="code" href="classbdm_1_1datalink__e2e.html#ed0830e7a13f4f0f4beaae939cf11f6b" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">valupsize</a>==val_up.length(),<span class="stringliteral">"Wrong val_up"</span> ); <span class="keywordflow">return</span> get_vec ( val_up,<a class="code" href="classbdm_1_1datalink__e2e.html#fa38045c8f1230757d62d38e71a49b97" title="val-to-val link, indeces of the upper val">v2v_up</a> );}
+<a name="l00314"></a><a class="code" href="classbdm_1_1datalink__e2e.html#7646ec2f0f83bee2852e0fae6b0756a2">00314</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1datalink__e2e.html#7646ec2f0f83bee2852e0fae6b0756a2" title="Fill val of &amp;quot;Up&amp;quot; by my pieces.">fill_val</a> ( vec &amp;val_up, <span class="keyword">const</span> vec &amp;val ) {
+<a name="l00315"></a>00315                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink__e2e.html#eb4ee03764c2531083ec19759b7a52d3" title="Remember how long val should be.">valsize</a>==val.length(),<span class="stringliteral">"Wrong val"</span> );
+<a name="l00316"></a>00316                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink__e2e.html#ed0830e7a13f4f0f4beaae939cf11f6b" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">valupsize</a>==val_up.length(),<span class="stringliteral">"Wrong val_up"</span> );
+<a name="l00317"></a>00317                 set_subvector ( val_up, <a class="code" href="classbdm_1_1datalink__e2e.html#fa38045c8f1230757d62d38e71a49b97" title="val-to-val link, indeces of the upper val">v2v_up</a>, val );
+<a name="l00318"></a>00318         }
+<a name="l00319"></a>00319 };
+<a name="l00320"></a>00320 
+<a name="l00322"></a><a class="code" href="classbdm_1_1datalink__m2e.html">00322</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__e2e.html" title="DataLink is a connection between two data vectors Up and Down.">datalink_e2e</a> {
+<a name="l00323"></a>00323 <span class="keyword">protected</span>:
+<a name="l00325"></a><a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9">00325</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="l00327"></a><a class="code" href="classbdm_1_1datalink__m2e.html#43fe3e2d7aa04134053ec15793722783">00327</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="l00329"></a><a class="code" href="classbdm_1_1datalink__m2e.html#9e0048d87bda78e9b8d38761440c7abc">00329</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="l00330"></a>00330 
 <a name="l00331"></a>00331 <span class="keyword">public</span>:
-<a name="l00333"></a><a class="code" href="classbdm_1_1datalink__m2m.html#540c4b60686fdf1a7915300ae11bc41b">00333</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="l00334"></a>00334                         <a class="code" href="classbdm_1_1datalink__m2e.html" title="data link between">datalink_m2e</a> ( rv, rvc, rv_up) {
-<a name="l00335"></a>00335                 <span class="comment">//establish c2c connection</span>
-<a name="l00336"></a>00336                 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="l00337"></a>00337                 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="l00338"></a>00338         }
-<a name="l00340"></a><a class="code" href="classbdm_1_1datalink__m2m.html#911fb7fcfa80d4e31db8e0cc03141a90">00340</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="l00341"></a>00341                 vec tmp ( <a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9" title="Remember how long cond should be.">condsize</a> );
-<a name="l00342"></a>00342                 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="l00343"></a>00343                 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="l00344"></a>00344                 <span class="keywordflow">return</span> tmp;
-<a name="l00345"></a>00345         }
-<a name="l00347"></a>00347 
-<a name="l00348"></a>00348 };
-<a name="l00349"></a>00349 
-<a name="l00353"></a><a class="code" href="classbdm_1_1mepdf.html">00353</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="l00354"></a>00354 <span class="keyword">public</span>:
-<a name="l00356"></a><a class="code" href="classbdm_1_1mepdf.html#27cc32d1a810516c25bda51ddf886376">00356</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> ( em-&gt;<a class="code" href="classbdm_1_1mpdf.html#222d5280e309c5a053ba73841e98c151" title="access function">_rv</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#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="l00357"></a><a class="code" href="classbdm_1_1mepdf.html#b2b898058169e7ed9a6dc7cd4e1c147c">00357</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="l00358"></a>00358 };
-<a name="l00359"></a>00359 
-<a name="l00362"></a><a class="code" href="classbdm_1_1compositepdf.html">00362</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1compositepdf.html" title="Abstract composition of pdfs, a base for specific classes this abstract class is...">compositepdf</a> {
-<a name="l00363"></a>00363 <span class="keyword">protected</span>:
-<a name="l00365"></a><a class="code" href="classbdm_1_1compositepdf.html#7ca3cd8ed92a7154f5b9ff13b1e9d52a">00365</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="l00367"></a><a class="code" href="classbdm_1_1compositepdf.html#23faf2debc4dde10836393b8c665914a">00367</a>         Array&lt;mpdf*&gt; <a class="code" href="classbdm_1_1compositepdf.html#23faf2debc4dde10836393b8c665914a" title="Elements of composition.">mpdfs</a>;
-<a name="l00368"></a>00368 <span class="keyword">public</span>:
-<a name="l00369"></a>00369         <a class="code" href="classbdm_1_1compositepdf.html" title="Abstract composition of pdfs, a base for specific classes this abstract class is...">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="l00371"></a>00371         <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="l00373"></a>00373         <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="l00374"></a>00374 };
+<a name="l00333"></a><a class="code" href="classbdm_1_1datalink__m2e.html#31bb5b6cd04b4d99a02fc8d1ad5ce202">00333</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="l00334"></a>00334                         <a class="code" href="classbdm_1_1datalink__e2e.html" title="DataLink is a connection between two data vectors Up and Down.">datalink_e2e</a> ( rv,rv_up ), <a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9" title="Remember how long cond should be.">condsize</a> ( rvc.count() ) {
+<a name="l00335"></a>00335                 <span class="comment">//establish v2c connection</span>
+<a name="l00336"></a>00336                 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="l00337"></a>00337         }
+<a name="l00339"></a><a class="code" href="classbdm_1_1datalink__m2e.html#7ba850822e3cf9a4b079afc7e7c01703">00339</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="l00340"></a>00340                 vec tmp ( <a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9" title="Remember how long cond should be.">condsize</a> );
+<a name="l00341"></a>00341                 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="l00342"></a>00342                 <span class="keywordflow">return</span> tmp;
+<a name="l00343"></a>00343         }
+<a name="l00344"></a>00344         <span class="keywordtype">void</span> fill_val_cond ( vec &amp;val_up, <span class="keyword">const</span> vec &amp;val, <span class="keyword">const</span> vec &amp;cond ) {
+<a name="l00345"></a>00345                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink__e2e.html#eb4ee03764c2531083ec19759b7a52d3" title="Remember how long val should be.">valsize</a>==val.length(),<span class="stringliteral">"Wrong val"</span> );
+<a name="l00346"></a>00346                 it_assert_debug ( <a class="code" href="classbdm_1_1datalink__e2e.html#ed0830e7a13f4f0f4beaae939cf11f6b" title="Remember how long val of &amp;quot;Up&amp;quot; should be.">valupsize</a>==val_up.length(),<span class="stringliteral">"Wrong val_up"</span> );
+<a name="l00347"></a>00347                 set_subvector ( val_up, <a class="code" href="classbdm_1_1datalink__e2e.html#fa38045c8f1230757d62d38e71a49b97" title="val-to-val link, indeces of the upper val">v2v_up</a>, val );
+<a name="l00348"></a>00348                 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="l00349"></a>00349         }
+<a name="l00350"></a>00350 };
+<a name="l00353"></a><a class="code" href="classbdm_1_1datalink__m2m.html">00353</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="l00354"></a>00354 <span class="keyword">protected</span>:
+<a name="l00356"></a><a class="code" href="classbdm_1_1datalink__m2m.html#d64dda6f92654628276bbcebb7600d0d">00356</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="l00358"></a><a class="code" href="classbdm_1_1datalink__m2m.html#0ea05c47de4538b7042ff878e6e309a5">00358</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="l00359"></a>00359 <span class="keyword">public</span>:
+<a name="l00361"></a><a class="code" href="classbdm_1_1datalink__m2m.html#540c4b60686fdf1a7915300ae11bc41b">00361</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="l00362"></a>00362                         <a class="code" href="classbdm_1_1datalink__m2e.html" title="data link between">datalink_m2e</a> ( rv, rvc, rv_up) {
+<a name="l00363"></a>00363                 <span class="comment">//establish c2c connection</span>
+<a name="l00364"></a>00364                 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="l00365"></a>00365                 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="l00366"></a>00366         }
+<a name="l00368"></a><a class="code" href="classbdm_1_1datalink__m2m.html#911fb7fcfa80d4e31db8e0cc03141a90">00368</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="l00369"></a>00369                 vec tmp ( <a class="code" href="classbdm_1_1datalink__m2e.html#3fb26525e0bfa7932a37c5cd404801f9" title="Remember how long cond should be.">condsize</a> );
+<a name="l00370"></a>00370                 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="l00371"></a>00371                 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="l00372"></a>00372                 <span class="keywordflow">return</span> tmp;
+<a name="l00373"></a>00373         }
 <a name="l00375"></a>00375 
-<a name="l00383"></a><a class="code" href="classbdm_1_1DS.html">00383</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> {
-<a name="l00384"></a>00384 <span class="keyword">protected</span>:
-<a name="l00386"></a><a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec">00386</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="Observed variables, returned by getdata().">Drv</a>;
-<a name="l00388"></a><a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702">00388</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="Action variables, accepted by write().">Urv</a>; <span class="comment">//</span>
-<a name="l00389"></a>00389 <span class="keyword">public</span>:
-<a name="l00390"></a>00390         <a class="code" href="classbdm_1_1DS.html" title="Abstract class for discrete-time sources of data.">DS</a>():<a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Observed variables, returned by getdata().">Drv</a>(RV0),<a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Action variables, accepted by write().">Urv</a>(RV0) {};
-<a name="l00392"></a>00392         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#cbffe794e02eb88b5856b83119b7c23c" title="Returns full vector of observed data.">getdata</a> ( vec &amp;dt );
-<a name="l00394"></a>00394         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#cbffe794e02eb88b5856b83119b7c23c" title="Returns full vector of observed data.">getdata</a> ( vec &amp;dt, ivec &amp;indeces );
-<a name="l00396"></a>00396         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#653a30e5bb76fb231429dae52216c851" title="Accepts action variable and schedule it for application.">write</a> ( vec &amp;ut );
-<a name="l00398"></a>00398         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#653a30e5bb76fb231429dae52216c851" title="Accepts action variable and schedule it for application.">write</a> ( vec &amp;ut, ivec &amp;indeces );
-<a name="l00404"></a>00404         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#edd136e9046c08ac615cbe3c741de21e" title="Method that assigns random variables to the datasource. Typically, the datasource...">linkrvs</a> ( <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;drv, <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;urv );
-<a name="l00405"></a>00405 
-<a name="l00407"></a>00407         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1DS.html#478b4438640c36e7dca1c269a31ff11e" title="Moves from  to , i.e. perfroms the actions and reads response of the system.">step</a>();
-<a name="l00408"></a>00408 
-<a name="l00409"></a>00409 };
-<a name="l00410"></a>00410 
-<a name="l00415"></a><a class="code" href="classbdm_1_1BM.html">00415</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> {
-<a name="l00416"></a>00416 <span class="keyword">protected</span>:
-<a name="l00418"></a><a class="code" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca">00418</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#18d6db4af8ee42077741d9e3618153ca" title="Random variable of the posterior.">rv</a>;
-<a name="l00420"></a><a class="code" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a">00420</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="l00422"></a><a class="code" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee">00422</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="l00423"></a>00423 <span class="keyword">public</span>:
-<a name="l00424"></a>00424 
-<a name="l00426"></a><a class="code" href="classbdm_1_1BM.html#a33000bb124c32e58742f056ecab4293">00426</a>         <a class="code" href="classbdm_1_1BM.html#a33000bb124c32e58742f056ecab4293" title="Default constructor.">BM</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, <span class="keywordtype">double</span> ll0=0,<span class="keywordtype">bool</span> evalll0=<span class="keyword">true</span> ) :<a class="code" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca" title="Random variable of the posterior.">rv</a> ( rv0 ), <a class="code" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a" title="Logarithm of marginalized data likelihood.">ll</a> ( ll0 ),<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> ( evalll0 ) {<span class="comment">//Fixme: test rv</span>
-<a name="l00427"></a>00427         };
-<a name="l00429"></a><a class="code" href="classbdm_1_1BM.html#241b3701190ff1f729fe873a2eef0055">00429</a>         <a class="code" href="classbdm_1_1BM.html#a33000bb124c32e58742f056ecab4293" title="Default constructor.">BM</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> &amp;B ) : <a class="code" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca" title="Random variable of the posterior.">rv</a> ( B.<a class="code" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca" title="Random variable of the posterior.">rv</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="l00430"></a>00430 
-<a name="l00434"></a>00434         <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="l00436"></a>00436         <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="l00438"></a>00438         <span class="keyword">virtual</span> <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>&amp; <a class="code" href="classbdm_1_1BM.html#963258c4c2dd05be001003b19aceefef" title="Returns a reference to the epdf representing posterior density on parameters.">_epdf</a>() <span class="keyword">const</span> =0;
-<a name="l00439"></a>00439 
-<a name="l00441"></a>00441         <span class="keyword">virtual</span> <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>* <a class="code" href="classbdm_1_1BM.html#4ed0f8b880e606316ae800f3a011c3a6" title="Returns a pointer to the epdf representing posterior density on parameters. Use with...">_e</a>() <span class="keyword">const</span> =0;
-<a name="l00442"></a>00442 
-<a name="l00445"></a><a class="code" href="classbdm_1_1BM.html#50257e0c1e5b5c73153ea6e716ad8ae0">00445</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="l00447"></a><a class="code" href="classbdm_1_1BM.html#0e8ebe61fb14990abe1254bd3dda5fae">00447</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="l00448"></a>00448 
-<a name="l00450"></a><a class="code" href="classbdm_1_1BM.html#710e7d69c0d8791fb41a7cd4683cca2c">00450</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#710e7d69c0d8791fb41a7cd4683cca2c" title="Constructs a predictive density (marginal density on data).">predictor</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#18d6db4af8ee42077741d9e3618153ca" title="Random variable of the posterior.">rv</a> )<span class="keyword"> const </span>{it_error ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> NULL;};
-<a name="l00451"></a>00451 
-<a name="l00453"></a><a class="code" href="classbdm_1_1BM.html#374281cad3caa16fa30609bb4ac16505">00453</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1BM.html#374281cad3caa16fa30609bb4ac16505" title="Destructor for future use;.">~BM</a>() {};
-<a name="l00455"></a><a class="code" href="classbdm_1_1BM.html#40a3c891996391e3135518053a917793">00455</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#40a3c891996391e3135518053a917793" title="access function">_rv</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca" title="Random variable of the posterior.">rv</a>;}
-<a name="l00457"></a><a class="code" href="classbdm_1_1BM.html#5be65d37dedfe33a3671e7065f523a70">00457</a>         <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1BM.html#5be65d37dedfe33a3671e7065f523a70" title="access function">_ll</a>()<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="l00459"></a><a class="code" href="classbdm_1_1BM.html#236b3abbcc93594fc97cd86d82c1a83f">00459</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1BM.html#236b3abbcc93594fc97cd86d82c1a83f" title="access function">set_evalll</a> ( <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="l00460"></a>00460 
-<a name="l00463"></a><a class="code" href="classbdm_1_1BM.html#3efb3098172f1f67564a312fe732473e">00463</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a>* <a class="code" href="classbdm_1_1BM.html#3efb3098172f1f67564a312fe732473e">_copy_</a> ( <span class="keywordtype">bool</span> changerv=<span class="keyword">false</span> ) {it_error ( <span class="stringliteral">"function _copy_ not implemented for this BM"</span> ); <span class="keywordflow">return</span> NULL;};
-<a name="l00464"></a>00464 };
+<a name="l00376"></a>00376 };
+<a name="l00377"></a>00377 
+<a name="l00381"></a><a class="code" href="classbdm_1_1mepdf.html">00381</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="l00382"></a>00382 <span class="keyword">public</span>:
+<a name="l00384"></a><a class="code" href="classbdm_1_1mepdf.html#27cc32d1a810516c25bda51ddf886376">00384</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> ( em-&gt;<a class="code" href="classbdm_1_1mpdf.html#222d5280e309c5a053ba73841e98c151" title="access function">_rv</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#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="l00385"></a><a class="code" href="classbdm_1_1mepdf.html#b2b898058169e7ed9a6dc7cd4e1c147c">00385</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="l00386"></a>00386 };
+<a name="l00387"></a>00387 
+<a name="l00390"></a><a class="code" href="classbdm_1_1compositepdf.html">00390</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="l00391"></a>00391 <span class="keyword">protected</span>:
+<a name="l00393"></a><a class="code" href="classbdm_1_1compositepdf.html#7ca3cd8ed92a7154f5b9ff13b1e9d52a">00393</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="l00395"></a><a class="code" href="classbdm_1_1compositepdf.html#23faf2debc4dde10836393b8c665914a">00395</a>         Array&lt;mpdf*&gt; <a class="code" href="classbdm_1_1compositepdf.html#23faf2debc4dde10836393b8c665914a" title="Elements of composition.">mpdfs</a>;
+<a name="l00396"></a>00396 <span class="keyword">public</span>:
+<a name="l00397"></a>00397         <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="l00399"></a>00399         <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="l00401"></a>00401         <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="l00402"></a>00402 };
+<a name="l00403"></a>00403 
+<a name="l00411"></a><a class="code" href="classbdm_1_1DS.html">00411</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="l00412"></a>00412 <span class="keyword">protected</span>:
+<a name="l00414"></a><a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec">00414</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="Observed variables, returned by getdata().">Drv</a>;
+<a name="l00416"></a><a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702">00416</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="Action variables, accepted by write().">Urv</a>; <span class="comment">//</span>
+<a name="l00417"></a>00417 <span class="keyword">public</span>:
+<a name="l00418"></a>00418         <a class="code" href="classbdm_1_1DS.html" title="Abstract class for discrete-time sources of data.">DS</a>():<a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Observed variables, returned by getdata().">Drv</a>(<a class="code" href="namespacebdm.html#bdd4760f14ec7d6fea083aa2170f6236" title="Default empty RV that can be used as default argument.">RV0</a>),<a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Action variables, accepted by write().">Urv</a>(<a class="code" href="namespacebdm.html#bdd4760f14ec7d6fea083aa2170f6236" title="Default empty RV that can be used as default argument.">RV0</a>) {};
+<a name="l00419"></a>00419         <a class="code" href="classbdm_1_1DS.html" title="Abstract class for discrete-time sources of data.">DS</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;Drv0, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;Urv0):<a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Observed variables, returned by getdata().">Drv</a>(Drv0),<a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Action variables, accepted by write().">Urv</a>(Urv0) {};
+<a name="l00421"></a><a class="code" href="classbdm_1_1DS.html#c1ec862dec7164fee3284c6f9a51b0ba">00421</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.">getdata</a> ( vec &amp;dt ){it_error(<span class="stringliteral">"abstract class"</span>);};
+<a name="l00423"></a><a class="code" href="classbdm_1_1DS.html#a0bf451c7fea73ff4150ff9e83da4832">00423</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.">getdata</a> ( vec &amp;dt, <span class="keyword">const</span> ivec &amp;indeces ){it_error(<span class="stringliteral">"abstract class"</span>);};
+<a name="l00425"></a><a class="code" href="classbdm_1_1DS.html#f5baeee8528e5e4c5c7a344b2e3f192a">00425</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="l00427"></a><a class="code" href="classbdm_1_1DS.html#6bced13f84f6bf04449728817e049e1d">00427</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="l00428"></a>00428 
+<a name="l00430"></a>00430         <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="l00431"></a>00431 
+<a name="l00432"></a>00432 };
+<a name="l00433"></a>00433 
+<a name="l00438"></a><a class="code" href="classbdm_1_1BM.html">00438</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of the world, 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="l00439"></a>00439 <span class="keyword">protected</span>:
+<a name="l00441"></a><a class="code" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca">00441</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#18d6db4af8ee42077741d9e3618153ca" title="Random variable of the posterior.">rv</a>;
+<a name="l00443"></a><a class="code" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a">00443</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="l00445"></a><a class="code" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee">00445</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="l00446"></a>00446 <span class="keyword">public</span>:
+<a name="l00447"></a>00447 
+<a name="l00449"></a><a class="code" href="classbdm_1_1BM.html#a33000bb124c32e58742f056ecab4293">00449</a>         <a class="code" href="classbdm_1_1BM.html#a33000bb124c32e58742f056ecab4293" title="Default constructor.">BM</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, <span class="keywordtype">double</span> ll0=0,<span class="keywordtype">bool</span> evalll0=<span class="keyword">true</span> ) :<a class="code" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca" title="Random variable of the posterior.">rv</a> ( rv0 ), <a class="code" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a" title="Logarithm of marginalized data likelihood.">ll</a> ( ll0 ),<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> ( evalll0 ) {<span class="comment">//Fixme: test rv</span>
+<a name="l00450"></a>00450         };
+<a name="l00452"></a><a class="code" href="classbdm_1_1BM.html#241b3701190ff1f729fe873a2eef0055">00452</a>         <a class="code" href="classbdm_1_1BM.html#a33000bb124c32e58742f056ecab4293" title="Default constructor.">BM</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> &amp;B ) : <a class="code" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca" title="Random variable of the posterior.">rv</a> ( B.<a class="code" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca" title="Random variable of the posterior.">rv</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="l00453"></a>00453 
+<a name="l00457"></a>00457         <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="l00459"></a>00459         <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="l00461"></a>00461         <span class="keyword">virtual</span> <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>&amp; <a class="code" href="classbdm_1_1BM.html#963258c4c2dd05be001003b19aceefef" title="Returns a reference to the epdf representing posterior density on parameters.">_epdf</a>() <span class="keyword">const</span> =0;
+<a name="l00462"></a>00462 
+<a name="l00464"></a>00464         <span class="keyword">virtual</span> <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>* <a class="code" href="classbdm_1_1BM.html#4ed0f8b880e606316ae800f3a011c3a6" title="Returns a pointer to the epdf representing posterior density on parameters. Use with...">_e</a>() <span class="keyword">const</span> =0;
 <a name="l00465"></a>00465 
-<a name="l00475"></a><a class="code" href="classbdm_1_1BMcond.html">00475</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1BMcond.html" title="Conditional Bayesian Filter.">BMcond</a> :<a class="code" href="classbdm_1_1base.html" title="Root class of BDM objects.">base</a>{
-<a name="l00476"></a>00476 <span class="keyword">protected</span>:
-<a name="l00478"></a><a class="code" href="classbdm_1_1BMcond.html#9a12750776d977408aada06a70093297">00478</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="l00479"></a>00479 <span class="keyword">public</span>:
-<a name="l00481"></a>00481         <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="l00483"></a><a class="code" href="classbdm_1_1BMcond.html#dde99f401cbf2e8e6a926eaa764b457d">00483</a>         <a class="code" href="classbdm_1_1BMcond.html#dde99f401cbf2e8e6a926eaa764b457d" title="Default constructor.">BMcond</a> ( <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_1BMcond.html#9a12750776d977408aada06a70093297" title="Identificator of the conditioning variable.">rvc</a> ( rv0 ) {};
-<a name="l00485"></a><a class="code" href="classbdm_1_1BMcond.html#7d68d46cfcc36f9cc07a15a5403b5a1a">00485</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1BMcond.html#7d68d46cfcc36f9cc07a15a5403b5a1a" title="Destructor for future use.">~BMcond</a>() {};
-<a name="l00487"></a><a class="code" href="classbdm_1_1BMcond.html#7506910f93250b44fea505ec4ffb19dc">00487</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="l00488"></a>00488 };
-<a name="l00489"></a>00489 
-<a name="l00490"></a>00490 }; <span class="comment">//namespace</span>
-<a name="l00492"></a>00492 <span class="comment"></span><span class="preprocessor">#endif // BM_H</span>
+<a name="l00468"></a><a class="code" href="classbdm_1_1BM.html#50257e0c1e5b5c73153ea6e716ad8ae0">00468</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="l00470"></a><a class="code" href="classbdm_1_1BM.html#0e8ebe61fb14990abe1254bd3dda5fae">00470</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="l00471"></a>00471 
+<a name="l00473"></a><a class="code" href="classbdm_1_1BM.html#710e7d69c0d8791fb41a7cd4683cca2c">00473</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#710e7d69c0d8791fb41a7cd4683cca2c" title="Constructs a predictive density (marginal density on data).">predictor</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#18d6db4af8ee42077741d9e3618153ca" title="Random variable of the posterior.">rv</a> )<span class="keyword"> const </span>{it_error ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> NULL;};
+<a name="l00474"></a>00474 
+<a name="l00476"></a><a class="code" href="classbdm_1_1BM.html#374281cad3caa16fa30609bb4ac16505">00476</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1BM.html#374281cad3caa16fa30609bb4ac16505" title="Destructor for future use;.">~BM</a>() {};
+<a name="l00478"></a><a class="code" href="classbdm_1_1BM.html#40a3c891996391e3135518053a917793">00478</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#40a3c891996391e3135518053a917793" title="access function">_rv</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca" title="Random variable of the posterior.">rv</a>;}
+<a name="l00480"></a><a class="code" href="classbdm_1_1BM.html#5be65d37dedfe33a3671e7065f523a70">00480</a>         <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1BM.html#5be65d37dedfe33a3671e7065f523a70" title="access function">_ll</a>()<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="l00482"></a><a class="code" href="classbdm_1_1BM.html#236b3abbcc93594fc97cd86d82c1a83f">00482</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1BM.html#236b3abbcc93594fc97cd86d82c1a83f" title="access function">set_evalll</a> ( <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="l00483"></a>00483 
+<a name="l00486"></a><a class="code" href="classbdm_1_1BM.html#3efb3098172f1f67564a312fe732473e">00486</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a>* <a class="code" href="classbdm_1_1BM.html#3efb3098172f1f67564a312fe732473e">_copy_</a> ( <span class="keywordtype">bool</span> changerv=<span class="keyword">false</span> ) {it_error ( <span class="stringliteral">"function _copy_ not implemented for this BM"</span> ); <span class="keywordflow">return</span> NULL;};
+<a name="l00487"></a>00487 };
+<a name="l00488"></a>00488 
+<a name="l00498"></a><a class="code" href="classbdm_1_1BMcond.html">00498</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="l00499"></a>00499 <span class="keyword">protected</span>:
+<a name="l00501"></a><a class="code" href="classbdm_1_1BMcond.html#9a12750776d977408aada06a70093297">00501</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="l00502"></a>00502 <span class="keyword">public</span>:
+<a name="l00504"></a>00504         <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="l00506"></a><a class="code" href="classbdm_1_1BMcond.html#dde99f401cbf2e8e6a926eaa764b457d">00506</a>         <a class="code" href="classbdm_1_1BMcond.html#dde99f401cbf2e8e6a926eaa764b457d" title="Default constructor.">BMcond</a> ( <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_1BMcond.html#9a12750776d977408aada06a70093297" title="Identificator of the conditioning variable.">rvc</a> ( rv0 ) {};
+<a name="l00508"></a><a class="code" href="classbdm_1_1BMcond.html#7d68d46cfcc36f9cc07a15a5403b5a1a">00508</a>         <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1BMcond.html#7d68d46cfcc36f9cc07a15a5403b5a1a" title="Destructor for future use.">~BMcond</a>() {};
+<a name="l00510"></a><a class="code" href="classbdm_1_1BMcond.html#7506910f93250b44fea505ec4ffb19dc">00510</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="l00511"></a>00511 };
+<a name="l00512"></a>00512 
+<a name="l00513"></a>00513 }; <span class="comment">//namespace</span>
+<a name="l00515"></a>00515 <span class="comment"></span><span class="preprocessor">#endif // BM_H</span>
 </pre></div></div>
-<hr size="1"><address style="text-align: right;"><small>Generated on Tue Jan 27 16:29:53 2009 for mixpp by&nbsp;
+<hr size="1"><address style="text-align: right;"><small>Generated on Fri Feb 6 15:29:44 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>
