Show
Ignore:
Timestamp:
09/24/08 13:08:07 (16 years ago)
Author:
smidl
Message:

New documentation

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • doc/html/libBM_8h-source.html

    r162 r171  
    7373<a name="l00102"></a><a class="code" href="classRV.html#af068cf478864fe1a4fbfc6b4693b088">00102</a>         <span class="keywordtype">int</span> <a class="code" href="classRV.html#af068cf478864fe1a4fbfc6b4693b088" title="access function">time</a> ( <span class="keywordtype">int</span> at ) {<span class="keywordflow">return</span> <a class="code" href="classRV.html#646e530c47a2dd38254b778d9f11ac89" title="Vector of shifts from current time.">times</a> ( at );}; 
    7474<a name="l00104"></a><a class="code" href="classRV.html#3ae4dd6e368f814a02710636ac8e1721">00104</a>         std::string <a class="code" href="classRV.html#3ae4dd6e368f814a02710636ac8e1721" title="access function">name</a> ( <span class="keywordtype">int</span> at ) {<span class="keywordflow">return</span> <a class="code" href="classRV.html#df5d0030b277a1db2f1fd5fb79152acb" title="Array of names.">names</a> ( at );}; 
    75 <a name="l00105"></a>00105 }; 
    76 <a name="l00106"></a>00106  
    77 <a name="l00108"></a>00108 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> concat ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv1, <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv2 ); 
    78 <a name="l00109"></a>00109  
    79 <a name="l00110"></a>00110  
     75<a name="l00106"></a>00106         <span class="keywordtype">void</span> <a class="code" href="classRV.html#fc4a3175ff678cba7ae4109654f66ce5" title="Assign unused ids to this rv.">newids</a>(); 
     76<a name="l00107"></a>00107 }; 
     77<a name="l00108"></a>00108  
     78<a name="l00110"></a>00110 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> concat ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv1, <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv2 ); 
     79<a name="l00111"></a>00111  
    8080<a name="l00112"></a>00112  
    81 <a name="l00113"></a><a class="code" href="classfnc.html">00113</a> <span class="keyword">class </span><a class="code" href="classfnc.html" title="Class representing function  of variable  represented by rv.">fnc</a> { 
    82 <a name="l00114"></a>00114 <span class="keyword">protected</span>: 
    83 <a name="l00116"></a><a class="code" href="classfnc.html#22d51d10a7901331167f64f80d1af8e9">00116</a>         <span class="keywordtype">int</span> <a class="code" href="classfnc.html#22d51d10a7901331167f64f80d1af8e9" title="Length of the output vector.">dimy</a>; 
    84 <a name="l00117"></a>00117 <span class="keyword">public</span>: 
    85 <a name="l00119"></a><a class="code" href="classfnc.html#8a1da32233c3006a4239cf601c413538">00119</a>         <a class="code" href="classfnc.html#8a1da32233c3006a4239cf601c413538" title="default constructor">fnc</a> ( <span class="keywordtype">int</span> dy ) :<a class="code" href="classfnc.html#22d51d10a7901331167f64f80d1af8e9" title="Length of the output vector.">dimy</a> ( dy ) {}; 
    86 <a name="l00121"></a><a class="code" href="classfnc.html#7fad2e6cb35909a165ec5a53def4a18c">00121</a>         <span class="keyword">virtual</span> vec <a class="code" href="classfnc.html#7fad2e6cb35909a165ec5a53def4a18c" title="function evaluates numerical value of  at  cond ">eval</a> ( <span class="keyword">const</span> vec &amp;cond ) { 
    87 <a name="l00122"></a>00122                 <span class="keywordflow">return</span> vec ( 0 ); 
    88 <a name="l00123"></a>00123         }; 
    89 <a name="l00124"></a>00124  
    90 <a name="l00126"></a><a class="code" href="classfnc.html#a8891973d0ca48ce38e1886df45ca298">00126</a>         <span class="keywordtype">int</span> <a class="code" href="classfnc.html#a8891973d0ca48ce38e1886df45ca298" title="access function">_dimy</a>()<span class="keyword"> const</span>{<span class="keywordflow">return</span> <a class="code" href="classfnc.html#22d51d10a7901331167f64f80d1af8e9" title="Length of the output vector.">dimy</a>;} 
    91 <a name="l00127"></a>00127  
    92 <a name="l00129"></a><a class="code" href="classfnc.html#17164c202f6feee3d708b8caab6306ab">00129</a>         <span class="keyword">virtual</span> <a class="code" href="classfnc.html#17164c202f6feee3d708b8caab6306ab" title="Destructor for future use;.">~fnc</a>() {}; 
    93 <a name="l00130"></a>00130 }; 
    94 <a name="l00131"></a>00131  
    95 <a name="l00132"></a>00132  
     81<a name="l00114"></a>00114  
     82<a name="l00115"></a><a class="code" href="classfnc.html">00115</a> <span class="keyword">class </span><a class="code" href="classfnc.html" title="Class representing function  of variable  represented by rv.">fnc</a> { 
     83<a name="l00116"></a>00116 <span class="keyword">protected</span>: 
     84<a name="l00118"></a><a class="code" href="classfnc.html#22d51d10a7901331167f64f80d1af8e9">00118</a>         <span class="keywordtype">int</span> <a class="code" href="classfnc.html#22d51d10a7901331167f64f80d1af8e9" title="Length of the output vector.">dimy</a>; 
     85<a name="l00119"></a>00119 <span class="keyword">public</span>: 
     86<a name="l00121"></a><a class="code" href="classfnc.html#8a1da32233c3006a4239cf601c413538">00121</a>         <a class="code" href="classfnc.html#8a1da32233c3006a4239cf601c413538" title="default constructor">fnc</a> ( <span class="keywordtype">int</span> dy ) :<a class="code" href="classfnc.html#22d51d10a7901331167f64f80d1af8e9" title="Length of the output vector.">dimy</a> ( dy ) {}; 
     87<a name="l00123"></a><a class="code" href="classfnc.html#7fad2e6cb35909a165ec5a53def4a18c">00123</a>         <span class="keyword">virtual</span> vec <a class="code" href="classfnc.html#7fad2e6cb35909a165ec5a53def4a18c" title="function evaluates numerical value of  at  cond ">eval</a> ( <span class="keyword">const</span> vec &amp;cond ) { 
     88<a name="l00124"></a>00124                 <span class="keywordflow">return</span> vec ( 0 ); 
     89<a name="l00125"></a>00125         }; 
     90<a name="l00126"></a>00126  
     91<a name="l00128"></a><a class="code" href="classfnc.html#a8891973d0ca48ce38e1886df45ca298">00128</a>         <span class="keywordtype">int</span> <a class="code" href="classfnc.html#a8891973d0ca48ce38e1886df45ca298" title="access function">_dimy</a>()<span class="keyword"> const</span>{<span class="keywordflow">return</span> <a class="code" href="classfnc.html#22d51d10a7901331167f64f80d1af8e9" title="Length of the output vector.">dimy</a>;} 
     92<a name="l00129"></a>00129  
     93<a name="l00131"></a><a class="code" href="classfnc.html#17164c202f6feee3d708b8caab6306ab">00131</a>         <span class="keyword">virtual</span> <a class="code" href="classfnc.html#17164c202f6feee3d708b8caab6306ab" title="Destructor for future use;.">~fnc</a>() {}; 
     94<a name="l00132"></a>00132 }; 
     95<a name="l00133"></a>00133  
    9696<a name="l00134"></a>00134  
    97 <a name="l00135"></a><a class="code" href="classepdf.html">00135</a> <span class="keyword">class </span><a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> { 
    98 <a name="l00136"></a>00136 <span class="keyword">protected</span>: 
    99 <a name="l00138"></a><a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9">00138</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a>; 
    100 <a name="l00139"></a>00139 <span class="keyword">public</span>: 
    101 <a name="l00141"></a><a class="code" href="classepdf.html#d8eb760037b3bad5a0d64081606697cd">00141</a>         <a class="code" href="classepdf.html#d8eb760037b3bad5a0d64081606697cd" title="default constructor">epdf</a>() :<a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a> ( ) {}; 
    102 <a name="l00142"></a>00142  
    103 <a name="l00144"></a><a class="code" href="classepdf.html#c95b1a27a8dd9507bb9a5a3cb2809c7a">00144</a>         <a class="code" href="classepdf.html#d8eb760037b3bad5a0d64081606697cd" title="default constructor">epdf</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv0 ) :<a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a> ( rv0 ) {}; 
    104 <a name="l00145"></a>00145  
    105 <a name="l00147"></a>00147 <span class="comment">//      virtual vec moment ( const int order = 1 );</span> 
    106 <a name="l00149"></a>00149 <span class="comment"></span>        <span class="keyword">virtual</span> vec <a class="code" href="classepdf.html#8019654e494bf5e458f6fb947e11b262" title="Returns the required moment of the epdf.">sample</a> () <span class="keyword">const</span> =0; 
    107 <a name="l00151"></a>00151         <span class="keyword">virtual</span> mat <a class="code" href="classepdf.html#54d7dd53a641b618771cd9bee135181f" title="Returns N samples from density .">sampleN</a> ( <span class="keywordtype">int</span> N ) <span class="keyword">const</span>; 
    108 <a name="l00153"></a><a class="code" href="classepdf.html#3ea597362e11a0040fe7c990269d072c">00153</a>         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classepdf.html#3ea597362e11a0040fe7c990269d072c" title="Compute probability of argument val.">eval</a> ( <span class="keyword">const</span> vec &amp;val )<span class="keyword"> const </span>{<span class="keywordflow">return</span> exp ( this-&gt;<a class="code" href="classepdf.html#6aef3eca74899692503769c18add1a4c" title="Compute log-probability of argument val.">evalpdflog</a> ( val ) );}; 
    109 <a name="l00154"></a>00154  
    110 <a name="l00156"></a>00156         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classepdf.html#6aef3eca74899692503769c18add1a4c" title="Compute log-probability of argument val.">evalpdflog</a> ( <span class="keyword">const</span> vec &amp;val ) <span class="keyword">const</span> =0; 
     97<a name="l00136"></a>00136  
     98<a name="l00137"></a><a class="code" href="classepdf.html">00137</a> <span class="keyword">class </span><a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> { 
     99<a name="l00138"></a>00138 <span class="keyword">protected</span>: 
     100<a name="l00140"></a><a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9">00140</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a>; 
     101<a name="l00141"></a>00141 <span class="keyword">public</span>: 
     102<a name="l00143"></a><a class="code" href="classepdf.html#d8eb760037b3bad5a0d64081606697cd">00143</a>         <a class="code" href="classepdf.html#d8eb760037b3bad5a0d64081606697cd" title="default constructor">epdf</a>() :<a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a> ( ) {}; 
     103<a name="l00144"></a>00144  
     104<a name="l00146"></a><a class="code" href="classepdf.html#c95b1a27a8dd9507bb9a5a3cb2809c7a">00146</a>         <a class="code" href="classepdf.html#d8eb760037b3bad5a0d64081606697cd" title="default constructor">epdf</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv0 ) :<a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a> ( rv0 ) {}; 
     105<a name="l00147"></a>00147  
     106<a name="l00148"></a>00148 <span class="comment">//      //! Returns the required moment of the epdf</span> 
     107<a name="l00149"></a>00149 <span class="comment">//      virtual vec moment ( const int order = 1 );</span> 
     108<a name="l00150"></a>00150          
     109<a name="l00152"></a>00152         <span class="keyword">virtual</span> vec <a class="code" href="classepdf.html#8019654e494bf5e458f6fb947e11b262" title="Returns a sample,  from density .">sample</a> () <span class="keyword">const</span> =0; 
     110<a name="l00154"></a>00154         <span class="keyword">virtual</span> mat <a class="code" href="classepdf.html#54d7dd53a641b618771cd9bee135181f" title="Returns N samples from density .">sampleN</a> ( <span class="keywordtype">int</span> N ) <span class="keyword">const</span>; 
     111<a name="l00156"></a><a class="code" href="classepdf.html#3ea597362e11a0040fe7c990269d072c">00156</a>         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classepdf.html#3ea597362e11a0040fe7c990269d072c" title="Compute probability of argument val.">eval</a> ( <span class="keyword">const</span> vec &amp;val )<span class="keyword"> const </span>{<span class="keywordflow">return</span> exp ( this-&gt;<a class="code" href="classepdf.html#6aef3eca74899692503769c18add1a4c" title="Compute log-probability of argument val.">evalpdflog</a> ( val ) );}; 
    111112<a name="l00157"></a>00157  
    112 <a name="l00159"></a>00159         <span class="keyword">virtual</span> vec <a class="code" href="classepdf.html#bf0a070a8f3e67a93604ca724638b870" title="return expected value">mean</a>() <span class="keyword">const</span> =0; 
     113<a name="l00159"></a>00159         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classepdf.html#6aef3eca74899692503769c18add1a4c" title="Compute log-probability of argument val.">evalpdflog</a> ( <span class="keyword">const</span> vec &amp;val ) <span class="keyword">const</span> =0; 
    113114<a name="l00160"></a>00160  
    114 <a name="l00162"></a><a class="code" href="classepdf.html#0a322dd106f04c0a2915e3d4f4227396">00162</a>         <span class="keyword">virtual</span> <a class="code" href="classepdf.html#0a322dd106f04c0a2915e3d4f4227396" title="Destructor for future use;.">~epdf</a>() {}; 
    115 <a name="l00164"></a><a class="code" href="classepdf.html#4778ea61ef400813e47750e024e9fc2f">00164</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a>&amp; <a class="code" href="classepdf.html#4778ea61ef400813e47750e024e9fc2f" title="access function, possibly dangerous!">_rv</a>() {<span class="keywordflow">return</span> <a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a>;} 
    116 <a name="l00165"></a>00165 }; 
    117 <a name="l00166"></a>00166  
     115<a name="l00162"></a><a class="code" href="classepdf.html#6af383b6f1c6ea6fc5f6724dd03d8877">00162</a>         <span class="keyword">virtual</span> vec <a class="code" href="classepdf.html#6aef3eca74899692503769c18add1a4c" title="Compute log-probability of argument val.">evalpdflog</a> ( <span class="keyword">const</span> mat &amp;Val )<span class="keyword"> const </span>{ 
     116<a name="l00163"></a>00163                 vec x ( Val.cols() ); 
     117<a name="l00164"></a>00164                 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i&lt;Val.cols();i++ ) {x ( i ) =<a class="code" href="classepdf.html#6aef3eca74899692503769c18add1a4c" title="Compute log-probability of argument val.">evalpdflog</a>( Val.get_col(i) ) ;} 
     118<a name="l00165"></a>00165                 <span class="keywordflow">return</span> x; 
     119<a name="l00166"></a>00166         } 
    118120<a name="l00167"></a>00167  
    119 <a name="l00169"></a>00169 <span class="comment">//TODO Samplecond can be generalized</span> 
     121<a name="l00169"></a>00169         <span class="keyword">virtual</span> vec <a class="code" href="classepdf.html#bf0a070a8f3e67a93604ca724638b870" title="return expected value">mean</a>() <span class="keyword">const</span> =0; 
    120122<a name="l00170"></a>00170  
    121 <a name="l00171"></a><a class="code" href="classmpdf.html">00171</a> <span class="keyword">class </span><a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> { 
    122 <a name="l00172"></a>00172 <span class="keyword">protected</span>: 
    123 <a name="l00174"></a><a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb">00174</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>; 
    124 <a name="l00176"></a><a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab">00176</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a>; 
    125 <a name="l00178"></a><a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c">00178</a>         <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* <a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>; 
    126 <a name="l00179"></a>00179 <span class="keyword">public</span>: 
    127 <a name="l00180"></a>00180  
    128 <a name="l00182"></a>00182 <span class="comment">//      virtual fnc moment ( const int order = 1 );</span> 
    129 <a name="l00184"></a><a class="code" href="classmpdf.html#3f172b79ec4a5ebc87898a5381141f1b">00184</a> <span class="comment"></span>        <span class="keyword">virtual</span> vec <a class="code" href="classmpdf.html#3f172b79ec4a5ebc87898a5381141f1b" title="Returns the required moment of the epdf.">samplecond</a> (<span class="keyword">const</span> vec &amp;cond, <span class="keywordtype">double</span> &amp;ll ) {this-&gt;<a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( cond ); 
    130 <a name="l00185"></a>00185         vec temp= <a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classepdf.html#8019654e494bf5e458f6fb947e11b262" title="Returns the required moment of the epdf.">sample</a>(); 
    131 <a name="l00186"></a>00186         ll=<a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classepdf.html#6aef3eca74899692503769c18add1a4c" title="Compute log-probability of argument val.">evalpdflog</a> ( temp );<span class="keywordflow">return</span> temp;}; 
    132 <a name="l00188"></a><a class="code" href="classmpdf.html#0e37163660f93df2a4d723cedb1da89c">00188</a>         <span class="keyword">virtual</span> mat <a class="code" href="classmpdf.html#3f172b79ec4a5ebc87898a5381141f1b" title="Returns the required moment of the epdf.">samplecond</a> (<span class="keyword">const</span> vec &amp;cond, vec &amp;ll, <span class="keywordtype">int</span> N ) { 
    133 <a name="l00189"></a>00189                 this-&gt;<a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( cond ); 
    134 <a name="l00190"></a>00190                 mat temp ( <a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>(),N ); vec smp ( <a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>() );  
    135 <a name="l00191"></a>00191                 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i&lt;N;i++ ) {smp=<a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classepdf.html#8019654e494bf5e458f6fb947e11b262" title="Returns the required moment of the epdf.">sample</a>() ;temp.set_col ( i, smp );ll ( i ) =<a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classepdf.html#6aef3eca74899692503769c18add1a4c" title="Compute log-probability of argument val.">evalpdflog</a> ( smp );} 
    136 <a name="l00192"></a>00192                 <span class="keywordflow">return</span> temp; 
    137 <a name="l00193"></a>00193         }; 
    138 <a name="l00195"></a><a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83">00195</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( <span class="keyword">const</span> vec &amp;cond ) {}; 
    139 <a name="l00196"></a>00196  
    140 <a name="l00198"></a><a class="code" href="classmpdf.html#80b738ece5bd4f8c4edaee4b38906f91">00198</a>         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classmpdf.html#80b738ece5bd4f8c4edaee4b38906f91" title="Shortcut for conditioning and evaluation of the internal epdf. In some cases, this...">evalcond</a> ( <span class="keyword">const</span> vec &amp;dt, <span class="keyword">const</span> vec &amp;cond ) {this-&gt;<a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( cond );<span class="keywordflow">return</span> <a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classepdf.html#3ea597362e11a0040fe7c990269d072c" title="Compute probability of argument val.">eval</a> ( dt );}; 
    141 <a name="l00199"></a>00199  
    142 <a name="l00201"></a><a class="code" href="classmpdf.html#6788be9f3a888796499c5293a318fcfb">00201</a>         <span class="keyword">virtual</span> <a class="code" href="classmpdf.html#6788be9f3a888796499c5293a318fcfb" title="Destructor for future use;.">~mpdf</a>() {}; 
    143 <a name="l00202"></a>00202  
    144 <a name="l00204"></a><a class="code" href="classmpdf.html#581ecf362185d37c08bb31cb9d046d6f">00204</a>         <a class="code" href="classmpdf.html#581ecf362185d37c08bb31cb9d046d6f" title="Default constructor.">mpdf</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv0, <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rvc0 ) :<a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a> ( rv0 ),<a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a> ( rvc0 ) {}; 
    145 <a name="l00206"></a><a class="code" href="classmpdf.html#ec9c850305984582548e8deb64f0ffe8">00206</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classmpdf.html#ec9c850305984582548e8deb64f0ffe8" title="access function">_rvc</a>() {<span class="keywordflow">return</span> <a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a>;} 
    146 <a name="l00208"></a><a class="code" href="classmpdf.html#1e71ad4c66d5884c82d4a3b06b42fe32">00208</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classmpdf.html#1e71ad4c66d5884c82d4a3b06b42fe32" title="access function">_rv</a>() {<span class="keywordflow">return</span> <a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>;} 
    147 <a name="l00210"></a><a class="code" href="classmpdf.html#e17780ee5b2cfe05922a6c56af1462f8">00210</a>         <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>&amp; <a class="code" href="classmpdf.html#e17780ee5b2cfe05922a6c56af1462f8" title="access function">_epdf</a>() {<span class="keywordflow">return</span> *<a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>;} 
    148 <a name="l00211"></a>00211 }; 
    149 <a name="l00212"></a>00212  
    150 <a name="l00217"></a><a class="code" href="classmepdf.html">00217</a> <span class="keyword">class </span><a class="code" href="classmepdf.html" title="Unconditional mpdf, allows using epdf in the role of mpdf.">mepdf</a> : <span class="keyword">public</span> <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> { 
    151 <a name="l00218"></a>00218 <span class="keyword">public</span>: 
    152 <a name="l00220"></a><a class="code" href="classmepdf.html#7ab1c50f0aa16230117436dee500f2e0">00220</a>         <a class="code" href="classmepdf.html#7ab1c50f0aa16230117436dee500f2e0" title="Default constructor.">mepdf</a> (<a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> &amp;em ) :<a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> ( em.<a class="code" href="classmpdf.html#1e71ad4c66d5884c82d4a3b06b42fe32" title="access function">_rv</a>(),<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a>() ) {<a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>=&amp;em;}; 
    153 <a name="l00221"></a>00221 }; 
    154 <a name="l00222"></a>00222  
    155 <a name="l00230"></a><a class="code" href="classDS.html">00230</a> <span class="keyword">class </span><a class="code" href="classDS.html" title="Abstract class for discrete-time sources of data.">DS</a> { 
    156 <a name="l00231"></a>00231 <span class="keyword">protected</span>: 
    157 <a name="l00233"></a><a class="code" href="classDS.html#1012025a1a3a1fdd24aa48698a3d3454">00233</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classDS.html#1012025a1a3a1fdd24aa48698a3d3454" title="Observed variables, returned by getdata().">Drv</a>; 
    158 <a name="l00235"></a><a class="code" href="classDS.html#0a88ffaeb3c7c2cf30c69bc41a000629">00235</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classDS.html#0a88ffaeb3c7c2cf30c69bc41a000629" title="Action variables, accepted by write().">Urv</a>; <span class="comment">//</span> 
    159 <a name="l00236"></a>00236 <span class="keyword">public</span>: 
    160 <a name="l00238"></a>00238         <span class="keywordtype">void</span> <a class="code" href="classDS.html#db2dacc9e71a36eeb9c5c2ee402eeeb1" title="Returns full vector of observed data.">getdata</a> ( vec &amp;dt ); 
    161 <a name="l00240"></a>00240         <span class="keywordtype">void</span> <a class="code" href="classDS.html#db2dacc9e71a36eeb9c5c2ee402eeeb1" title="Returns full vector of observed data.">getdata</a> ( vec &amp;dt, ivec &amp;indeces ); 
    162 <a name="l00242"></a>00242         <span class="keywordtype">void</span> <a class="code" href="classDS.html#0dfb6788b70c0d48a1f5276ed6c93039" title="Accepts action variable and schedule it for application.">write</a> ( vec &amp;ut ); 
    163 <a name="l00244"></a>00244         <span class="keywordtype">void</span> <a class="code" href="classDS.html#0dfb6788b70c0d48a1f5276ed6c93039" title="Accepts action variable and schedule it for application.">write</a> ( vec &amp;ut, ivec &amp;indeces ); 
    164 <a name="l00250"></a>00250         <span class="keywordtype">void</span> <a class="code" href="classDS.html#9a35ca9c9321dce2bf63bf668f785b75" title="Method that assigns random variables to the datasource. Typically, the datasource...">linkrvs</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;drv, <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;urv ); 
    165 <a name="l00251"></a>00251  
    166 <a name="l00253"></a>00253         <span class="keywordtype">void</span> <a class="code" href="classDS.html#470ba89e8e7c3c4d830803221b4e9be6" title="Moves from  to , i.e. perfroms the actions and reads response of the system.">step</a>(); 
    167 <a name="l00254"></a>00254  
    168 <a name="l00255"></a>00255 }; 
    169 <a name="l00256"></a>00256  
    170 <a name="l00261"></a><a class="code" href="classBM.html">00261</a> <span class="keyword">class </span><a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> { 
    171 <a name="l00262"></a>00262 <span class="keyword">protected</span>: 
    172 <a name="l00264"></a><a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88">00264</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>; 
    173 <a name="l00266"></a><a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">00266</a>         <span class="keywordtype">double</span> <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>; 
    174 <a name="l00268"></a><a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">00268</a>         <span class="keywordtype">bool</span> <a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>; 
    175 <a name="l00269"></a>00269 <span class="keyword">public</span>: 
    176 <a name="l00270"></a>00270  
    177 <a name="l00272"></a><a class="code" href="classBM.html#605d28b426adb677c86a57ddb525132a">00272</a>         <a class="code" href="classBM.html#605d28b426adb677c86a57ddb525132a" title="Default constructor.">BM</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv0 ) :<a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a> ( rv0 ), <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a> ( 0 ),<a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a> ( true ) {<span class="comment">//Fixme: test rv</span> 
    178 <a name="l00273"></a>00273         }; 
    179 <a name="l00274"></a>00274  
    180 <a name="l00278"></a>00278         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf" title="Incremental Bayes rule.">bayes</a> ( <span class="keyword">const</span> vec &amp;dt ) = 0; 
    181 <a name="l00280"></a>00280         <span class="keywordtype">void</span> <a class="code" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf" title="Incremental Bayes rule.">bayes</a> ( mat Dt ); 
    182 <a name="l00282"></a>00282         <span class="keyword">virtual</span> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>&amp; <a class="code" href="classBM.html#3dc45554556926bde996a267636abe55" title="Returns a pointer to the epdf representing posterior density on parameters. Use with...">_epdf</a>() =0; 
    183 <a name="l00283"></a>00283  
    184 <a name="l00285"></a><a class="code" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd">00285</a>         <span class="keyword">virtual</span> <a class="code" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd" title="Destructor for future use;.">~BM</a>() {}; 
    185 <a name="l00287"></a><a class="code" href="classBM.html#126bd2595c48e311fc2a7ab72876092a">00287</a>         <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a>&amp; <a class="code" href="classBM.html#126bd2595c48e311fc2a7ab72876092a" title="access function">_rv</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>;} 
    186 <a name="l00289"></a><a class="code" href="classBM.html#87f4a547d2c29180be88175e5eab9c88">00289</a>         <span class="keywordtype">double</span> <a class="code" href="classBM.html#87f4a547d2c29180be88175e5eab9c88" title="access function">_ll</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>;} 
    187 <a name="l00290"></a>00290 }; 
    188 <a name="l00291"></a>00291  
    189 <a name="l00301"></a><a class="code" href="classBMcond.html">00301</a> <span class="keyword">class </span><a class="code" href="classBMcond.html" title="Conditional Bayesian Filter.">BMcond</a> { 
    190 <a name="l00302"></a>00302 <span class="keyword">protected</span>: 
    191 <a name="l00304"></a><a class="code" href="classBMcond.html#9ba793c8ec453f04d372d17195ed8dec">00304</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classBMcond.html#9ba793c8ec453f04d372d17195ed8dec" title="Identificator of the conditioning variable.">rvc</a>; 
    192 <a name="l00305"></a>00305 <span class="keyword">public</span>: 
    193 <a name="l00307"></a>00307         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBMcond.html#3543cfe274c35f9033c24d8036a96c4d" title="Substitute val for rvc.">condition</a> ( <span class="keyword">const</span> vec &amp;val ) =0; 
    194 <a name="l00309"></a><a class="code" href="classBMcond.html#9a38dcdabef902fd91da3c9fb6ac27f7">00309</a>         <a class="code" href="classBMcond.html#9a38dcdabef902fd91da3c9fb6ac27f7" title="Default constructor.">BMcond</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv0 ) :<a class="code" href="classBMcond.html#9ba793c8ec453f04d372d17195ed8dec" title="Identificator of the conditioning variable.">rvc</a> ( rv0 ) {}; 
    195 <a name="l00311"></a><a class="code" href="classBMcond.html#d40c72250cf93640f982d06de20815b2">00311</a>         <span class="keyword">virtual</span> <a class="code" href="classBMcond.html#d40c72250cf93640f982d06de20815b2" title="Destructor for future use.">~BMcond</a>() {}; 
    196 <a name="l00313"></a><a class="code" href="classBMcond.html#3fa60348b2da6b4208bb95b8d146900a">00313</a>         <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a>&amp; <a class="code" href="classBMcond.html#3fa60348b2da6b4208bb95b8d146900a" title="access function">_rvc</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classBMcond.html#9ba793c8ec453f04d372d17195ed8dec" title="Identificator of the conditioning variable.">rvc</a>;} 
     123<a name="l00172"></a><a class="code" href="classepdf.html#0a322dd106f04c0a2915e3d4f4227396">00172</a>         <span class="keyword">virtual</span> <a class="code" href="classepdf.html#0a322dd106f04c0a2915e3d4f4227396" title="Destructor for future use;.">~epdf</a>() {}; 
     124<a name="l00174"></a><a class="code" href="classepdf.html#ca0d32aabb4cbba347e0c37fe8607562">00174</a>         <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a>&amp; <a class="code" href="classepdf.html#ca0d32aabb4cbba347e0c37fe8607562" title="access function, possibly dangerous!">_rv</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a>;} 
     125<a name="l00176"></a><a class="code" href="classepdf.html#7fb94ce90d1ac7077d29f7d6a6c3e0a5">00176</a>         <span class="keywordtype">void</span> <a class="code" href="classepdf.html#7fb94ce90d1ac7077d29f7d6a6c3e0a5" title="modifier function - useful when copying epdfs">_renewrv</a>(<span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;in_rv){<a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a>=in_rv;} 
     126<a name="l00177"></a>00177 }; 
     127<a name="l00178"></a>00178  
     128<a name="l00179"></a>00179  
     129<a name="l00181"></a>00181 <span class="comment">//TODO Samplecond can be generalized</span> 
     130<a name="l00182"></a>00182  
     131<a name="l00183"></a><a class="code" href="classmpdf.html">00183</a> <span class="keyword">class </span><a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> { 
     132<a name="l00184"></a>00184 <span class="keyword">protected</span>: 
     133<a name="l00186"></a><a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb">00186</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>; 
     134<a name="l00188"></a><a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab">00188</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a>; 
     135<a name="l00190"></a><a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c">00190</a>         <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* <a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>; 
     136<a name="l00191"></a>00191 <span class="keyword">public</span>: 
     137<a name="l00192"></a>00192  
     138<a name="l00194"></a>00194 <span class="comment">//      virtual fnc moment ( const int order = 1 );</span> 
     139<a name="l00196"></a><a class="code" href="classmpdf.html#3f172b79ec4a5ebc87898a5381141f1b">00196</a> <span class="comment"></span>        <span class="keyword">virtual</span> vec <a class="code" href="classmpdf.html#3f172b79ec4a5ebc87898a5381141f1b" title="Returns the required moment of the epdf.">samplecond</a> (<span class="keyword">const</span> vec &amp;cond, <span class="keywordtype">double</span> &amp;ll ) {this-&gt;<a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( cond ); 
     140<a name="l00197"></a>00197         vec temp= <a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classepdf.html#8019654e494bf5e458f6fb947e11b262" title="Returns a sample,  from density .">sample</a>(); 
     141<a name="l00198"></a>00198         ll=<a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classepdf.html#6aef3eca74899692503769c18add1a4c" title="Compute log-probability of argument val.">evalpdflog</a> ( temp );<span class="keywordflow">return</span> temp;}; 
     142<a name="l00200"></a><a class="code" href="classmpdf.html#0e37163660f93df2a4d723cedb1da89c">00200</a>         <span class="keyword">virtual</span> mat <a class="code" href="classmpdf.html#3f172b79ec4a5ebc87898a5381141f1b" title="Returns the required moment of the epdf.">samplecond</a> (<span class="keyword">const</span> vec &amp;cond, vec &amp;ll, <span class="keywordtype">int</span> N ) { 
     143<a name="l00201"></a>00201                 this-&gt;<a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( cond ); 
     144<a name="l00202"></a>00202                 mat temp ( <a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>(),N ); vec smp ( <a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>() );  
     145<a name="l00203"></a>00203                 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i&lt;N;i++ ) {smp=<a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classepdf.html#8019654e494bf5e458f6fb947e11b262" title="Returns a sample,  from density .">sample</a>() ;temp.set_col ( i, smp );ll ( i ) =<a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classepdf.html#6aef3eca74899692503769c18add1a4c" title="Compute log-probability of argument val.">evalpdflog</a> ( smp );} 
     146<a name="l00204"></a>00204                 <span class="keywordflow">return</span> temp; 
     147<a name="l00205"></a>00205         }; 
     148<a name="l00207"></a><a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83">00207</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( <span class="keyword">const</span> vec &amp;cond ) {}; 
     149<a name="l00208"></a>00208  
     150<a name="l00210"></a><a class="code" href="classmpdf.html#80b738ece5bd4f8c4edaee4b38906f91">00210</a>         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classmpdf.html#80b738ece5bd4f8c4edaee4b38906f91" title="Shortcut for conditioning and evaluation of the internal epdf. In some cases, this...">evalcond</a> ( <span class="keyword">const</span> vec &amp;dt, <span class="keyword">const</span> vec &amp;cond ) {this-&gt;<a class="code" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( cond );<span class="keywordflow">return</span> <a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-&gt;<a class="code" href="classepdf.html#3ea597362e11a0040fe7c990269d072c" title="Compute probability of argument val.">eval</a> ( dt );}; 
     151<a name="l00211"></a>00211  
     152<a name="l00213"></a><a class="code" href="classmpdf.html#6788be9f3a888796499c5293a318fcfb">00213</a>         <span class="keyword">virtual</span> <a class="code" href="classmpdf.html#6788be9f3a888796499c5293a318fcfb" title="Destructor for future use;.">~mpdf</a>() {}; 
     153<a name="l00214"></a>00214  
     154<a name="l00216"></a><a class="code" href="classmpdf.html#581ecf362185d37c08bb31cb9d046d6f">00216</a>         <a class="code" href="classmpdf.html#581ecf362185d37c08bb31cb9d046d6f" title="Default constructor.">mpdf</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv0, <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rvc0 ) :<a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a> ( rv0 ),<a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a> ( rvc0 ) {}; 
     155<a name="l00218"></a><a class="code" href="classmpdf.html#ec9c850305984582548e8deb64f0ffe8">00218</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classmpdf.html#ec9c850305984582548e8deb64f0ffe8" title="access function">_rvc</a>() {<span class="keywordflow">return</span> <a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a>;} 
     156<a name="l00220"></a><a class="code" href="classmpdf.html#1e71ad4c66d5884c82d4a3b06b42fe32">00220</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classmpdf.html#1e71ad4c66d5884c82d4a3b06b42fe32" title="access function">_rv</a>() {<span class="keywordflow">return</span> <a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>;} 
     157<a name="l00222"></a><a class="code" href="classmpdf.html#e17780ee5b2cfe05922a6c56af1462f8">00222</a>         <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>&amp; <a class="code" href="classmpdf.html#e17780ee5b2cfe05922a6c56af1462f8" title="access function">_epdf</a>() {<span class="keywordflow">return</span> *<a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>;} 
     158<a name="l00223"></a>00223 }; 
     159<a name="l00224"></a>00224  
     160<a name="l00229"></a><a class="code" href="classmepdf.html">00229</a> <span class="keyword">class </span><a class="code" href="classmepdf.html" title="Unconditional mpdf, allows using epdf in the role of mpdf.">mepdf</a> : <span class="keyword">public</span> <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> { 
     161<a name="l00230"></a>00230 <span class="keyword">public</span>: 
     162<a name="l00232"></a><a class="code" href="classmepdf.html#7ab1c50f0aa16230117436dee500f2e0">00232</a>         <a class="code" href="classmepdf.html#7ab1c50f0aa16230117436dee500f2e0" title="Default constructor.">mepdf</a> (<a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> &amp;em ) :<a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> ( em.<a class="code" href="classmpdf.html#1e71ad4c66d5884c82d4a3b06b42fe32" title="access function">_rv</a>(),<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a>() ) {<a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>=&amp;em;}; 
     163<a name="l00233"></a>00233 }; 
     164<a name="l00234"></a>00234  
     165<a name="l00242"></a><a class="code" href="classDS.html">00242</a> <span class="keyword">class </span><a class="code" href="classDS.html" title="Abstract class for discrete-time sources of data.">DS</a> { 
     166<a name="l00243"></a>00243 <span class="keyword">protected</span>: 
     167<a name="l00245"></a><a class="code" href="classDS.html#1012025a1a3a1fdd24aa48698a3d3454">00245</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classDS.html#1012025a1a3a1fdd24aa48698a3d3454" title="Observed variables, returned by getdata().">Drv</a>; 
     168<a name="l00247"></a><a class="code" href="classDS.html#0a88ffaeb3c7c2cf30c69bc41a000629">00247</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classDS.html#0a88ffaeb3c7c2cf30c69bc41a000629" title="Action variables, accepted by write().">Urv</a>; <span class="comment">//</span> 
     169<a name="l00248"></a>00248 <span class="keyword">public</span>: 
     170<a name="l00250"></a>00250         <span class="keywordtype">void</span> <a class="code" href="classDS.html#db2dacc9e71a36eeb9c5c2ee402eeeb1" title="Returns full vector of observed data.">getdata</a> ( vec &amp;dt ); 
     171<a name="l00252"></a>00252         <span class="keywordtype">void</span> <a class="code" href="classDS.html#db2dacc9e71a36eeb9c5c2ee402eeeb1" title="Returns full vector of observed data.">getdata</a> ( vec &amp;dt, ivec &amp;indeces ); 
     172<a name="l00254"></a>00254         <span class="keywordtype">void</span> <a class="code" href="classDS.html#0dfb6788b70c0d48a1f5276ed6c93039" title="Accepts action variable and schedule it for application.">write</a> ( vec &amp;ut ); 
     173<a name="l00256"></a>00256         <span class="keywordtype">void</span> <a class="code" href="classDS.html#0dfb6788b70c0d48a1f5276ed6c93039" title="Accepts action variable and schedule it for application.">write</a> ( vec &amp;ut, ivec &amp;indeces ); 
     174<a name="l00262"></a>00262         <span class="keywordtype">void</span> <a class="code" href="classDS.html#9a35ca9c9321dce2bf63bf668f785b75" title="Method that assigns random variables to the datasource. Typically, the datasource...">linkrvs</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;drv, <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;urv ); 
     175<a name="l00263"></a>00263  
     176<a name="l00265"></a>00265         <span class="keywordtype">void</span> <a class="code" href="classDS.html#470ba89e8e7c3c4d830803221b4e9be6" title="Moves from  to , i.e. perfroms the actions and reads response of the system.">step</a>(); 
     177<a name="l00266"></a>00266  
     178<a name="l00267"></a>00267 }; 
     179<a name="l00268"></a>00268  
     180<a name="l00273"></a><a class="code" href="classBM.html">00273</a> <span class="keyword">class </span><a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> { 
     181<a name="l00274"></a>00274 <span class="keyword">protected</span>: 
     182<a name="l00276"></a><a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88">00276</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>; 
     183<a name="l00278"></a><a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">00278</a>         <span class="keywordtype">double</span> <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>; 
     184<a name="l00280"></a><a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">00280</a>         <span class="keywordtype">bool</span> <a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>; 
     185<a name="l00281"></a>00281 <span class="keyword">public</span>: 
     186<a name="l00282"></a>00282  
     187<a name="l00284"></a><a class="code" href="classBM.html#43d2ad6a6c9f1bcd22fe8906c477e50e">00284</a>         <a class="code" href="classBM.html#43d2ad6a6c9f1bcd22fe8906c477e50e" title="Default constructor.">BM</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv0, <span class="keywordtype">double</span> ll0=0,<span class="keywordtype">bool</span> evalll0=<span class="keyword">true</span> ) :<a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a> ( rv0 ), <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a> ( ll0 ),<a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a> ( evalll0) {<span class="comment">//Fixme: test rv</span> 
     188<a name="l00285"></a>00285         }; 
     189<a name="l00287"></a><a class="code" href="classBM.html#e8fc5fae042f2b46d4d3827f9587d47d">00287</a>         <a class="code" href="classBM.html#43d2ad6a6c9f1bcd22fe8906c477e50e" title="Default constructor.">BM</a> (<span class="keyword">const</span> <a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> &amp;B) : <a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>(B.<a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>), <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>(B.<a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>), <a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>(B.<a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>) {} 
     190<a name="l00288"></a>00288  
     191<a name="l00292"></a>00292         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf" title="Incremental Bayes rule.">bayes</a> ( <span class="keyword">const</span> vec &amp;dt ) = 0; 
     192<a name="l00294"></a>00294         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBM.html#0186270f75189677f390fe088a9947e9" title="Batch Bayes rule (columns of Dt are observations).">bayesB</a> (<span class="keyword">const</span> mat &amp;Dt ); 
     193<a name="l00296"></a>00296         <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>&amp; <a class="code" href="classBM.html#8554809fec160bee279bcd5fa14ead5c" title="Returns a pointer to the epdf representing posterior density on parameters. Use with...">_epdf</a>() <span class="keyword">const</span> =0; 
     194<a name="l00297"></a>00297  
     195<a name="l00300"></a><a class="code" href="classBM.html#8a8ce6df431689964c41cc6c849cfd06">00300</a>         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classBM.html#8a8ce6df431689964c41cc6c849cfd06">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;} 
     196<a name="l00301"></a>00301          
     197<a name="l00303"></a><a class="code" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd">00303</a>         <span class="keyword">virtual</span> <a class="code" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd" title="Destructor for future use;.">~BM</a>() {}; 
     198<a name="l00305"></a><a class="code" href="classBM.html#126bd2595c48e311fc2a7ab72876092a">00305</a>         <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a>&amp; <a class="code" href="classBM.html#126bd2595c48e311fc2a7ab72876092a" title="access function">_rv</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>;} 
     199<a name="l00307"></a><a class="code" href="classBM.html#87f4a547d2c29180be88175e5eab9c88">00307</a>         <span class="keywordtype">double</span> <a class="code" href="classBM.html#87f4a547d2c29180be88175e5eab9c88" title="access function">_ll</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>;} 
     200<a name="l00309"></a><a class="code" href="classBM.html#1ffa9f23669aabecc3760c06c6987522">00309</a>         <span class="keywordtype">void</span> <a class="code" href="classBM.html#1ffa9f23669aabecc3760c06c6987522" title="access function">set_evalll</a>(<span class="keywordtype">bool</span> evl0){<a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>=evl0;} 
     201<a name="l00310"></a>00310          
     202<a name="l00313"></a><a class="code" href="classBM.html#eb58c81d6a7b75b05fc6f276eed78887">00313</a>         <span class="keyword">virtual</span> <a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a>* <a class="code" href="classBM.html#eb58c81d6a7b75b05fc6f276eed78887">_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;}; 
    197203<a name="l00314"></a>00314 }; 
    198204<a name="l00315"></a>00315  
    199 <a name="l00316"></a>00316 <span class="preprocessor">#endif // BM_H</span> 
     205<a name="l00325"></a><a class="code" href="classBMcond.html">00325</a> <span class="keyword">class </span><a class="code" href="classBMcond.html" title="Conditional Bayesian Filter.">BMcond</a> { 
     206<a name="l00326"></a>00326 <span class="keyword">protected</span>: 
     207<a name="l00328"></a><a class="code" href="classBMcond.html#9ba793c8ec453f04d372d17195ed8dec">00328</a>         <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classBMcond.html#9ba793c8ec453f04d372d17195ed8dec" title="Identificator of the conditioning variable.">rvc</a>; 
     208<a name="l00329"></a>00329 <span class="keyword">public</span>: 
     209<a name="l00331"></a>00331         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBMcond.html#3543cfe274c35f9033c24d8036a96c4d" title="Substitute val for rvc.">condition</a> ( <span class="keyword">const</span> vec &amp;val ) =0; 
     210<a name="l00333"></a><a class="code" href="classBMcond.html#9a38dcdabef902fd91da3c9fb6ac27f7">00333</a>         <a class="code" href="classBMcond.html#9a38dcdabef902fd91da3c9fb6ac27f7" title="Default constructor.">BMcond</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv0 ) :<a class="code" href="classBMcond.html#9ba793c8ec453f04d372d17195ed8dec" title="Identificator of the conditioning variable.">rvc</a> ( rv0 ) {}; 
     211<a name="l00335"></a><a class="code" href="classBMcond.html#d40c72250cf93640f982d06de20815b2">00335</a>         <span class="keyword">virtual</span> <a class="code" href="classBMcond.html#d40c72250cf93640f982d06de20815b2" title="Destructor for future use.">~BMcond</a>() {}; 
     212<a name="l00337"></a><a class="code" href="classBMcond.html#3fa60348b2da6b4208bb95b8d146900a">00337</a>         <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a>&amp; <a class="code" href="classBMcond.html#3fa60348b2da6b4208bb95b8d146900a" title="access function">_rvc</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classBMcond.html#9ba793c8ec453f04d372d17195ed8dec" title="Identificator of the conditioning variable.">rvc</a>;} 
     213<a name="l00338"></a>00338 }; 
     214<a name="l00339"></a>00339  
     215<a name="l00340"></a>00340 <span class="preprocessor">#endif // BM_H</span> 
    200216</pre></div></div> 
    201 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Sep 4 19:28:00 2008 for mixpp by&nbsp; 
     217<hr size="1"><address style="text-align: right;"><small>Generated on Tue Sep 23 16:00:45 2008 for mixpp by&nbsp; 
    202218<a href="http://www.doxygen.org/index.html"> 
    203219<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>