Index: library/doc/html/arx_8h_source.html
===================================================================
--- library/doc/html/arx_8h_source.html (revision 632)
+++ library/doc/html/arx_8h_source.html (revision 641)
@@ -87,88 +87,100 @@
 <a name="l00059"></a><a class="code" href="classbdm_1_1ARX.html#a6dcf8458bdc25d831542c6da89961fbc">00059</a>         <span class="keywordtype">bool</span> <a class="code" href="classbdm_1_1ARX.html#a6dcf8458bdc25d831542c6da89961fbc" title="switch if constant is modelled or not">have_constant</a>;
 <a name="l00061"></a><a class="code" href="classbdm_1_1ARX.html#a8f87c2958e5690610fed2992d6ffe5c0">00061</a>         vec <a class="code" href="classbdm_1_1ARX.html#a8f87c2958e5690610fed2992d6ffe5c0" title="cached value of data vector for have_constant =true">_dt</a>;
-<a name="l00062"></a>00062 <span class="keyword">public</span>:
-<a name="l00065"></a>00065         <a class="code" href="classbdm_1_1ARX.html" title="Linear Autoregressive model with Gaussian noise.">ARX</a> ( <span class="keyword">const</span> <span class="keywordtype">double</span> frg0 = 1.0 ) : <a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a> ( frg0 ), <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a> (), <a class="code" href="classbdm_1_1ARX.html#ade5b7d83ff5d3f5af2f80068db0abdfd" title="cached value of est.V">V</a> ( <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>._V() ), <a class="code" href="classbdm_1_1ARX.html#a740b0582f180ba13cae91d66e9bdb67f" title="cached value of est.nu">nu</a> ( <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>._nu() ) {};
-<a name="l00066"></a>00066         <a class="code" href="classbdm_1_1ARX.html" title="Linear Autoregressive model with Gaussian noise.">ARX</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1ARX.html" title="Linear Autoregressive model with Gaussian noise.">ARX</a> &amp;A0 ) : <a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a> (), <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a> (), <a class="code" href="classbdm_1_1ARX.html#ade5b7d83ff5d3f5af2f80068db0abdfd" title="cached value of est.V">V</a> ( <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>._V() ), <a class="code" href="classbdm_1_1ARX.html#a740b0582f180ba13cae91d66e9bdb67f" title="cached value of est.nu">nu</a> ( <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>._nu() ) {
-<a name="l00067"></a>00067                 set_statistics ( A0.<a class="code" href="classbdm_1_1ARX.html#a8e68db2a218d54b09304cad6c0a897d9" title="size of output variable (needed in regressors)">dimx</a>, A0.<a class="code" href="classbdm_1_1ARX.html#ade5b7d83ff5d3f5af2f80068db0abdfd" title="cached value of est.V">V</a>, A0.<a class="code" href="classbdm_1_1ARX.html#a740b0582f180ba13cae91d66e9bdb67f" title="cached value of est.nu">nu</a> );
-<a name="l00068"></a>00068                 set_parameters ( A0.<a class="code" href="classbdm_1_1BMEF.html#a1331865e10fb1ccef65bb4c47fa3be64" title="forgetting factor">frg</a> );
-<a name="l00069"></a>00069         };
-<a name="l00070"></a>00070         ARX* <a class="code" href="classbdm_1_1ARX.html#aca0b54c0997cfd567f49377af5def106">_copy_</a>() <span class="keyword">const</span>;
-<a name="l00071"></a>00071         <span class="keywordtype">void</span> set_parameters ( <span class="keywordtype">double</span> frg0 ) {
-<a name="l00072"></a>00072                 <a class="code" href="classbdm_1_1BMEF.html#a1331865e10fb1ccef65bb4c47fa3be64" title="forgetting factor">frg</a> = frg0;
-<a name="l00073"></a>00073         }
-<a name="l00074"></a>00074         <span class="keywordtype">void</span> set_statistics ( <span class="keywordtype">int</span> dimx0, <span class="keyword">const</span> ldmat V0, <span class="keywordtype">double</span> nu0 = -1.0 ) {
-<a name="l00075"></a>00075                 <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>.set_parameters ( dimx0, V0, nu0 );
-<a name="l00076"></a>00076                 <a class="code" href="classbdm_1_1BMEF.html#a06e7b3ac03e10017d4288c76888e2865" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a> = <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>.lognc();
-<a name="l00077"></a>00077                 <a class="code" href="classbdm_1_1ARX.html#a8e68db2a218d54b09304cad6c0a897d9" title="size of output variable (needed in regressors)">dimx</a> = dimx0;
-<a name="l00078"></a>00078         }
-<a name="l00080"></a>00080 
-<a name="l00082"></a>00082         <span class="keywordtype">void</span> set_statistics ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1BMEF.html#a2def512872ed8a4fc3b702371ec0be55" title="Default constructor (=empty constructor).">BMEF</a>* BM0 );
-<a name="l00083"></a>00083 
-<a name="l00086"></a>00086 
-<a name="l00088"></a>00088         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ARX.html#a17e7fe14654ab3c449846c3f43e66169" title="Weighted Bayes .">bayes</a> ( <span class="keyword">const</span> vec &amp;dt, <span class="keyword">const</span> <span class="keywordtype">double</span> w );
-<a name="l00089"></a><a class="code" href="classbdm_1_1ARX.html#a8bdf2974052e8ce74eb0d4f3791c58a3">00089</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ARX.html#a8bdf2974052e8ce74eb0d4f3791c58a3" title="Incremental Bayes rule.">bayes</a> ( <span class="keyword">const</span> vec &amp;dt ) {
-<a name="l00090"></a>00090                 <a class="code" href="classbdm_1_1ARX.html#a17e7fe14654ab3c449846c3f43e66169" title="Weighted Bayes .">bayes</a> ( dt, 1.0 );
-<a name="l00091"></a>00091         };
-<a name="l00092"></a>00092         <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1ARX.html#a080a7e531e3aa06694112863b15bc6a4">logpred</a> ( <span class="keyword">const</span> vec &amp;dt ) <span class="keyword">const</span>;
-<a name="l00093"></a>00093         <span class="keywordtype">void</span> flatten ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a>* B ) {
-<a name="l00094"></a>00094                 <span class="keyword">const</span> <a class="code" href="classbdm_1_1ARX.html" title="Linear Autoregressive model with Gaussian noise.">ARX</a>* A = <span class="keyword">dynamic_cast&lt;</span><span class="keyword">const </span><a class="code" href="classbdm_1_1ARX.html" title="Linear Autoregressive model with Gaussian noise.">ARX</a>*<span class="keyword">&gt;</span> ( B );
-<a name="l00095"></a>00095                 <span class="comment">// nu should be equal to B.nu</span>
-<a name="l00096"></a>00096                 <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>.<a class="code" href="classbdm_1_1egiw.html#a8e610e95401a11baf34f65e16ecd87be" title="Power of the density, used e.g. to flatten the density.">pow</a> ( A-&gt;<a class="code" href="classbdm_1_1ARX.html#a740b0582f180ba13cae91d66e9bdb67f" title="cached value of est.nu">nu</a> / <a class="code" href="classbdm_1_1ARX.html#a740b0582f180ba13cae91d66e9bdb67f" title="cached value of est.nu">nu</a> );
-<a name="l00097"></a>00097                 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1BM.html#afaff0ad12556fe7dc0e2807d4fd938ee" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a> ) {
-<a name="l00098"></a>00098                         <a class="code" href="classbdm_1_1BMEF.html#a06e7b3ac03e10017d4288c76888e2865" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a> = <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>.<a class="code" href="classbdm_1_1egiw.html#a41d72ba7b2abc8a9a4209ffa98ed5633" title="logarithm of the normalizing constant, ">lognc</a>();
-<a name="l00099"></a>00099                 }
-<a name="l00100"></a>00100         }
-<a name="l00102"></a>00102         enorm&lt;ldmat&gt;* <a class="code" href="classbdm_1_1ARX.html#a4cdf5e2a7d3480ec31f6247ed4289b15" title="Predictor for empty regressor.">epredictor</a> ( <span class="keyword">const</span> vec &amp;rgr ) <span class="keyword">const</span>;
-<a name="l00104"></a><a class="code" href="classbdm_1_1ARX.html#a4cdf5e2a7d3480ec31f6247ed4289b15">00104</a>         <a class="code" href="classbdm_1_1enorm.html">enorm&lt;ldmat&gt;</a>* <a class="code" href="classbdm_1_1ARX.html#a4cdf5e2a7d3480ec31f6247ed4289b15" title="Predictor for empty regressor.">epredictor</a>()<span class="keyword"> const </span>{
-<a name="l00105"></a>00105                 <a class="code" href="bdmerror_8h.html#a89a0f906b242b79c5d3d342291b2cab4" title="Throw std::runtime_exception if t is not true and NDEBUG is not defined.">bdm_assert_debug</a> ( <a class="code" href="classbdm_1_1ARX.html#a8e68db2a218d54b09304cad6c0a897d9" title="size of output variable (needed in regressors)">dimx</a> == <a class="code" href="classbdm_1_1ARX.html#ade5b7d83ff5d3f5af2f80068db0abdfd" title="cached value of est.V">V</a>.<a class="code" href="classbdm_1_1sqmat.html#a73e639221343dcce76c3305524d67590" title="Reimplementing common functions of mat: rows().">rows</a>() - 1, <span class="stringliteral">&quot;Regressor is not only 1&quot;</span> );
-<a name="l00106"></a>00106                 <span class="keywordflow">return</span> <a class="code" href="classbdm_1_1ARX.html#a4cdf5e2a7d3480ec31f6247ed4289b15" title="Predictor for empty regressor.">epredictor</a> ( vec_1 ( 1.0 ) );
-<a name="l00107"></a>00107         }
-<a name="l00109"></a>00109         <a class="code" href="classbdm_1_1mlnorm.html" title="Normal distributed linear function with linear function of mean value;.">mlnorm&lt;ldmat&gt;</a>* <a class="code" href="classbdm_1_1ARX.html#a74fe8ae2d88bee8639510fd0eaf73513" title="conditional version of the predictor">predictor</a>() <span class="keyword">const</span>;
-<a name="l00110"></a>00110         <a class="code" href="classbdm_1_1mlstudent.html">mlstudent</a>* predictor_student() <span class="keyword">const</span>;
-<a name="l00112"></a>00112         ivec <a class="code" href="classbdm_1_1ARX.html#a16b02ae03316751664c22d59d90c1e34" title="Brute force structure estimation.">structure_est</a> ( <a class="code" href="classbdm_1_1egiw.html" title="Gauss-inverse-Wishart density stored in LD form.">egiw</a> Eg0 );
-<a name="l00114"></a>00114         ivec <a class="code" href="classbdm_1_1ARX.html#a5d0f217ce270e6a8cb43a67b6c4b67fa" title="Smarter structure estimation by Ludvik Tesar.">structure_est_LT</a> ( <a class="code" href="classbdm_1_1egiw.html" title="Gauss-inverse-Wishart density stored in LD form.">egiw</a> Eg0 );
-<a name="l00116"></a>00116 
-<a name="l00119"></a>00119         <span class="keyword">const</span> <a class="code" href="classbdm_1_1egiw.html" title="Gauss-inverse-Wishart density stored in LD form.">egiw</a>&amp; posterior()<span class="keyword"> const </span>{
-<a name="l00120"></a>00120                 <span class="keywordflow">return</span> <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>;
-<a name="l00121"></a>00121         }
-<a name="l00123"></a>00123 
-<a name="l00126"></a>00126         <span class="keywordtype">void</span> set_rv ( <span class="keyword">const</span> RV &amp;yrv0 , <span class="keyword">const</span> RV &amp;rgrrv0 ) {
-<a name="l00127"></a>00127                 <a class="code" href="classbdm_1_1ARX.html#a363aaa55b2ab3eec602510cdf53e84ef">_yrv</a> = yrv0;
-<a name="l00128"></a>00128                 <a class="code" href="classbdm_1_1ARX.html#a320ac7b3b511bc4b26e8f8823026a453" title="rv of regressor">rgrrv</a>=rgrrv0;
-<a name="l00129"></a>00129                 set_drv(concat(yrv0, <a class="code" href="classbdm_1_1ARX.html#a320ac7b3b511bc4b26e8f8823026a453" title="rv of regressor">rgrrv</a>));
-<a name="l00130"></a>00130         }
-<a name="l00131"></a>00131 
-<a name="l00132"></a>00132         RV&amp; get_yrv() {
-<a name="l00133"></a>00133                 <span class="comment">//if yrv is not ready create it</span>
-<a name="l00134"></a>00134                 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1ARX.html#a363aaa55b2ab3eec602510cdf53e84ef">_yrv</a>._dsize() != <a class="code" href="classbdm_1_1ARX.html#a8e68db2a218d54b09304cad6c0a897d9" title="size of output variable (needed in regressors)">dimx</a> ) {
-<a name="l00135"></a>00135                         <span class="keywordtype">int</span> i = 0;
-<a name="l00136"></a>00136                         <span class="keywordflow">while</span> ( <a class="code" href="classbdm_1_1ARX.html#a363aaa55b2ab3eec602510cdf53e84ef">_yrv</a>._dsize() &lt; <a class="code" href="classbdm_1_1ARX.html#a8e68db2a218d54b09304cad6c0a897d9" title="size of output variable (needed in regressors)">dimx</a> ) {
-<a name="l00137"></a>00137                                 <a class="code" href="classbdm_1_1ARX.html#a363aaa55b2ab3eec602510cdf53e84ef">_yrv</a>.add ( <a class="code" href="classbdm_1_1BM.html#ac400357e37d27a4834b2b1d9211009ed" title="Random variable of the data (optional).">drv</a> ( vec_1 ( i ) ) );
-<a name="l00138"></a>00138                                 i++;
-<a name="l00139"></a>00139                         }
-<a name="l00140"></a>00140                 }
-<a name="l00141"></a>00141                 <span class="comment">//yrv should be ready by now</span>
-<a name="l00142"></a>00142                 <a class="code" href="bdmerror_8h.html#a89a0f906b242b79c5d3d342291b2cab4" title="Throw std::runtime_exception if t is not true and NDEBUG is not defined.">bdm_assert_debug</a> ( <a class="code" href="classbdm_1_1ARX.html#a363aaa55b2ab3eec602510cdf53e84ef">_yrv</a>._dsize() == <a class="code" href="classbdm_1_1ARX.html#a8e68db2a218d54b09304cad6c0a897d9" title="size of output variable (needed in regressors)">dimx</a>, <span class="stringliteral">&quot;incompatible drv&quot;</span> );
-<a name="l00143"></a>00143                 <span class="keywordflow">return</span> <a class="code" href="classbdm_1_1ARX.html#a363aaa55b2ab3eec602510cdf53e84ef">_yrv</a>;
-<a name="l00144"></a>00144         }
-<a name="l00146"></a>00146 
-<a name="l00167"></a>00167         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ARX.html#a9637412df898048bafaefee9dc7e9f6c">from_setting</a> ( <span class="keyword">const</span> Setting &amp;<span class="keyword">set</span> );
-<a name="l00168"></a>00168 
-<a name="l00169"></a><a class="code" href="classbdm_1_1ARX.html#a5b4ae27fa320a1b6e09777239210566d">00169</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ARX.html#a5b4ae27fa320a1b6e09777239210566d" title="This method TODO.">validate</a>() {
-<a name="l00170"></a>00170                 <a class="code" href="bdmerror_8h.html#a7a3399d182b8e3065532596e76f84849" title="Throw std::runtime_exception if t is not true.">bdm_assert</a>(<a class="code" href="classbdm_1_1ARX.html#a8e68db2a218d54b09304cad6c0a897d9" title="size of output variable (needed in regressors)">dimx</a> == <a class="code" href="classbdm_1_1ARX.html#a363aaa55b2ab3eec602510cdf53e84ef">_yrv</a>.<a class="code" href="classbdm_1_1RV.html#ade30156104f61d86c94f758861418089" title="total size of a random variable">_dsize</a>(), <span class="stringliteral">&quot;RVs of parameters and regressor do not match&quot;</span>);
-<a name="l00171"></a>00171                 
-<a name="l00172"></a>00172         }
-<a name="l00173"></a>00173 };
-<a name="l00174"></a>00174 
-<a name="l00175"></a>00175 <a class="code" href="user__info_8h.html#a4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a> ( ARX );
-<a name="l00176"></a>00176 SHAREDPTR ( ARX );
-<a name="l00177"></a>00177 
-<a name="l00178"></a>00178 }
-<a name="l00179"></a>00179 
-<a name="l00180"></a>00180 <span class="preprocessor">#endif // AR_H</span>
-<a name="l00181"></a>00181 <span class="preprocessor"></span>
-<a name="l00182"></a>00182 
+<a name="l00063"></a><a class="code" href="classbdm_1_1ARX.html#aa6b50507d9e7a56b38e549710ffb466d">00063</a>         <a class="code" href="classbdm_1_1egiw.html" title="Gauss-inverse-Wishart density stored in LD form.">egiw</a> <a class="code" href="classbdm_1_1ARX.html#aa6b50507d9e7a56b38e549710ffb466d" title="Alternative estimate of parameters, used in stabilized forgetting, see [Kulhavy]...">alter_est</a>;
+<a name="l00064"></a>00064 <span class="keyword">public</span>:
+<a name="l00067"></a>00067         <a class="code" href="classbdm_1_1ARX.html" title="Linear Autoregressive model with Gaussian noise.">ARX</a> ( <span class="keyword">const</span> <span class="keywordtype">double</span> frg0 = 1.0 ) : <a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a> ( frg0 ), <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a> (), <a class="code" href="classbdm_1_1ARX.html#ade5b7d83ff5d3f5af2f80068db0abdfd" title="cached value of est.V">V</a> ( <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>._V() ), <a class="code" href="classbdm_1_1ARX.html#a740b0582f180ba13cae91d66e9bdb67f" title="cached value of est.nu">nu</a> ( <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>._nu() ), <a class="code" href="classbdm_1_1ARX.html#a6dcf8458bdc25d831542c6da89961fbc" title="switch if constant is modelled or not">have_constant</a>(true), <a class="code" href="classbdm_1_1ARX.html#a8f87c2958e5690610fed2992d6ffe5c0" title="cached value of data vector for have_constant =true">_dt</a>() {};
+<a name="l00068"></a>00068         <a class="code" href="classbdm_1_1ARX.html" title="Linear Autoregressive model with Gaussian noise.">ARX</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1ARX.html" title="Linear Autoregressive model with Gaussian noise.">ARX</a> &amp;A0 ) : <a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a> (A0.<a class="code" href="classbdm_1_1BMEF.html#a1331865e10fb1ccef65bb4c47fa3be64" title="forgetting factor">frg</a>), <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a> (A0.<a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>), <a class="code" href="classbdm_1_1ARX.html#ade5b7d83ff5d3f5af2f80068db0abdfd" title="cached value of est.V">V</a> ( <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>._V() ), <a class="code" href="classbdm_1_1ARX.html#a740b0582f180ba13cae91d66e9bdb67f" title="cached value of est.nu">nu</a> ( <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>._nu() ), <a class="code" href="classbdm_1_1ARX.html#a6dcf8458bdc25d831542c6da89961fbc" title="switch if constant is modelled or not">have_constant</a>(A0.<a class="code" href="classbdm_1_1ARX.html#a6dcf8458bdc25d831542c6da89961fbc" title="switch if constant is modelled or not">have_constant</a>), <a class="code" href="classbdm_1_1ARX.html#a8f87c2958e5690610fed2992d6ffe5c0" title="cached value of data vector for have_constant =true">_dt</a>(A0.<a class="code" href="classbdm_1_1ARX.html#a8f87c2958e5690610fed2992d6ffe5c0" title="cached value of data vector for have_constant =true">_dt</a>) {
+<a name="l00069"></a>00069                 <a class="code" href="classbdm_1_1ARX.html#a8e68db2a218d54b09304cad6c0a897d9" title="size of output variable (needed in regressors)">dimx</a> = A0.<a class="code" href="classbdm_1_1ARX.html#a8e68db2a218d54b09304cad6c0a897d9" title="size of output variable (needed in regressors)">dimx</a>;
+<a name="l00070"></a>00070                 <a class="code" href="classbdm_1_1ARX.html#a363aaa55b2ab3eec602510cdf53e84ef">_yrv</a> = A0.<a class="code" href="classbdm_1_1ARX.html#a363aaa55b2ab3eec602510cdf53e84ef">_yrv</a>;
+<a name="l00071"></a>00071                 <a class="code" href="classbdm_1_1ARX.html#a320ac7b3b511bc4b26e8f8823026a453" title="rv of regressor">rgrrv</a> = A0.<a class="code" href="classbdm_1_1ARX.html#a320ac7b3b511bc4b26e8f8823026a453" title="rv of regressor">rgrrv</a>;
+<a name="l00072"></a>00072                 set_drv(A0._drv());
+<a name="l00073"></a>00073         };
+<a name="l00074"></a>00074         ARX* <a class="code" href="classbdm_1_1ARX.html#aca0b54c0997cfd567f49377af5def106">_copy_</a>() <span class="keyword">const</span>;
+<a name="l00075"></a>00075         <span class="keywordtype">void</span> set_parameters ( <span class="keywordtype">double</span> frg0 ) {
+<a name="l00076"></a>00076                 <a class="code" href="classbdm_1_1BMEF.html#a1331865e10fb1ccef65bb4c47fa3be64" title="forgetting factor">frg</a> = frg0;
+<a name="l00077"></a>00077         }
+<a name="l00078"></a>00078         <span class="keywordtype">void</span> set_statistics ( <span class="keywordtype">int</span> dimx0, <span class="keyword">const</span> ldmat V0, <span class="keywordtype">double</span> nu0 = -1.0 ) {
+<a name="l00079"></a>00079                 <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>.set_parameters ( dimx0, V0, nu0 );
+<a name="l00080"></a>00080                 <a class="code" href="classbdm_1_1BMEF.html#a06e7b3ac03e10017d4288c76888e2865" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a> = <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>.lognc();
+<a name="l00081"></a>00081                 <a class="code" href="classbdm_1_1ARX.html#a8e68db2a218d54b09304cad6c0a897d9" title="size of output variable (needed in regressors)">dimx</a> = dimx0;
+<a name="l00082"></a>00082         }
+<a name="l00084"></a>00084 
+<a name="l00086"></a>00086         <span class="keywordtype">void</span> set_statistics ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1BMEF.html#a2def512872ed8a4fc3b702371ec0be55" title="Default constructor (=empty constructor).">BMEF</a>* BM0 );
+<a name="l00087"></a>00087 
+<a name="l00090"></a>00090 
+<a name="l00092"></a>00092         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ARX.html#a17e7fe14654ab3c449846c3f43e66169" title="Weighted Bayes .">bayes</a> ( <span class="keyword">const</span> vec &amp;dt, <span class="keyword">const</span> <span class="keywordtype">double</span> w );
+<a name="l00093"></a><a class="code" href="classbdm_1_1ARX.html#a8bdf2974052e8ce74eb0d4f3791c58a3">00093</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ARX.html#a8bdf2974052e8ce74eb0d4f3791c58a3" title="Incremental Bayes rule.">bayes</a> ( <span class="keyword">const</span> vec &amp;dt ) {
+<a name="l00094"></a>00094                 <a class="code" href="classbdm_1_1ARX.html#a17e7fe14654ab3c449846c3f43e66169" title="Weighted Bayes .">bayes</a> ( dt, 1.0 );
+<a name="l00095"></a>00095         };
+<a name="l00096"></a>00096         <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1ARX.html#a080a7e531e3aa06694112863b15bc6a4">logpred</a> ( <span class="keyword">const</span> vec &amp;dt ) <span class="keyword">const</span>;
+<a name="l00097"></a>00097         <span class="keywordtype">void</span> flatten ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a>* B ) {
+<a name="l00098"></a>00098                 <span class="keyword">const</span> <a class="code" href="classbdm_1_1ARX.html" title="Linear Autoregressive model with Gaussian noise.">ARX</a>* A = <span class="keyword">dynamic_cast&lt;</span><span class="keyword">const </span><a class="code" href="classbdm_1_1ARX.html" title="Linear Autoregressive model with Gaussian noise.">ARX</a>*<span class="keyword">&gt;</span> ( B );
+<a name="l00099"></a>00099                 <span class="comment">// nu should be equal to B.nu</span>
+<a name="l00100"></a>00100                 <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>.<a class="code" href="classbdm_1_1egiw.html#a8e610e95401a11baf34f65e16ecd87be" title="Power of the density, used e.g. to flatten the density.">pow</a> ( A-&gt;<a class="code" href="classbdm_1_1ARX.html#a740b0582f180ba13cae91d66e9bdb67f" title="cached value of est.nu">nu</a> / <a class="code" href="classbdm_1_1ARX.html#a740b0582f180ba13cae91d66e9bdb67f" title="cached value of est.nu">nu</a> );
+<a name="l00101"></a>00101                 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1BM.html#afaff0ad12556fe7dc0e2807d4fd938ee" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a> ) {
+<a name="l00102"></a>00102                         <a class="code" href="classbdm_1_1BMEF.html#a06e7b3ac03e10017d4288c76888e2865" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a> = <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>.<a class="code" href="classbdm_1_1egiw.html#a41d72ba7b2abc8a9a4209ffa98ed5633" title="logarithm of the normalizing constant, ">lognc</a>();
+<a name="l00103"></a>00103                 }
+<a name="l00104"></a>00104         }
+<a name="l00106"></a>00106         enorm&lt;ldmat&gt;* <a class="code" href="classbdm_1_1ARX.html#a4cdf5e2a7d3480ec31f6247ed4289b15" title="Predictor for empty regressor.">epredictor</a> ( <span class="keyword">const</span> vec &amp;rgr ) <span class="keyword">const</span>;
+<a name="l00108"></a><a class="code" href="classbdm_1_1ARX.html#a4cdf5e2a7d3480ec31f6247ed4289b15">00108</a>         <a class="code" href="classbdm_1_1enorm.html">enorm&lt;ldmat&gt;</a>* <a class="code" href="classbdm_1_1ARX.html#a4cdf5e2a7d3480ec31f6247ed4289b15" title="Predictor for empty regressor.">epredictor</a>()<span class="keyword"> const </span>{
+<a name="l00109"></a>00109                 <a class="code" href="bdmerror_8h.html#a89a0f906b242b79c5d3d342291b2cab4" title="Throw std::runtime_exception if t is not true and NDEBUG is not defined.">bdm_assert_debug</a> ( <a class="code" href="classbdm_1_1ARX.html#a8e68db2a218d54b09304cad6c0a897d9" title="size of output variable (needed in regressors)">dimx</a> == <a class="code" href="classbdm_1_1ARX.html#ade5b7d83ff5d3f5af2f80068db0abdfd" title="cached value of est.V">V</a>.<a class="code" href="classbdm_1_1sqmat.html#a73e639221343dcce76c3305524d67590" title="Reimplementing common functions of mat: rows().">rows</a>() - 1, <span class="stringliteral">&quot;Regressor is not only 1&quot;</span> );
+<a name="l00110"></a>00110                 <span class="keywordflow">return</span> <a class="code" href="classbdm_1_1ARX.html#a4cdf5e2a7d3480ec31f6247ed4289b15" title="Predictor for empty regressor.">epredictor</a> ( vec_1 ( 1.0 ) );
+<a name="l00111"></a>00111         }
+<a name="l00113"></a>00113         <a class="code" href="classbdm_1_1mlnorm.html" title="Normal distributed linear function with linear function of mean value;.">mlnorm&lt;ldmat&gt;</a>* <a class="code" href="classbdm_1_1ARX.html#a74fe8ae2d88bee8639510fd0eaf73513" title="conditional version of the predictor">predictor</a>() <span class="keyword">const</span>;
+<a name="l00114"></a>00114         <a class="code" href="classbdm_1_1mlstudent.html">mlstudent</a>* predictor_student() <span class="keyword">const</span>;
+<a name="l00116"></a>00116         ivec <a class="code" href="classbdm_1_1ARX.html#a16b02ae03316751664c22d59d90c1e34" title="Brute force structure estimation.">structure_est</a> ( <a class="code" href="classbdm_1_1egiw.html" title="Gauss-inverse-Wishart density stored in LD form.">egiw</a> Eg0 );
+<a name="l00118"></a>00118         ivec <a class="code" href="classbdm_1_1ARX.html#a5d0f217ce270e6a8cb43a67b6c4b67fa" title="Smarter structure estimation by Ludvik Tesar.">structure_est_LT</a> ( <a class="code" href="classbdm_1_1egiw.html" title="Gauss-inverse-Wishart density stored in LD form.">egiw</a> Eg0 );
+<a name="l00120"></a>00120 
+<a name="l00123"></a>00123         <span class="keyword">const</span> <a class="code" href="classbdm_1_1egiw.html" title="Gauss-inverse-Wishart density stored in LD form.">egiw</a>&amp; posterior()<span class="keyword"> const </span>{
+<a name="l00124"></a>00124                 <span class="keywordflow">return</span> <a class="code" href="classbdm_1_1ARX.html#a11474a627367f81b76830cb8477cf026" title="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</a>;
+<a name="l00125"></a>00125         }
+<a name="l00127"></a>00127 
+<a name="l00130"></a>00130         <span class="keywordtype">void</span> set_rv ( <span class="keyword">const</span> RV &amp;yrv0 , <span class="keyword">const</span> RV &amp;rgrrv0 ) {
+<a name="l00131"></a>00131                 <a class="code" href="classbdm_1_1ARX.html#a363aaa55b2ab3eec602510cdf53e84ef">_yrv</a> = yrv0;
+<a name="l00132"></a>00132                 <a class="code" href="classbdm_1_1ARX.html#a320ac7b3b511bc4b26e8f8823026a453" title="rv of regressor">rgrrv</a>=rgrrv0;
+<a name="l00133"></a>00133                 set_drv(concat(yrv0, <a class="code" href="classbdm_1_1ARX.html#a320ac7b3b511bc4b26e8f8823026a453" title="rv of regressor">rgrrv</a>));
+<a name="l00134"></a>00134         }
+<a name="l00135"></a>00135 
+<a name="l00136"></a>00136         RV&amp; get_yrv() {
+<a name="l00137"></a>00137                 <span class="comment">//if yrv is not ready create it</span>
+<a name="l00138"></a>00138                 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1ARX.html#a363aaa55b2ab3eec602510cdf53e84ef">_yrv</a>._dsize() != <a class="code" href="classbdm_1_1ARX.html#a8e68db2a218d54b09304cad6c0a897d9" title="size of output variable (needed in regressors)">dimx</a> ) {
+<a name="l00139"></a>00139                         <span class="keywordtype">int</span> i = 0;
+<a name="l00140"></a>00140                         <span class="keywordflow">while</span> ( <a class="code" href="classbdm_1_1ARX.html#a363aaa55b2ab3eec602510cdf53e84ef">_yrv</a>._dsize() &lt; <a class="code" href="classbdm_1_1ARX.html#a8e68db2a218d54b09304cad6c0a897d9" title="size of output variable (needed in regressors)">dimx</a> ) {
+<a name="l00141"></a>00141                                 <a class="code" href="classbdm_1_1ARX.html#a363aaa55b2ab3eec602510cdf53e84ef">_yrv</a>.add ( <a class="code" href="classbdm_1_1BM.html#ac400357e37d27a4834b2b1d9211009ed" title="Random variable of the data (optional).">drv</a> ( vec_1 ( i ) ) );
+<a name="l00142"></a>00142                                 i++;
+<a name="l00143"></a>00143                         }
+<a name="l00144"></a>00144                 }
+<a name="l00145"></a>00145                 <span class="comment">//yrv should be ready by now</span>
+<a name="l00146"></a>00146                 <a class="code" href="bdmerror_8h.html#a89a0f906b242b79c5d3d342291b2cab4" title="Throw std::runtime_exception if t is not true and NDEBUG is not defined.">bdm_assert_debug</a> ( <a class="code" href="classbdm_1_1ARX.html#a363aaa55b2ab3eec602510cdf53e84ef">_yrv</a>._dsize() == <a class="code" href="classbdm_1_1ARX.html#a8e68db2a218d54b09304cad6c0a897d9" title="size of output variable (needed in regressors)">dimx</a>, <span class="stringliteral">&quot;incompatible drv&quot;</span> );
+<a name="l00147"></a>00147                 <span class="keywordflow">return</span> <a class="code" href="classbdm_1_1ARX.html#a363aaa55b2ab3eec602510cdf53e84ef">_yrv</a>;
+<a name="l00148"></a>00148         }
+<a name="l00150"></a>00150 
+<a name="l00171"></a>00171         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ARX.html#a9637412df898048bafaefee9dc7e9f6c">from_setting</a> ( <span class="keyword">const</span> Setting &amp;<span class="keyword">set</span> );
+<a name="l00172"></a>00172 
+<a name="l00173"></a><a class="code" href="classbdm_1_1ARX.html#a5b4ae27fa320a1b6e09777239210566d">00173</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ARX.html#a5b4ae27fa320a1b6e09777239210566d" title="This method TODO.">validate</a>() {
+<a name="l00174"></a>00174                 <a class="code" href="bdmerror_8h.html#a7a3399d182b8e3065532596e76f84849" title="Throw std::runtime_exception if t is not true.">bdm_assert</a>(<a class="code" href="classbdm_1_1ARX.html#a8e68db2a218d54b09304cad6c0a897d9" title="size of output variable (needed in regressors)">dimx</a> == <a class="code" href="classbdm_1_1ARX.html#a363aaa55b2ab3eec602510cdf53e84ef">_yrv</a>.<a class="code" href="classbdm_1_1RV.html#ade30156104f61d86c94f758861418089" title="total size of a random variable">_dsize</a>(), <span class="stringliteral">&quot;RVs of parameters and regressor do not match&quot;</span>);
+<a name="l00175"></a>00175                 
+<a name="l00176"></a>00176         }
+<a name="l00177"></a>00177 };
+<a name="l00178"></a>00178 
+<a name="l00179"></a>00179 <a class="code" href="user__info_8h.html#a4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a> ( ARX );
+<a name="l00180"></a>00180 SHAREDPTR ( ARX );
+<a name="l00181"></a>00181 
+<a name="l00185"></a><a class="code" href="classbdm_1_1ARXfrg.html">00185</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1ARXfrg.html">ARXfrg</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1ARX.html" title="Linear Autoregressive model with Gaussian noise.">ARX</a>{
+<a name="l00186"></a>00186         <span class="keyword">public</span>:
+<a name="l00187"></a>00187                 <a class="code" href="classbdm_1_1ARXfrg.html">ARXfrg</a>():<a class="code" href="classbdm_1_1ARX.html" title="Linear Autoregressive model with Gaussian noise.">ARX</a>(){};
+<a name="l00188"></a>00188                 <a class="code" href="classbdm_1_1ARXfrg.html">ARXfrg</a>(<span class="keyword">const</span> <a class="code" href="classbdm_1_1ARXfrg.html">ARXfrg</a> &amp;A0):<a class="code" href="classbdm_1_1ARX.html" title="Linear Autoregressive model with Gaussian noise.">ARX</a>(A0){};
+<a name="l00189"></a><a class="code" href="classbdm_1_1ARXfrg.html#a420f3f195d231723f2f2329ec900de60">00189</a>                 <a class="code" href="classbdm_1_1ARXfrg.html">ARXfrg</a>* <a class="code" href="classbdm_1_1ARXfrg.html#a420f3f195d231723f2f2329ec900de60">_copy_</a>()<span class="keyword"> const </span>{<a class="code" href="classbdm_1_1ARXfrg.html">ARXfrg</a> *A = <span class="keyword">new</span> <a class="code" href="classbdm_1_1ARXfrg.html">ARXfrg</a>(*<span class="keyword">this</span>); <span class="keywordflow">return</span> A;}
+<a name="l00190"></a><a class="code" href="classbdm_1_1ARXfrg.html#a2baaf50640620cbd4c089a608e0c41bb">00190</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ARXfrg.html#a2baaf50640620cbd4c089a608e0c41bb" title="Substitute val for rvc.">condition</a>(<span class="keyword">const</span> vec &amp;val){
+<a name="l00191"></a>00191                 <a class="code" href="classbdm_1_1BMEF.html#a1331865e10fb1ccef65bb4c47fa3be64" title="forgetting factor">frg</a> = val(0);
+<a name="l00192"></a>00192         }
+<a name="l00193"></a>00193 };
+<a name="l00194"></a>00194 <a class="code" href="user__info_8h.html#a4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a>(ARXfrg);
+<a name="l00195"></a>00195 };
+<a name="l00196"></a>00196 <span class="preprocessor">#endif // AR_H</span>
+<a name="l00197"></a>00197 <span class="preprocessor"></span>
+<a name="l00198"></a>00198 
 </pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on Fri Sep 18 00:12:02 2009 for mixpp by&nbsp;
+<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 27 00:49:04 2009 for mixpp by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
