Index: doc/html/libEF_8h-source.html
===================================================================
--- doc/html/libEF_8h-source.html (revision 171)
+++ doc/html/libEF_8h-source.html (revision 180)
@@ -65,358 +65,369 @@
 <a name="l00090"></a>00090         <span class="comment">//original Bayes</span>
 <a name="l00091"></a>00091         <span class="keywordtype">void</span> <a class="code" href="classBMEF.html#8f4ecb6e2eaf630155a1fa98f35aa6ad" title="Weighted update of sufficient statistics (Bayes rule).">bayes</a> ( <span class="keyword">const</span> vec &amp;dt );
-<a name="l00093"></a><a class="code" href="classBMEF.html#afda119ee86cadadfd2b67335a7cf052">00093</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBMEF.html#afda119ee86cadadfd2b67335a7cf052" title="Flatten the posterior.">flatten</a> ( <a class="code" href="classBMEF.html" title="Estimator for Exponential family.">BMEF</a> * B) {it_error ( <span class="stringliteral">"Not implemented"</span> );}
+<a name="l00093"></a><a class="code" href="classBMEF.html#afda119ee86cadadfd2b67335a7cf052">00093</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBMEF.html#afda119ee86cadadfd2b67335a7cf052" title="Flatten the posterior.">flatten</a> ( <a class="code" href="classBMEF.html" title="Estimator for Exponential family.">BMEF</a> * B ) {it_error ( <span class="stringliteral">"Not implemented"</span> );}
 <a name="l00094"></a>00094 };
 <a name="l00095"></a>00095 
 <a name="l00101"></a>00101 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
-<a name="l00102"></a>00102 
-<a name="l00103"></a><a class="code" href="classenorm.html">00103</a> <span class="keyword">class </span><a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm</a> : <span class="keyword">public</span> <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> {
-<a name="l00104"></a>00104 <span class="keyword">protected</span>:
-<a name="l00106"></a><a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20">00106</a>         vec <a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>;
-<a name="l00108"></a><a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1">00108</a>         sq_T <a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>;
-<a name="l00110"></a><a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e">00110</a>         <span class="keywordtype">int</span> <a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e" title="dimension (redundant from rv.count() for easier coding )">dim</a>;
-<a name="l00111"></a>00111 <span class="keyword">public</span>:
-<a name="l00112"></a>00112 <span class="comment">//      enorm() :eEF() {};</span>
-<a name="l00114"></a>00114 <span class="comment"></span>        <a class="code" href="classenorm.html#7b5cb487a2570e8109bfdc0df149aa06" title="Default constructor.">enorm</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;<a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a> );
-<a name="l00116"></a>00116         <span class="keywordtype">void</span> <a class="code" href="classenorm.html#1394a65caa6e00d42e00cc99b12227af" title="Set mean value mu and covariance R.">set_parameters</a> ( <span class="keyword">const</span> vec &amp;<a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>,<span class="keyword">const</span> sq_T &amp;<a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a> );
-<a name="l00118"></a>00118         <span class="keywordtype">void</span> <a class="code" href="classenorm.html#5b5fd142b6b17ea334597960e3fe126a" title="tupdate in exponential form (not really handy)">tupdate</a> ( <span class="keywordtype">double</span> phi, mat &amp;vbar, <span class="keywordtype">double</span> nubar );
-<a name="l00120"></a>00120         <span class="keywordtype">void</span> <a class="code" href="classenorm.html#5bf185e31e5954fceb90ada3debd2ff2" title="dupdate in exponential form (not really handy)">dupdate</a> ( mat &amp;v,<span class="keywordtype">double</span> nu=1.0 );
-<a name="l00121"></a>00121 
-<a name="l00122"></a>00122         vec <a class="code" href="classenorm.html#60b47544f6181ffd4530d3e415ce12c5" title="Returns a sample,  from density .">sample</a>() <span class="keyword">const</span>;
-<a name="l00124"></a>00124         mat <a class="code" href="classenorm.html#60b47544f6181ffd4530d3e415ce12c5" title="Returns a sample,  from density .">sample</a> ( <span class="keywordtype">int</span> N ) <span class="keyword">const</span>;
-<a name="l00125"></a>00125         <span class="keywordtype">double</span> <a class="code" href="classenorm.html#b9e1dfd33692d7b3f1a59f17b0e61bd0" title="Compute probability of argument val.">eval</a> ( <span class="keyword">const</span> vec &amp;val ) <span class="keyword">const</span> ;
-<a name="l00126"></a>00126         <span class="keywordtype">double</span> <a class="code" href="classenorm.html#609a7c33dbb4fdfab050f3bdd1122401" title="Evaluate normalized log-probability.">evalpdflog</a> ( <span class="keyword">const</span> vec &amp;val ) <span class="keyword">const</span>;
-<a name="l00127"></a>00127         <span class="keywordtype">double</span> <a class="code" href="classenorm.html#b289a36a69db59d182bb6eba9c05d4a8" title="logarithm of the normalizing constant, ">lognc</a> () <span class="keyword">const</span>;
-<a name="l00128"></a><a class="code" href="classenorm.html#50fa84da7bae02f7af17a98f37566899">00128</a>         vec <a class="code" href="classenorm.html#50fa84da7bae02f7af17a98f37566899" title="return expected value">mean</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>;}
-<a name="l00129"></a>00129 
-<a name="l00130"></a>00130 <span class="comment">//Access methods</span>
-<a name="l00132"></a><a class="code" href="classenorm.html#0b8cb284e5af920a1b64a21d057ec5ac">00132</a> <span class="comment"></span>        vec&amp; <a class="code" href="classenorm.html#0b8cb284e5af920a1b64a21d057ec5ac" title="returns a pointer to the internal mean value. Use with Care!">_mu</a>() {<span class="keywordflow">return</span> <a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>;}
-<a name="l00133"></a>00133 
-<a name="l00135"></a><a class="code" href="classenorm.html#d892a38f03be12e572ea57d9689cef6b">00135</a>         <span class="keywordtype">void</span> <a class="code" href="classenorm.html#d892a38f03be12e572ea57d9689cef6b" title="access function">set_mu</a> ( <span class="keyword">const</span> vec mu0 ) { <a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>=mu0;}
-<a name="l00136"></a>00136 
-<a name="l00138"></a><a class="code" href="classenorm.html#7a5034b25771a84450a990d10fc40ac9">00138</a>         sq_T&amp; <a class="code" href="classenorm.html#7a5034b25771a84450a990d10fc40ac9" title="returns pointers to the internal variance and its inverse. Use with Care!">_R</a>() {<span class="keywordflow">return</span> <a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>;}
-<a name="l00139"></a>00139 
-<a name="l00141"></a><a class="code" href="classenorm.html#9b9f58dc86affa23511c246887420658">00141</a>         mat <a class="code" href="classenorm.html#9b9f58dc86affa23511c246887420658" title="access method">getR</a> () {<span class="keywordflow">return</span> <a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>.to_mat();}
-<a name="l00142"></a>00142 };
-<a name="l00143"></a>00143 
-<a name="l00150"></a><a class="code" href="classegiw.html">00150</a> <span class="keyword">class </span><a class="code" href="classegiw.html" title="Gauss-inverse-Wishart density stored in LD form.">egiw</a> : <span class="keyword">public</span> <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> {
-<a name="l00151"></a>00151 <span class="keyword">protected</span>:
-<a name="l00153"></a><a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442">00153</a>         <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> <a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a>;
-<a name="l00155"></a><a class="code" href="classegiw.html#4a2f130b91afe84f6d62fed289d5d453">00155</a>         <span class="keywordtype">double</span> <a class="code" href="classegiw.html#4a2f130b91afe84f6d62fed289d5d453" title="Number of data records (degrees of freedom) of sufficient statistics.">nu</a>;
-<a name="l00157"></a><a class="code" href="classegiw.html#3d5c719f15a5527a6c62c2a53160148e">00157</a>         <span class="keywordtype">int</span> <a class="code" href="classegiw.html#3d5c719f15a5527a6c62c2a53160148e" title="Dimension of the output.">xdim</a>;
-<a name="l00159"></a><a class="code" href="classegiw.html#c70d13d86e0d9f0acede3e1dc0368812">00159</a>         <span class="keywordtype">int</span> <a class="code" href="classegiw.html#c70d13d86e0d9f0acede3e1dc0368812" title="Dimension of the regressor.">nPsi</a>;
-<a name="l00160"></a>00160 <span class="keyword">public</span>:
-<a name="l00162"></a><a class="code" href="classegiw.html#c52a2173c6eb1490edce9c6c7c05d60b">00162</a>         <a class="code" href="classegiw.html#c52a2173c6eb1490edce9c6c7c05d60b" title="Default constructor, assuming.">egiw</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>, mat V0, <span class="keywordtype">double</span> nu0 ) : <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> ( rv ), <a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a> ( V0 ), <a class="code" href="classegiw.html#4a2f130b91afe84f6d62fed289d5d453" title="Number of data records (degrees of freedom) of sufficient statistics.">nu</a> ( nu0 ) {
-<a name="l00163"></a>00163                 <a class="code" href="classegiw.html#3d5c719f15a5527a6c62c2a53160148e" title="Dimension of the output.">xdim</a> = rv.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>() /<a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a>.<a class="code" href="classldmat.html#96dfb21865db4f5bd36fa70f9b0b1163" title="access function">rows</a>();
-<a name="l00164"></a>00164                 it_assert_debug ( rv.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>() ==<a class="code" href="classegiw.html#3d5c719f15a5527a6c62c2a53160148e" title="Dimension of the output.">xdim</a>*<a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a>.<a class="code" href="classldmat.html#96dfb21865db4f5bd36fa70f9b0b1163" title="access function">rows</a>(),<span class="stringliteral">"Incompatible V0."</span> );
-<a name="l00165"></a>00165                 <a class="code" href="classegiw.html#c70d13d86e0d9f0acede3e1dc0368812" title="Dimension of the regressor.">nPsi</a> = <a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a>.<a class="code" href="classldmat.html#96dfb21865db4f5bd36fa70f9b0b1163" title="access function">rows</a>()-<a class="code" href="classegiw.html#3d5c719f15a5527a6c62c2a53160148e" title="Dimension of the output.">xdim</a>;
-<a name="l00166"></a>00166         }
-<a name="l00168"></a><a class="code" href="classegiw.html#1a17fdbac6c72b9c3abb97623db466c8">00168</a>         <a class="code" href="classegiw.html#c52a2173c6eb1490edce9c6c7c05d60b" title="Default constructor, assuming.">egiw</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>, <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> V0, <span class="keywordtype">double</span> nu0 ) : <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> ( rv ), <a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a> ( V0 ), <a class="code" href="classegiw.html#4a2f130b91afe84f6d62fed289d5d453" title="Number of data records (degrees of freedom) of sufficient statistics.">nu</a> ( nu0 ) {
-<a name="l00169"></a>00169                 <a class="code" href="classegiw.html#3d5c719f15a5527a6c62c2a53160148e" title="Dimension of the output.">xdim</a> = rv.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>() /<a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a>.<a class="code" href="classldmat.html#96dfb21865db4f5bd36fa70f9b0b1163" title="access function">rows</a>();
-<a name="l00170"></a>00170                 it_assert_debug ( rv.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>() ==<a class="code" href="classegiw.html#3d5c719f15a5527a6c62c2a53160148e" title="Dimension of the output.">xdim</a>*<a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a>.<a class="code" href="classldmat.html#96dfb21865db4f5bd36fa70f9b0b1163" title="access function">rows</a>(),<span class="stringliteral">"Incompatible V0."</span> );
-<a name="l00171"></a>00171                 <a class="code" href="classegiw.html#c70d13d86e0d9f0acede3e1dc0368812" title="Dimension of the regressor.">nPsi</a> = <a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a>.<a class="code" href="classldmat.html#96dfb21865db4f5bd36fa70f9b0b1163" title="access function">rows</a>()-<a class="code" href="classegiw.html#3d5c719f15a5527a6c62c2a53160148e" title="Dimension of the output.">xdim</a>;
-<a name="l00172"></a>00172         }
-<a name="l00173"></a>00173 
-<a name="l00174"></a>00174         vec <a class="code" href="classegiw.html#3d2c1f2ba0f9966781f1e0ae695e8a6f" title="Returns a sample,  from density .">sample</a>() <span class="keyword">const</span>;
-<a name="l00175"></a>00175         vec <a class="code" href="classegiw.html#6deb0ff2859f41ef7cbdf6a842cabb29" title="return expected value">mean</a>() <span class="keyword">const</span>;
-<a name="l00176"></a>00176         <span class="keywordtype">void</span> mean_mat ( mat &amp;M, mat&amp;R ) <span class="keyword">const</span>;
-<a name="l00178"></a>00178         <span class="keywordtype">double</span> <a class="code" href="classegiw.html#2ab1e525d692be8272a6f383d60b94cd" title="In this instance, val= [theta, r]. For multivariate instances, it is stored columnwise...">evalpdflog_nn</a> ( <span class="keyword">const</span> vec &amp;val ) <span class="keyword">const</span>;
-<a name="l00179"></a>00179         <span class="keywordtype">double</span> <a class="code" href="classegiw.html#70eb1a0b88459b227f919b425b0d3359" title="logarithm of the normalizing constant, ">lognc</a> () <span class="keyword">const</span>;
-<a name="l00180"></a>00180 
-<a name="l00181"></a>00181         <span class="comment">//Access</span>
-<a name="l00183"></a><a class="code" href="classegiw.html#533e792e1175bfa06d5d595dc5d080d5">00183</a> <span class="comment"></span>        <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a>&amp; <a class="code" href="classegiw.html#533e792e1175bfa06d5d595dc5d080d5" title="returns a pointer to the internal statistics. Use with Care!">_V</a>() {<span class="keywordflow">return</span> <a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a>;}
-<a name="l00185"></a><a class="code" href="classegiw.html#08029c481ff95d24f093df0573879afe">00185</a>         <span class="keywordtype">double</span>&amp; <a class="code" href="classegiw.html#08029c481ff95d24f093df0573879afe" title="returns a pointer to the internal statistics. Use with Care!">_nu</a>() {<span class="keywordflow">return</span> <a class="code" href="classegiw.html#4a2f130b91afe84f6d62fed289d5d453" title="Number of data records (degrees of freedom) of sufficient statistics.">nu</a>;}
-<a name="l00186"></a>00186         <span class="keywordtype">void</span> <a class="code" href="classegiw.html#036306322a90a9977834baac07460816" title="Power of the density, used e.g. to flatten the density.">pow</a> ( <span class="keywordtype">double</span> p );
-<a name="l00187"></a>00187 };
-<a name="l00188"></a>00188 
-<a name="l00197"></a><a class="code" href="classeDirich.html">00197</a> <span class="keyword">class </span><a class="code" href="classeDirich.html" title="Dirichlet posterior density.">eDirich</a>: <span class="keyword">public</span> <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> {
-<a name="l00198"></a>00198 <span class="keyword">protected</span>:
-<a name="l00200"></a><a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7">00200</a>         vec <a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a>;
-<a name="l00201"></a>00201 <span class="keyword">public</span>:
-<a name="l00203"></a><a class="code" href="classeDirich.html#ac7e6116f3575c3860d07355e96cd4af">00203</a>         <a class="code" href="classeDirich.html#ac7e6116f3575c3860d07355e96cd4af" title="Default constructor.">eDirich</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#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a>, <span class="keyword">const</span> vec &amp;beta0 ) : <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> ( rv ),<a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a> ( beta0 ) {it_assert_debug ( rv.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>() ==<a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a>.length(),<span class="stringliteral">"Incompatible statistics"</span> ); };
-<a name="l00205"></a><a class="code" href="classeDirich.html#55cccbc5eb44764dce722567acf5fd58">00205</a>         <a class="code" href="classeDirich.html#ac7e6116f3575c3860d07355e96cd4af" title="Default constructor.">eDirich</a> ( <span class="keyword">const</span> <a class="code" href="classeDirich.html" title="Dirichlet posterior density.">eDirich</a> &amp;D0 ) : <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> ( D0.<a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a> ),<a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a> ( D0.<a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a> ) {};
-<a name="l00206"></a><a class="code" href="classeDirich.html#23dff79110822e9639343fe8e177fd80">00206</a>         vec <a class="code" href="classeDirich.html#23dff79110822e9639343fe8e177fd80" title="Returns a sample,  from density .">sample</a>()<span class="keyword"> const </span>{it_error ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> vec_1 ( 0.0 );};
-<a name="l00207"></a><a class="code" href="classeDirich.html#4206e1da149d51ff3b663c9241096b73">00207</a>         vec <a class="code" href="classeDirich.html#4206e1da149d51ff3b663c9241096b73" title="return expected value">mean</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a>/sum ( <a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a> );};
-<a name="l00209"></a><a class="code" href="classeDirich.html#688a24f04be6d80d4769cf0e4ded7acc">00209</a>         <span class="keywordtype">double</span> <a class="code" href="classeDirich.html#688a24f04be6d80d4769cf0e4ded7acc" title="In this instance, val= [theta, r]. For multivariate instances, it is stored columnwise...">evalpdflog_nn</a> ( <span class="keyword">const</span> vec &amp;val )<span class="keyword"> const </span>{<span class="keywordflow">return</span> ( <a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a>-1 ) *log ( val );};
-<a name="l00210"></a><a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77">00210</a>         <span class="keywordtype">double</span> <a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77" title="logarithm of the normalizing constant, ">lognc</a> ()<span class="keyword"> const </span>{
-<a name="l00211"></a>00211                 <span class="keywordtype">double</span> gam=sum ( <a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a> );
-<a name="l00212"></a>00212                 <span class="keywordtype">double</span> lgb=0.0;
-<a name="l00213"></a>00213                 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i&lt;<a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a>.length();i++ ) {lgb+=lgamma ( <a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a> ( i ) );}
-<a name="l00214"></a>00214                 <span class="keywordflow">return</span> lgb-lgamma ( gam );
-<a name="l00215"></a>00215         };
-<a name="l00217"></a><a class="code" href="classeDirich.html#6409d0362143a23976b43641ff19e53a">00217</a>         vec&amp; <a class="code" href="classeDirich.html#6409d0362143a23976b43641ff19e53a" title="access function">_beta</a>() {<span class="keywordflow">return</span> <a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a>;}
-<a name="l00218"></a>00218 };
-<a name="l00219"></a>00219 
-<a name="l00221"></a><a class="code" href="classmultiBM.html">00221</a> <span class="keyword">class </span><a class="code" href="classmultiBM.html" title="Estimator for Multinomial density.">multiBM</a> : <span class="keyword">public</span> <a class="code" href="classBMEF.html" title="Estimator for Exponential family.">BMEF</a> {
-<a name="l00222"></a>00222 <span class="keyword">protected</span>:
-<a name="l00224"></a><a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5">00224</a>         <a class="code" href="classeDirich.html" title="Dirichlet posterior density.">eDirich</a> <a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>;
-<a name="l00225"></a>00225         vec &amp;beta;
-<a name="l00226"></a>00226 <span class="keyword">public</span>:
-<a name="l00228"></a><a class="code" href="classmultiBM.html#7d7d7e78c129602bcde96078359dc6e5">00228</a>         <a class="code" href="classmultiBM.html#7d7d7e78c129602bcde96078359dc6e5" title="Default constructor.">multiBM</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#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>, <span class="keyword">const</span> vec beta0 ) : <a class="code" href="classBMEF.html" title="Estimator for Exponential family.">BMEF</a> ( rv ),<a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a> ( rv,beta0 ),beta ( <a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>._beta() ) {<a class="code" href="classBMEF.html#308cf5d4133cd471fdf1ecd5dfa09d02" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a>=<a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>.<a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77" title="logarithm of the normalizing constant, ">lognc</a>();}
-<a name="l00230"></a><a class="code" href="classmultiBM.html#b92751adbfb9f259ca8c95232cfd9c09">00230</a>         <a class="code" href="classmultiBM.html#7d7d7e78c129602bcde96078359dc6e5" title="Default constructor.">multiBM</a> ( <span class="keyword">const</span> <a class="code" href="classmultiBM.html" title="Estimator for Multinomial density.">multiBM</a> &amp;B ) : <a class="code" href="classBMEF.html" title="Estimator for Exponential family.">BMEF</a> ( B ),<a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a> ( <a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>,B.beta ),beta ( <a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>._beta() ) {}
-<a name="l00231"></a>00231 
-<a name="l00232"></a>00232         <span class="keywordtype">void</span> set_statistics ( <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>* mB0 ) {<span class="keyword">const</span> <a class="code" href="classmultiBM.html" title="Estimator for Multinomial density.">multiBM</a>* mB=<span class="keyword">dynamic_cast&lt;</span><span class="keyword">const </span><a class="code" href="classmultiBM.html" title="Estimator for Multinomial density.">multiBM</a>*<span class="keyword">&gt;</span> ( mB0 ); beta=mB-&gt;<a class="code" href="classmultiBM.html#7b606116aed7e8834a339cbb0424b1d6">beta</a>;}
-<a name="l00233"></a><a class="code" href="classmultiBM.html#11eeba7e97954e316e959116f90d80e2">00233</a>         <span class="keywordtype">void</span> <a class="code" href="classmultiBM.html#11eeba7e97954e316e959116f90d80e2" title="Incremental Bayes rule.">bayes</a> ( <span class="keyword">const</span> vec &amp;dt ) {
-<a name="l00234"></a>00234                 <span class="keywordflow">if</span> ( <a class="code" href="classBMEF.html#538d632e59f9afa8daa1de74da12ce71" title="forgetting factor">frg</a>&lt;1.0 ) {beta*=<a class="code" href="classBMEF.html#538d632e59f9afa8daa1de74da12ce71" title="forgetting factor">frg</a>;<a class="code" href="classBMEF.html#308cf5d4133cd471fdf1ecd5dfa09d02" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a>=<a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>.<a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77" title="logarithm of the normalizing constant, ">lognc</a>();}
-<a name="l00235"></a>00235                 beta+=dt;
-<a name="l00236"></a>00236                 <span class="keywordflow">if</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> ) {<a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>=<a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>.<a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77" title="logarithm of the normalizing constant, ">lognc</a>()-<a class="code" href="classBMEF.html#308cf5d4133cd471fdf1ecd5dfa09d02" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a>;}
-<a name="l00237"></a>00237         }
-<a name="l00238"></a><a class="code" href="classmultiBM.html#13e26a61757278981fd8cac9a7ef91eb">00238</a>         <span class="keywordtype">double</span> <a class="code" href="classmultiBM.html#13e26a61757278981fd8cac9a7ef91eb">logpred</a> ( <span class="keyword">const</span> vec &amp;dt )<span class="keyword"> const </span>{
-<a name="l00239"></a>00239                 <a class="code" href="classeDirich.html" title="Dirichlet posterior density.">eDirich</a> pred ( <a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a> );
-<a name="l00240"></a>00240                 vec &amp;beta = pred.<a class="code" href="classeDirich.html#6409d0362143a23976b43641ff19e53a" title="access function">_beta</a>();
-<a name="l00241"></a>00241                 
-<a name="l00242"></a>00242                 <span class="keywordtype">double</span> lll;
-<a name="l00243"></a>00243                 <span class="keywordflow">if</span> ( <a class="code" href="classBMEF.html#538d632e59f9afa8daa1de74da12ce71" title="forgetting factor">frg</a>&lt;1.0 )
-<a name="l00244"></a>00244                         {beta*=<a class="code" href="classBMEF.html#538d632e59f9afa8daa1de74da12ce71" title="forgetting factor">frg</a>;lll=pred.<a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77" title="logarithm of the normalizing constant, ">lognc</a>();}
-<a name="l00245"></a>00245                 <span class="keywordflow">else</span>
-<a name="l00246"></a>00246                         <span class="keywordflow">if</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> ) {lll=<a class="code" href="classBMEF.html#308cf5d4133cd471fdf1ecd5dfa09d02" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a>;}
-<a name="l00247"></a>00247                         <span class="keywordflow">else</span>{lll=pred.<a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77" title="logarithm of the normalizing constant, ">lognc</a>();}
-<a name="l00248"></a>00248 
-<a name="l00249"></a>00249                 beta+=dt;
-<a name="l00250"></a>00250                 <span class="keywordflow">return</span> pred.<a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77" title="logarithm of the normalizing constant, ">lognc</a>()-lll;
-<a name="l00251"></a>00251         }
-<a name="l00252"></a><a class="code" href="classmultiBM.html#58257073a90aab5d1aafbc9b805d324a">00252</a>         <span class="keywordtype">void</span> <a class="code" href="classmultiBM.html#58257073a90aab5d1aafbc9b805d324a" title="Flatten the posterior.">flatten</a> (<a class="code" href="classBMEF.html" title="Estimator for Exponential family.">BMEF</a>* B ) {
-<a name="l00253"></a>00253                 <a class="code" href="classeDirich.html" title="Dirichlet posterior density.">eDirich</a>* E=<span class="keyword">dynamic_cast&lt;</span><a class="code" href="classeDirich.html" title="Dirichlet posterior density.">eDirich</a>*<span class="keyword">&gt;</span>(B);
-<a name="l00254"></a>00254                 <span class="comment">// sum(beta) should be equal to sum(B.beta)</span>
-<a name="l00255"></a>00255                 <span class="keyword">const</span> vec &amp;Eb=E-&gt;<a class="code" href="classeDirich.html#6409d0362143a23976b43641ff19e53a" title="access function">_beta</a>();
-<a name="l00256"></a>00256                 <a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>.<a class="code" href="classeEF.html#4f8385dd1cc9740522dc373b1dc3cbf5" title="Power of the density, used e.g. to flatten the density.">pow</a> ( sum(beta)/sum(Eb) );
-<a name="l00257"></a>00257                 <span class="keywordflow">if</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>){<a class="code" href="classBMEF.html#308cf5d4133cd471fdf1ecd5dfa09d02" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a>=<a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>.<a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77" title="logarithm of the normalizing constant, ">lognc</a>();}
-<a name="l00258"></a>00258         }
-<a name="l00259"></a><a class="code" href="classmultiBM.html#66cdfd83a70bc281840ab0646b941684">00259</a>         <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="classmultiBM.html#66cdfd83a70bc281840ab0646b941684" title="Returns a pointer to the epdf representing posterior density on parameters. Use with...">_epdf</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>;};
-<a name="l00261"></a>00261 };
-<a name="l00262"></a>00262 
-<a name="l00272"></a><a class="code" href="classegamma.html">00272</a> <span class="keyword">class </span><a class="code" href="classegamma.html" title="Gamma posterior density.">egamma</a> : <span class="keyword">public</span> <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> {
-<a name="l00273"></a>00273 <span class="keyword">protected</span>:
-<a name="l00275"></a><a class="code" href="classegamma.html#376cebd8932546c440f21b182910b01b">00275</a>         vec <a class="code" href="classegamma.html#376cebd8932546c440f21b182910b01b" title="Vector .">alpha</a>;
-<a name="l00277"></a><a class="code" href="classegamma.html#cfc5f136467488a421ab22f886323790">00277</a>         vec <a class="code" href="classegamma.html#cfc5f136467488a421ab22f886323790" title="Vector .">beta</a>;
-<a name="l00278"></a>00278 <span class="keyword">public</span> :
-<a name="l00280"></a><a class="code" href="classegamma.html#4b1d34f3b244ea51a58ec10c468788c1">00280</a>         <a class="code" href="classegamma.html#4b1d34f3b244ea51a58ec10c468788c1" title="Default constructor.">egamma</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#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a> ) :<a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> ( rv ) {};
-<a name="l00282"></a><a class="code" href="classegamma.html#8e348b89be82b70471fe8c5630f61339">00282</a>         <span class="keywordtype">void</span> <a class="code" href="classegamma.html#8e348b89be82b70471fe8c5630f61339" title="Sets parameters.">set_parameters</a> ( <span class="keyword">const</span> vec &amp;a, <span class="keyword">const</span> vec &amp;b ) {<a class="code" href="classegamma.html#376cebd8932546c440f21b182910b01b" title="Vector .">alpha</a>=a,<a class="code" href="classegamma.html#cfc5f136467488a421ab22f886323790" title="Vector .">beta</a>=b;};
-<a name="l00283"></a>00283         vec <a class="code" href="classegamma.html#8e10c0021b5dfdd9cb62c6959b5ef425" title="Returns a sample,  from density .">sample</a>() <span class="keyword">const</span>;
-<a name="l00285"></a>00285 <span class="comment">//      mat sample ( int N ) const;</span>
-<a name="l00286"></a>00286         <span class="keywordtype">double</span> <a class="code" href="classegamma.html#de84faac8f9799dfe2777ddbedf997ef" title="TODO: is it used anywhere?">evalpdflog</a> ( <span class="keyword">const</span> vec &amp;val ) <span class="keyword">const</span>;
-<a name="l00287"></a>00287         <span class="keywordtype">double</span> <a class="code" href="classegamma.html#d6dbbdb72360f9e54d64501f80318bb6" title="logarithm of the normalizing constant, ">lognc</a> () <span class="keyword">const</span>;
-<a name="l00289"></a><a class="code" href="classegamma.html#44445c56e60b91b377f207f8d5089790">00289</a>         <span class="keywordtype">void</span> <a class="code" href="classegamma.html#44445c56e60b91b377f207f8d5089790" title="Returns poiter to alpha and beta. Potentially dengerous: use with care!">_param</a> ( vec* &amp;a, vec* &amp;b ) {a=&amp;<a class="code" href="classegamma.html#376cebd8932546c440f21b182910b01b" title="Vector .">alpha</a>;b=&amp;<a class="code" href="classegamma.html#cfc5f136467488a421ab22f886323790" title="Vector .">beta</a>;};
-<a name="l00290"></a><a class="code" href="classegamma.html#6ab5ba56f7cdb2e5921c3e77524fa50a">00290</a>         vec <a class="code" href="classegamma.html#6ab5ba56f7cdb2e5921c3e77524fa50a" title="return expected value">mean</a>()<span class="keyword"> const </span>{vec pom ( <a class="code" href="classegamma.html#376cebd8932546c440f21b182910b01b" title="Vector .">alpha</a> ); pom/=<a class="code" href="classegamma.html#cfc5f136467488a421ab22f886323790" title="Vector .">beta</a>; <span class="keywordflow">return</span> pom;}
-<a name="l00291"></a>00291 };
-<a name="l00292"></a>00292 <span class="comment">/*</span>
-<a name="l00294"></a>00294 <span class="comment">class emix : public epdf {</span>
-<a name="l00295"></a>00295 <span class="comment">protected:</span>
-<a name="l00296"></a>00296 <span class="comment">        int n;</span>
-<a name="l00297"></a>00297 <span class="comment">        vec &amp;w;</span>
-<a name="l00298"></a>00298 <span class="comment">        Array&lt;epdf*&gt; Coms;</span>
-<a name="l00299"></a>00299 <span class="comment">public:</span>
-<a name="l00301"></a>00301 <span class="comment">        emix ( const RV &amp;rv, vec &amp;w0): epdf(rv), n(w0.length()), w(w0), Coms(n) {};</span>
-<a name="l00302"></a>00302 <span class="comment">        void set_parameters( int &amp;i, double wi, epdf* ep){w(i)=wi;Coms(i)=ep;}</span>
-<a name="l00303"></a>00303 <span class="comment">        vec mean(){vec pom; for(int i=0;i&lt;n;i++){pom+=Coms(i)-&gt;mean()*w(i);} return pom;};</span>
-<a name="l00304"></a>00304 <span class="comment">        vec sample() {it_error ( "Not implemented" );return 0;}</span>
-<a name="l00305"></a>00305 <span class="comment">};</span>
-<a name="l00306"></a>00306 <span class="comment">*/</span>
-<a name="l00307"></a>00307 
-<a name="l00309"></a>00309 
-<a name="l00310"></a><a class="code" href="classeuni.html">00310</a> <span class="keyword">class </span><a class="code" href="classeuni.html" title="Uniform distributed density on a rectangular support.">euni</a>: <span class="keyword">public</span> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> {
-<a name="l00311"></a>00311 <span class="keyword">protected</span>:
-<a name="l00313"></a><a class="code" href="classeuni.html#ef42cd8d7645422048d46c46ec5cdac1">00313</a>         vec <a class="code" href="classeuni.html#ef42cd8d7645422048d46c46ec5cdac1" title="lower bound on support">low</a>;
-<a name="l00315"></a><a class="code" href="classeuni.html#71b6d6b41aeb61a7f76f682b72119231">00315</a>         vec <a class="code" href="classeuni.html#71b6d6b41aeb61a7f76f682b72119231" title="upper bound on support">high</a>;
-<a name="l00317"></a><a class="code" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4">00317</a>         vec <a class="code" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4" title="internal">distance</a>;
-<a name="l00319"></a><a class="code" href="classeuni.html#63105490e946e43372d6187ad1bafdda">00319</a>         <span class="keywordtype">double</span> <a class="code" href="classeuni.html#63105490e946e43372d6187ad1bafdda" title="normalizing coefficients">nk</a>;
-<a name="l00321"></a><a class="code" href="classeuni.html#f445a0ce24f39d14c1a4eed53fc8e2c3">00321</a>         <span class="keywordtype">double</span> <a class="code" href="classeuni.html#f445a0ce24f39d14c1a4eed53fc8e2c3" title="cache of log( nk )">lnk</a>;
-<a name="l00322"></a>00322 <span class="keyword">public</span>:
-<a name="l00324"></a><a class="code" href="classeuni.html#2537a6c239cff52e3ba814851a1116cd">00324</a>         <a class="code" href="classeuni.html#2537a6c239cff52e3ba814851a1116cd" title="Defualt constructor.">euni</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a> ) :<a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> ( rv ) {}
-<a name="l00325"></a><a class="code" href="classeuni.html#2723d4992900b5c5495bfa03628195ed">00325</a>         <span class="keywordtype">double</span> <a class="code" href="classeuni.html#2723d4992900b5c5495bfa03628195ed" 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> <a class="code" href="classeuni.html#63105490e946e43372d6187ad1bafdda" title="normalizing coefficients">nk</a>;}
-<a name="l00326"></a><a class="code" href="classeuni.html#06af95d514a6623ad4688bd2ad50ad71">00326</a>         <span class="keywordtype">double</span> <a class="code" href="classeuni.html#06af95d514a6623ad4688bd2ad50ad71" title="Compute log-probability of argument val.">evalpdflog</a> ( <span class="keyword">const</span> vec &amp;val )<span class="keyword"> const  </span>{<span class="keywordflow">return</span> <a class="code" href="classeuni.html#f445a0ce24f39d14c1a4eed53fc8e2c3" title="cache of log( nk )">lnk</a>;}
-<a name="l00327"></a><a class="code" href="classeuni.html#4a0e09392be17beaee120ba98fc038cd">00327</a>         vec <a class="code" href="classeuni.html#4a0e09392be17beaee120ba98fc038cd" title="Returns a sample,  from density .">sample</a>()<span class="keyword"> const </span>{
-<a name="l00328"></a>00328                 vec smp ( <a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a>.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>() );
-<a name="l00329"></a>00329 <span class="preprocessor">#pragma omp critical</span>
-<a name="l00330"></a>00330 <span class="preprocessor"></span>                UniRNG.sample_vector ( <a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a>.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>(),smp );
-<a name="l00331"></a>00331                 <span class="keywordflow">return</span> <a class="code" href="classeuni.html#ef42cd8d7645422048d46c46ec5cdac1" title="lower bound on support">low</a>+elem_mult ( <a class="code" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4" title="internal">distance</a>,smp );
-<a name="l00332"></a>00332         }
-<a name="l00334"></a><a class="code" href="classeuni.html#4fd7c6a05100616ad16ece405cad7bf2">00334</a>         <span class="keywordtype">void</span> <a class="code" href="classeuni.html#4fd7c6a05100616ad16ece405cad7bf2" title="set values of low and high ">set_parameters</a> ( <span class="keyword">const</span> vec &amp;low0, <span class="keyword">const</span> vec &amp;high0 ) {
-<a name="l00335"></a>00335                 <a class="code" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4" title="internal">distance</a> = high0-low0;
-<a name="l00336"></a>00336                 it_assert_debug ( min ( <a class="code" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4" title="internal">distance</a> ) &gt;0.0,<span class="stringliteral">"bad support"</span> );
-<a name="l00337"></a>00337                 <a class="code" href="classeuni.html#ef42cd8d7645422048d46c46ec5cdac1" title="lower bound on support">low</a> = low0;
-<a name="l00338"></a>00338                 <a class="code" href="classeuni.html#71b6d6b41aeb61a7f76f682b72119231" title="upper bound on support">high</a> = high0;
-<a name="l00339"></a>00339                 <a class="code" href="classeuni.html#63105490e946e43372d6187ad1bafdda" title="normalizing coefficients">nk</a> = prod ( 1.0/<a class="code" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4" title="internal">distance</a> );
-<a name="l00340"></a>00340                 <a class="code" href="classeuni.html#f445a0ce24f39d14c1a4eed53fc8e2c3" title="cache of log( nk )">lnk</a> = log ( <a class="code" href="classeuni.html#63105490e946e43372d6187ad1bafdda" title="normalizing coefficients">nk</a> );
-<a name="l00341"></a>00341         }
-<a name="l00342"></a><a class="code" href="classeuni.html#8050087e421a9cfd1b4b1f8bd33b1cc1">00342</a>         vec <a class="code" href="classeuni.html#8050087e421a9cfd1b4b1f8bd33b1cc1" title="return expected value">mean</a>()<span class="keyword"> const </span>{vec pom=<a class="code" href="classeuni.html#71b6d6b41aeb61a7f76f682b72119231" title="upper bound on support">high</a>; pom-=<a class="code" href="classeuni.html#ef42cd8d7645422048d46c46ec5cdac1" title="lower bound on support">low</a>; pom/=2.0; <span class="keywordflow">return</span> pom;}
-<a name="l00343"></a>00343 };
-<a name="l00344"></a>00344 
-<a name="l00345"></a>00345 
-<a name="l00351"></a>00351 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
-<a name="l00352"></a><a class="code" href="classmlnorm.html">00352</a> <span class="keyword">class </span><a class="code" href="classmlnorm.html" title="Normal distributed linear function with linear function of mean value;.">mlnorm</a> : <span class="keyword">public</span> <a class="code" href="classmEF.html" title="Exponential family model.">mEF</a> {
-<a name="l00354"></a>00354         <a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm&lt;sq_T&gt;</a> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>;
-<a name="l00355"></a>00355         mat A;
-<a name="l00356"></a>00356         vec&amp; _mu; <span class="comment">//cached epdf.mu;</span>
-<a name="l00357"></a>00357 <span class="keyword">public</span>:
-<a name="l00359"></a>00359         <a class="code" href="classmlnorm.html#f927203b3f31171c5c10ffc7caa797f5" title="Constructor.">mlnorm</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;<a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>,<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;<a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a> );
-<a name="l00361"></a>00361         <span class="keywordtype">void</span> <a class="code" href="classmlnorm.html#b6749030c5d5abcb3eb6898f74cea3c0" title="Set A and R.">set_parameters</a> ( <span class="keyword">const</span>  mat &amp;A, <span class="keyword">const</span> sq_T &amp;R );
-<a name="l00363"></a>00363         vec <a class="code" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18" title="Generate one sample of the posterior.">samplecond</a> ( vec &amp;cond, <span class="keywordtype">double</span> &amp;lik );
-<a name="l00365"></a>00365         mat <a class="code" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18" title="Generate one sample of the posterior.">samplecond</a> ( vec &amp;cond, vec &amp;lik, <span class="keywordtype">int</span> n );
-<a name="l00367"></a>00367         <span class="keywordtype">void</span> <a class="code" href="classmlnorm.html#5232fc7e305eceab4e2bd6a8daa44195" title="Set value of rvc . Result of this operation is stored in epdf use function _ep to...">condition</a> ( vec &amp;cond );
-<a name="l00368"></a>00368 };
-<a name="l00369"></a>00369 
-<a name="l00379"></a><a class="code" href="classmgamma.html">00379</a> <span class="keyword">class </span><a class="code" href="classmgamma.html" title="Gamma random walk.">mgamma</a> : <span class="keyword">public</span> <a class="code" href="classmEF.html" title="Exponential family model.">mEF</a> {
-<a name="l00380"></a>00380 <span class="keyword">protected</span>:
-<a name="l00382"></a><a class="code" href="classmgamma.html#612dbf35c770a780027619aaac2c443e">00382</a>         <a class="code" href="classegamma.html" title="Gamma posterior density.">egamma</a> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>;
-<a name="l00384"></a><a class="code" href="classmgamma.html#43f733cce0245a52363d566099add687">00384</a>         <span class="keywordtype">double</span> <a class="code" href="classmgamma.html#43f733cce0245a52363d566099add687" title="Constant .">k</a>;
-<a name="l00386"></a><a class="code" href="classmgamma.html#5e90652837448bcc29707e7412f99691">00386</a>         vec* <a class="code" href="classmgamma.html#5e90652837448bcc29707e7412f99691" title="cache of epdf.beta">_beta</a>;
-<a name="l00387"></a>00387 
-<a name="l00388"></a>00388 <span class="keyword">public</span>:
-<a name="l00390"></a>00390         <a class="code" href="classmgamma.html#af43e61b86900c0398d5c0ffc83b94e6" title="Constructor.">mgamma</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="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>,<span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;<a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a> );
-<a name="l00392"></a>00392         <span class="keywordtype">void</span> <a class="code" href="classmgamma.html#a9d646cf758a70126dde7c48790b6e94" title="Set value of k.">set_parameters</a> ( <span class="keywordtype">double</span> <a class="code" href="classmgamma.html#43f733cce0245a52363d566099add687" title="Constant .">k</a> );
-<a name="l00393"></a><a class="code" href="classmgamma.html#a61094c9f7a2d64ea77b130cbc031f97">00393</a>         <span class="keywordtype">void</span> <a class="code" href="classmgamma.html#a61094c9f7a2d64ea77b130cbc031f97" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( <span class="keyword">const</span> vec &amp;val ) {*<a class="code" href="classmgamma.html#5e90652837448bcc29707e7412f99691" title="cache of epdf.beta">_beta</a>=<a class="code" href="classmgamma.html#43f733cce0245a52363d566099add687" title="Constant .">k</a>/val;};
-<a name="l00394"></a>00394 };
-<a name="l00395"></a>00395 
-<a name="l00407"></a><a class="code" href="classmgamma__fix.html">00407</a> <span class="keyword">class </span><a class="code" href="classmgamma__fix.html" title="Gamma random walk around a fixed point.">mgamma_fix</a> : <span class="keyword">public</span> <a class="code" href="classmgamma.html" title="Gamma random walk.">mgamma</a> {
-<a name="l00408"></a>00408 <span class="keyword">protected</span>:
-<a name="l00410"></a><a class="code" href="classmgamma__fix.html#3f48c09caddc298901ad75fe7c0529f6">00410</a>         <span class="keywordtype">double</span> <a class="code" href="classmgamma__fix.html#3f48c09caddc298901ad75fe7c0529f6" title="parameter l">l</a>;
-<a name="l00412"></a><a class="code" href="classmgamma__fix.html#81ce49029ecc385418619b200dcafeb0">00412</a>         vec <a class="code" href="classmgamma__fix.html#81ce49029ecc385418619b200dcafeb0" title="reference vector">refl</a>;
-<a name="l00413"></a>00413 <span class="keyword">public</span>:
-<a name="l00415"></a><a class="code" href="classmgamma__fix.html#b92c3d2e5fd0381033a072e5ef3bcf80">00415</a>         <a class="code" href="classmgamma__fix.html#b92c3d2e5fd0381033a072e5ef3bcf80" title="Constructor.">mgamma_fix</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="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>,<span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;<a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a> ) : <a class="code" href="classmgamma.html" title="Gamma random walk.">mgamma</a> ( rv,rvc ),<a class="code" href="classmgamma__fix.html#81ce49029ecc385418619b200dcafeb0" title="reference vector">refl</a> ( rv.count() ) {};
-<a name="l00417"></a><a class="code" href="classmgamma__fix.html#ec6f846896749e27cb7be9fa48dd1cb1">00417</a>         <span class="keywordtype">void</span> <a class="code" href="classmgamma__fix.html#ec6f846896749e27cb7be9fa48dd1cb1" title="Set value of k.">set_parameters</a> ( <span class="keywordtype">double</span> k0 , vec ref0, <span class="keywordtype">double</span> l0 ) {
-<a name="l00418"></a>00418                 <a class="code" href="classmgamma.html#a9d646cf758a70126dde7c48790b6e94" title="Set value of k.">mgamma::set_parameters</a> ( k0 );
-<a name="l00419"></a>00419                 <a class="code" href="classmgamma__fix.html#81ce49029ecc385418619b200dcafeb0" title="reference vector">refl</a>=pow ( ref0,1.0-l0 );<a class="code" href="classmgamma__fix.html#3f48c09caddc298901ad75fe7c0529f6" title="parameter l">l</a>=l0;
-<a name="l00420"></a>00420         };
-<a name="l00421"></a>00421 
-<a name="l00422"></a><a class="code" href="classmgamma__fix.html#6ea3931eec7b7da7b693e45981052460">00422</a>         <span class="keywordtype">void</span> <a class="code" href="classmgamma__fix.html#6ea3931eec7b7da7b693e45981052460" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( <span class="keyword">const</span> vec &amp;val ) {vec mean=elem_mult ( <a class="code" href="classmgamma__fix.html#81ce49029ecc385418619b200dcafeb0" title="reference vector">refl</a>,pow ( val,<a class="code" href="classmgamma__fix.html#3f48c09caddc298901ad75fe7c0529f6" title="parameter l">l</a> ) ); *<a class="code" href="classmgamma.html#5e90652837448bcc29707e7412f99691" title="cache of epdf.beta">_beta</a>=<a class="code" href="classmgamma.html#43f733cce0245a52363d566099add687" title="Constant .">k</a>/mean;};
-<a name="l00423"></a>00423 };
-<a name="l00424"></a>00424 
-<a name="l00426"></a><a class="code" href="libEF_8h.html#99497a3ff630f761cf6bff7babd23212">00426</a> <span class="keyword">enum</span> <a class="code" href="libEF_8h.html#99497a3ff630f761cf6bff7babd23212" title="Switch between various resampling methods.">RESAMPLING_METHOD</a> { MULTINOMIAL = 0, STRATIFIED = 1, SYSTEMATIC = 3 };
-<a name="l00432"></a><a class="code" href="classeEmp.html">00432</a> <span class="keyword">class </span><a class="code" href="classeEmp.html" title="Weighted empirical density.">eEmp</a>: <span class="keyword">public</span> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> {
-<a name="l00433"></a>00433 <span class="keyword">protected</span> :
-<a name="l00435"></a><a class="code" href="classeEmp.html#8c33034de0e35f03f8bb85d3d67438fd">00435</a>         <span class="keywordtype">int</span> <a class="code" href="classeEmp.html#8c33034de0e35f03f8bb85d3d67438fd" title="Number of particles.">n</a>;
-<a name="l00437"></a><a class="code" href="classeEmp.html#ae78d144404ddba843c93b171b215de8">00437</a>         vec <a class="code" href="classeEmp.html#ae78d144404ddba843c93b171b215de8" title="Sample weights .">w</a>;
-<a name="l00439"></a><a class="code" href="classeEmp.html#a4d6f4bbd6a6824fc39f14676701279a">00439</a>         Array&lt;vec&gt; <a class="code" href="classeEmp.html#a4d6f4bbd6a6824fc39f14676701279a" title="Samples .">samples</a>;
-<a name="l00440"></a>00440 <span class="keyword">public</span>:
-<a name="l00442"></a><a class="code" href="classeEmp.html#0c04b073ecd0dae3d498e680ae27e9e4">00442</a>         <a class="code" href="classeEmp.html#0c04b073ecd0dae3d498e680ae27e9e4" title="Default constructor.">eEmp</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">int</span> n0 ) :<a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> ( rv0 ),<a class="code" href="classeEmp.html#8c33034de0e35f03f8bb85d3d67438fd" title="Number of particles.">n</a> ( n0 ),<a class="code" href="classeEmp.html#ae78d144404ddba843c93b171b215de8" title="Sample weights .">w</a> ( <a class="code" href="classeEmp.html#8c33034de0e35f03f8bb85d3d67438fd" title="Number of particles.">n</a> ),<a class="code" href="classeEmp.html#a4d6f4bbd6a6824fc39f14676701279a" title="Samples .">samples</a> ( <a class="code" href="classeEmp.html#8c33034de0e35f03f8bb85d3d67438fd" title="Number of particles.">n</a> ) {};
-<a name="l00444"></a>00444         <span class="keywordtype">void</span> <a class="code" href="classeEmp.html#6606a656c1b28114f7384c25aaf80e8d" title="Set sample.">set_parameters</a> ( <span class="keyword">const</span> vec &amp;w0, <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* pdf0 );
-<a name="l00446"></a><a class="code" href="classeEmp.html#31b2bfb73b72486a5c89f2ab850c7a9b">00446</a>         vec&amp; <a class="code" href="classeEmp.html#31b2bfb73b72486a5c89f2ab850c7a9b" title="Potentially dangerous, use with care.">_w</a>()  {<span class="keywordflow">return</span> <a class="code" href="classeEmp.html#ae78d144404ddba843c93b171b215de8" title="Sample weights .">w</a>;};
-<a name="l00448"></a><a class="code" href="classeEmp.html#31b747eca73b16f30370827ba4cc3575">00448</a>         Array&lt;vec&gt;&amp; <a class="code" href="classeEmp.html#31b747eca73b16f30370827ba4cc3575" title="access function">_samples</a>() {<span class="keywordflow">return</span> <a class="code" href="classeEmp.html#a4d6f4bbd6a6824fc39f14676701279a" title="Samples .">samples</a>;};
-<a name="l00450"></a>00450         ivec <a class="code" href="classeEmp.html#77268292fc4465cb73ddbfb1f2932a59" title="Function performs resampling, i.e. removal of low-weight samples and duplication...">resample</a> ( <a class="code" href="libEF_8h.html#99497a3ff630f761cf6bff7babd23212" title="Switch between various resampling methods.">RESAMPLING_METHOD</a> method = SYSTEMATIC );
-<a name="l00452"></a><a class="code" href="classeEmp.html#83f9283f92b805508d896479dc1ccf12">00452</a>         vec <a class="code" href="classeEmp.html#83f9283f92b805508d896479dc1ccf12" title="inherited operation : NOT implemneted">sample</a>()<span class="keyword"> const </span>{it_error ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> 0;}
-<a name="l00454"></a><a class="code" href="classeEmp.html#23e7358995400865ad2e278945922fb3">00454</a>         <span class="keywordtype">double</span> <a class="code" href="classeEmp.html#23e7358995400865ad2e278945922fb3" title="inherited operation : NOT implemneted">evalpdflog</a> ( <span class="keyword">const</span> vec &amp;val )<span class="keyword"> const </span>{it_error ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> 0.0;}
-<a name="l00455"></a><a class="code" href="classeEmp.html#ba055c19038cc72628d98e25197e982d">00455</a>         vec <a class="code" href="classeEmp.html#ba055c19038cc72628d98e25197e982d" title="return expected value">mean</a>()<span class="keyword"> const </span>{
-<a name="l00456"></a>00456                 vec pom=zeros ( <a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a>.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>() );
-<a name="l00457"></a>00457                 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i&lt;<a class="code" href="classeEmp.html#8c33034de0e35f03f8bb85d3d67438fd" title="Number of particles.">n</a>;i++ ) {pom+=<a class="code" href="classeEmp.html#a4d6f4bbd6a6824fc39f14676701279a" title="Samples .">samples</a> ( i ) *<a class="code" href="classeEmp.html#ae78d144404ddba843c93b171b215de8" title="Sample weights .">w</a> ( i );}
-<a name="l00458"></a>00458                 <span class="keywordflow">return</span> pom;
-<a name="l00459"></a>00459         }
-<a name="l00460"></a>00460 };
-<a name="l00461"></a>00461 
-<a name="l00462"></a>00462 
-<a name="l00464"></a>00464 
-<a name="l00465"></a>00465 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
-<a name="l00466"></a><a class="code" href="classenorm.html#7b5cb487a2570e8109bfdc0df149aa06">00466</a> <a class="code" href="classenorm.html#7b5cb487a2570e8109bfdc0df149aa06" title="Default constructor.">enorm&lt;sq_T&gt;::enorm</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv ) :<a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> ( rv ), mu ( rv.count() ),R ( rv.count() ),dim ( rv.count() ) {};
-<a name="l00467"></a>00467 
-<a name="l00468"></a>00468 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
-<a name="l00469"></a><a class="code" href="classenorm.html#1394a65caa6e00d42e00cc99b12227af">00469</a> <span class="keywordtype">void</span> <a class="code" href="classenorm.html#1394a65caa6e00d42e00cc99b12227af" title="Set mean value mu and covariance R.">enorm&lt;sq_T&gt;::set_parameters</a> ( <span class="keyword">const</span> vec &amp;mu0, <span class="keyword">const</span> sq_T &amp;R0 ) {
-<a name="l00470"></a>00470 <span class="comment">//Fixme test dimensions of mu0 and R0;</span>
-<a name="l00471"></a>00471         <a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a> = mu0;
-<a name="l00472"></a>00472         <a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a> = R0;
-<a name="l00473"></a>00473 };
+<a name="l00102"></a><a class="code" href="classenorm.html">00102</a> <span class="keyword">class </span><a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm</a> : <span class="keyword">public</span> <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> {
+<a name="l00103"></a>00103 <span class="keyword">protected</span>:
+<a name="l00105"></a><a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20">00105</a>         vec <a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>;
+<a name="l00107"></a><a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1">00107</a>         sq_T <a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>;
+<a name="l00109"></a><a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e">00109</a>         <span class="keywordtype">int</span> <a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e" title="dimension (redundant from rv.count() for easier coding )">dim</a>;
+<a name="l00110"></a>00110 <span class="keyword">public</span>:
+<a name="l00112"></a>00112         <a class="code" href="classenorm.html#7b5cb487a2570e8109bfdc0df149aa06" title="Default constructor.">enorm</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;<a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a> );
+<a name="l00114"></a>00114         <span class="keywordtype">void</span> <a class="code" href="classenorm.html#1394a65caa6e00d42e00cc99b12227af" title="Set mean value mu and covariance R.">set_parameters</a> ( <span class="keyword">const</span> vec &amp;<a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>,<span class="keyword">const</span> sq_T &amp;<a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a> );
+<a name="l00116"></a>00116         <span class="keywordtype">void</span> <a class="code" href="classenorm.html#5b5fd142b6b17ea334597960e3fe126a" title="tupdate in exponential form (not really handy)">tupdate</a> ( <span class="keywordtype">double</span> phi, mat &amp;vbar, <span class="keywordtype">double</span> nubar );
+<a name="l00118"></a>00118         <span class="keywordtype">void</span> <a class="code" href="classenorm.html#5bf185e31e5954fceb90ada3debd2ff2" title="dupdate in exponential form (not really handy)">dupdate</a> ( mat &amp;v,<span class="keywordtype">double</span> nu=1.0 );
+<a name="l00119"></a>00119 
+<a name="l00120"></a>00120         vec <a class="code" href="classenorm.html#60b47544f6181ffd4530d3e415ce12c5" title="Returns a sample,  from density .">sample</a>() <span class="keyword">const</span>;
+<a name="l00122"></a>00122         mat <a class="code" href="classenorm.html#60b47544f6181ffd4530d3e415ce12c5" title="Returns a sample,  from density .">sample</a> ( <span class="keywordtype">int</span> N ) <span class="keyword">const</span>;
+<a name="l00123"></a>00123         <span class="keywordtype">double</span> <a class="code" href="classenorm.html#b9e1dfd33692d7b3f1a59f17b0e61bd0" title="Compute probability of argument val.">eval</a> ( <span class="keyword">const</span> vec &amp;val ) <span class="keyword">const</span> ;
+<a name="l00124"></a>00124         <span class="keywordtype">double</span> <a class="code" href="classenorm.html#c1e3dcba256b0153cfdb286120e110be" title="Evaluate normalized log-probability.">evalpdflog_nn</a> ( <span class="keyword">const</span> vec &amp;val ) <span class="keyword">const</span>;
+<a name="l00125"></a>00125         <span class="keywordtype">double</span> <a class="code" href="classenorm.html#b289a36a69db59d182bb6eba9c05d4a8" title="logarithm of the normalizing constant, ">lognc</a> () <span class="keyword">const</span>;
+<a name="l00126"></a><a class="code" href="classenorm.html#50fa84da7bae02f7af17a98f37566899">00126</a>         vec <a class="code" href="classenorm.html#50fa84da7bae02f7af17a98f37566899" title="return expected value">mean</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>;}
+<a name="l00127"></a>00127 
+<a name="l00128"></a>00128 <span class="comment">//Access methods</span>
+<a name="l00130"></a><a class="code" href="classenorm.html#0b8cb284e5af920a1b64a21d057ec5ac">00130</a> <span class="comment"></span>        vec&amp; <a class="code" href="classenorm.html#0b8cb284e5af920a1b64a21d057ec5ac" title="returns a pointer to the internal mean value. Use with Care!">_mu</a>() {<span class="keywordflow">return</span> <a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>;}
+<a name="l00131"></a>00131 
+<a name="l00133"></a><a class="code" href="classenorm.html#d892a38f03be12e572ea57d9689cef6b">00133</a>         <span class="keywordtype">void</span> <a class="code" href="classenorm.html#d892a38f03be12e572ea57d9689cef6b" title="access function">set_mu</a> ( <span class="keyword">const</span> vec mu0 ) { <a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>=mu0;}
+<a name="l00134"></a>00134 
+<a name="l00136"></a><a class="code" href="classenorm.html#7a5034b25771a84450a990d10fc40ac9">00136</a>         sq_T&amp; <a class="code" href="classenorm.html#7a5034b25771a84450a990d10fc40ac9" title="returns pointers to the internal variance and its inverse. Use with Care!">_R</a>() {<span class="keywordflow">return</span> <a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>;}
+<a name="l00137"></a>00137 
+<a name="l00139"></a>00139 <span class="comment">//      mat getR () {return R.to_mat();}</span>
+<a name="l00140"></a>00140 };
+<a name="l00141"></a>00141 
+<a name="l00148"></a><a class="code" href="classegiw.html">00148</a> <span class="keyword">class </span><a class="code" href="classegiw.html" title="Gauss-inverse-Wishart density stored in LD form.">egiw</a> : <span class="keyword">public</span> <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> {
+<a name="l00149"></a>00149 <span class="keyword">protected</span>:
+<a name="l00151"></a><a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442">00151</a>         <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> <a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a>;
+<a name="l00153"></a><a class="code" href="classegiw.html#4a2f130b91afe84f6d62fed289d5d453">00153</a>         <span class="keywordtype">double</span> <a class="code" href="classegiw.html#4a2f130b91afe84f6d62fed289d5d453" title="Number of data records (degrees of freedom) of sufficient statistics.">nu</a>;
+<a name="l00155"></a><a class="code" href="classegiw.html#3d5c719f15a5527a6c62c2a53160148e">00155</a>         <span class="keywordtype">int</span> <a class="code" href="classegiw.html#3d5c719f15a5527a6c62c2a53160148e" title="Dimension of the output.">xdim</a>;
+<a name="l00157"></a><a class="code" href="classegiw.html#c70d13d86e0d9f0acede3e1dc0368812">00157</a>         <span class="keywordtype">int</span> <a class="code" href="classegiw.html#c70d13d86e0d9f0acede3e1dc0368812" title="Dimension of the regressor.">nPsi</a>;
+<a name="l00158"></a>00158 <span class="keyword">public</span>:
+<a name="l00160"></a><a class="code" href="classegiw.html#c52a2173c6eb1490edce9c6c7c05d60b">00160</a>         <a class="code" href="classegiw.html#c52a2173c6eb1490edce9c6c7c05d60b" title="Default constructor, assuming.">egiw</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>, mat V0, <span class="keywordtype">double</span> nu0 ) : <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> ( rv ), <a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a> ( V0 ), <a class="code" href="classegiw.html#4a2f130b91afe84f6d62fed289d5d453" title="Number of data records (degrees of freedom) of sufficient statistics.">nu</a> ( nu0 ) {
+<a name="l00161"></a>00161                 <a class="code" href="classegiw.html#3d5c719f15a5527a6c62c2a53160148e" title="Dimension of the output.">xdim</a> = rv.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>() /<a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a>.<a class="code" href="classldmat.html#96dfb21865db4f5bd36fa70f9b0b1163" title="access function">rows</a>();
+<a name="l00162"></a>00162                 it_assert_debug ( rv.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>() ==<a class="code" href="classegiw.html#3d5c719f15a5527a6c62c2a53160148e" title="Dimension of the output.">xdim</a>*<a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a>.<a class="code" href="classldmat.html#96dfb21865db4f5bd36fa70f9b0b1163" title="access function">rows</a>(),<span class="stringliteral">"Incompatible V0."</span> );
+<a name="l00163"></a>00163                 <a class="code" href="classegiw.html#c70d13d86e0d9f0acede3e1dc0368812" title="Dimension of the regressor.">nPsi</a> = <a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a>.<a class="code" href="classldmat.html#96dfb21865db4f5bd36fa70f9b0b1163" title="access function">rows</a>()-<a class="code" href="classegiw.html#3d5c719f15a5527a6c62c2a53160148e" title="Dimension of the output.">xdim</a>;
+<a name="l00164"></a>00164         }
+<a name="l00166"></a><a class="code" href="classegiw.html#1a17fdbac6c72b9c3abb97623db466c8">00166</a>         <a class="code" href="classegiw.html#c52a2173c6eb1490edce9c6c7c05d60b" title="Default constructor, assuming.">egiw</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>, <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a> V0, <span class="keywordtype">double</span> nu0 ) : <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> ( rv ), <a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a> ( V0 ), <a class="code" href="classegiw.html#4a2f130b91afe84f6d62fed289d5d453" title="Number of data records (degrees of freedom) of sufficient statistics.">nu</a> ( nu0 ) {
+<a name="l00167"></a>00167                 <a class="code" href="classegiw.html#3d5c719f15a5527a6c62c2a53160148e" title="Dimension of the output.">xdim</a> = rv.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>() /<a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a>.<a class="code" href="classldmat.html#96dfb21865db4f5bd36fa70f9b0b1163" title="access function">rows</a>();
+<a name="l00168"></a>00168                 it_assert_debug ( rv.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>() ==<a class="code" href="classegiw.html#3d5c719f15a5527a6c62c2a53160148e" title="Dimension of the output.">xdim</a>*<a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a>.<a class="code" href="classldmat.html#96dfb21865db4f5bd36fa70f9b0b1163" title="access function">rows</a>(),<span class="stringliteral">"Incompatible V0."</span> );
+<a name="l00169"></a>00169                 <a class="code" href="classegiw.html#c70d13d86e0d9f0acede3e1dc0368812" title="Dimension of the regressor.">nPsi</a> = <a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a>.<a class="code" href="classldmat.html#96dfb21865db4f5bd36fa70f9b0b1163" title="access function">rows</a>()-<a class="code" href="classegiw.html#3d5c719f15a5527a6c62c2a53160148e" title="Dimension of the output.">xdim</a>;
+<a name="l00170"></a>00170         }
+<a name="l00171"></a>00171 
+<a name="l00172"></a>00172         vec <a class="code" href="classegiw.html#3d2c1f2ba0f9966781f1e0ae695e8a6f" title="Returns a sample,  from density .">sample</a>() <span class="keyword">const</span>;
+<a name="l00173"></a>00173         vec <a class="code" href="classegiw.html#6deb0ff2859f41ef7cbdf6a842cabb29" title="return expected value">mean</a>() <span class="keyword">const</span>;
+<a name="l00174"></a>00174         <span class="keywordtype">void</span> mean_mat ( mat &amp;M, mat&amp;R ) <span class="keyword">const</span>;
+<a name="l00176"></a>00176         <span class="keywordtype">double</span> <a class="code" href="classegiw.html#2ab1e525d692be8272a6f383d60b94cd" title="In this instance, val= [theta, r]. For multivariate instances, it is stored columnwise...">evalpdflog_nn</a> ( <span class="keyword">const</span> vec &amp;val ) <span class="keyword">const</span>;
+<a name="l00177"></a>00177         <span class="keywordtype">double</span> <a class="code" href="classegiw.html#70eb1a0b88459b227f919b425b0d3359" title="logarithm of the normalizing constant, ">lognc</a> () <span class="keyword">const</span>;
+<a name="l00178"></a>00178 
+<a name="l00179"></a>00179         <span class="comment">//Access</span>
+<a name="l00181"></a><a class="code" href="classegiw.html#533e792e1175bfa06d5d595dc5d080d5">00181</a> <span class="comment"></span>        <a class="code" href="classldmat.html" title="Matrix stored in LD form, (typically known as UD).">ldmat</a>&amp; <a class="code" href="classegiw.html#533e792e1175bfa06d5d595dc5d080d5" title="returns a pointer to the internal statistics. Use with Care!">_V</a>() {<span class="keywordflow">return</span> <a class="code" href="classegiw.html#f343d03ede89db820edf44a6297fa442" title="Extended information matrix of sufficient statistics.">V</a>;}
+<a name="l00183"></a><a class="code" href="classegiw.html#08029c481ff95d24f093df0573879afe">00183</a>         <span class="keywordtype">double</span>&amp; <a class="code" href="classegiw.html#08029c481ff95d24f093df0573879afe" title="returns a pointer to the internal statistics. Use with Care!">_nu</a>() {<span class="keywordflow">return</span> <a class="code" href="classegiw.html#4a2f130b91afe84f6d62fed289d5d453" title="Number of data records (degrees of freedom) of sufficient statistics.">nu</a>;}
+<a name="l00184"></a>00184         <span class="keywordtype">void</span> <a class="code" href="classegiw.html#036306322a90a9977834baac07460816" title="Power of the density, used e.g. to flatten the density.">pow</a> ( <span class="keywordtype">double</span> p );
+<a name="l00185"></a>00185 };
+<a name="l00186"></a>00186 
+<a name="l00195"></a><a class="code" href="classeDirich.html">00195</a> <span class="keyword">class </span><a class="code" href="classeDirich.html" title="Dirichlet posterior density.">eDirich</a>: <span class="keyword">public</span> <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> {
+<a name="l00196"></a>00196 <span class="keyword">protected</span>:
+<a name="l00198"></a><a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7">00198</a>         vec <a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a>;
+<a name="l00199"></a>00199 <span class="keyword">public</span>:
+<a name="l00201"></a><a class="code" href="classeDirich.html#ac7e6116f3575c3860d07355e96cd4af">00201</a>         <a class="code" href="classeDirich.html#ac7e6116f3575c3860d07355e96cd4af" title="Default constructor.">eDirich</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#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a>, <span class="keyword">const</span> vec &amp;beta0 ) : <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> ( rv ),<a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a> ( beta0 ) {it_assert_debug ( rv.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>() ==<a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a>.length(),<span class="stringliteral">"Incompatible statistics"</span> ); };
+<a name="l00203"></a><a class="code" href="classeDirich.html#55cccbc5eb44764dce722567acf5fd58">00203</a>         <a class="code" href="classeDirich.html#ac7e6116f3575c3860d07355e96cd4af" title="Default constructor.">eDirich</a> ( <span class="keyword">const</span> <a class="code" href="classeDirich.html" title="Dirichlet posterior density.">eDirich</a> &amp;D0 ) : <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> ( D0.<a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a> ),<a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a> ( D0.<a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a> ) {};
+<a name="l00204"></a><a class="code" href="classeDirich.html#23dff79110822e9639343fe8e177fd80">00204</a>         vec <a class="code" href="classeDirich.html#23dff79110822e9639343fe8e177fd80" title="Returns a sample,  from density .">sample</a>()<span class="keyword"> const </span>{it_error ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> vec_1 ( 0.0 );};
+<a name="l00205"></a><a class="code" href="classeDirich.html#4206e1da149d51ff3b663c9241096b73">00205</a>         vec <a class="code" href="classeDirich.html#4206e1da149d51ff3b663c9241096b73" title="return expected value">mean</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a>/sum ( <a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a> );};
+<a name="l00207"></a><a class="code" href="classeDirich.html#688a24f04be6d80d4769cf0e4ded7acc">00207</a>         <span class="keywordtype">double</span> <a class="code" href="classeDirich.html#688a24f04be6d80d4769cf0e4ded7acc" title="In this instance, val is ...">evalpdflog_nn</a> ( <span class="keyword">const</span> vec &amp;val )<span class="keyword"> const </span>{<span class="keywordflow">return</span> ( <a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a>-1 ) *log ( val );};
+<a name="l00208"></a><a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77">00208</a>         <span class="keywordtype">double</span> <a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77" title="logarithm of the normalizing constant, ">lognc</a> ()<span class="keyword"> const </span>{
+<a name="l00209"></a>00209                 <span class="keywordtype">double</span> gam=sum ( <a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a> );
+<a name="l00210"></a>00210                 <span class="keywordtype">double</span> lgb=0.0;
+<a name="l00211"></a>00211                 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i&lt;<a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a>.length();i++ ) {lgb+=lgamma ( <a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a> ( i ) );}
+<a name="l00212"></a>00212                 <span class="keywordflow">return</span> lgb-lgamma ( gam );
+<a name="l00213"></a>00213         };
+<a name="l00215"></a><a class="code" href="classeDirich.html#6409d0362143a23976b43641ff19e53a">00215</a>         vec&amp; <a class="code" href="classeDirich.html#6409d0362143a23976b43641ff19e53a" title="access function">_beta</a>() {<span class="keywordflow">return</span> <a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a>;}
+<a name="l00217"></a><a class="code" href="classeDirich.html#c842acb2e1cce5cc9000769ff06c086d">00217</a>         <span class="keywordtype">void</span> <a class="code" href="classeDirich.html#c842acb2e1cce5cc9000769ff06c086d" title="Set internal parameters.">set_parameters</a>(<span class="keyword">const</span> vec &amp;beta0){
+<a name="l00218"></a>00218                 <span class="keywordflow">if</span>(beta0.length()!=<a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a>.length()){
+<a name="l00219"></a>00219                         it_assert_debug(<a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a>.<a class="code" href="classRV.html#c114a6f3ff06796cc2f4dacba74291eb" title="Return length (number of entries) of the RV.">length</a>()==1,<span class="stringliteral">"Undefined"</span>);
+<a name="l00220"></a>00220                         <a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a>.<a class="code" href="classRV.html#70b24c39c5130b1e4753fa2eef495433" title="access function">set_size</a>(0,beta0.length());
+<a name="l00221"></a>00221                 }
+<a name="l00222"></a>00222                 <a class="code" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7" title="sufficient statistics">beta</a>= beta0;
+<a name="l00223"></a>00223         }
+<a name="l00224"></a>00224 };
+<a name="l00225"></a>00225 
+<a name="l00227"></a><a class="code" href="classmultiBM.html">00227</a> <span class="keyword">class </span><a class="code" href="classmultiBM.html" title="Estimator for Multinomial density.">multiBM</a> : <span class="keyword">public</span> <a class="code" href="classBMEF.html" title="Estimator for Exponential family.">BMEF</a> {
+<a name="l00228"></a>00228 <span class="keyword">protected</span>:
+<a name="l00230"></a><a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5">00230</a>         <a class="code" href="classeDirich.html" title="Dirichlet posterior density.">eDirich</a> <a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>;
+<a name="l00231"></a>00231         vec &amp;beta;
+<a name="l00232"></a>00232 <span class="keyword">public</span>:
+<a name="l00234"></a><a class="code" href="classmultiBM.html#7d7d7e78c129602bcde96078359dc6e5">00234</a>         <a class="code" href="classmultiBM.html#7d7d7e78c129602bcde96078359dc6e5" title="Default constructor.">multiBM</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#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>, <span class="keyword">const</span> vec beta0 ) : <a class="code" href="classBMEF.html" title="Estimator for Exponential family.">BMEF</a> ( rv ),<a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a> ( rv,beta0 ),beta ( <a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>._beta() ) {<a class="code" href="classBMEF.html#308cf5d4133cd471fdf1ecd5dfa09d02" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a>=<a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>.<a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77" title="logarithm of the normalizing constant, ">lognc</a>();}
+<a name="l00236"></a><a class="code" href="classmultiBM.html#b92751adbfb9f259ca8c95232cfd9c09">00236</a>         <a class="code" href="classmultiBM.html#7d7d7e78c129602bcde96078359dc6e5" title="Default constructor.">multiBM</a> ( <span class="keyword">const</span> <a class="code" href="classmultiBM.html" title="Estimator for Multinomial density.">multiBM</a> &amp;B ) : <a class="code" href="classBMEF.html" title="Estimator for Exponential family.">BMEF</a> ( B ),<a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a> ( <a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>,B.beta ),beta ( <a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>._beta() ) {}
+<a name="l00237"></a>00237 
+<a name="l00238"></a>00238         <span class="keywordtype">void</span> set_statistics ( <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>* mB0 ) {<span class="keyword">const</span> <a class="code" href="classmultiBM.html" title="Estimator for Multinomial density.">multiBM</a>* mB=<span class="keyword">dynamic_cast&lt;</span><span class="keyword">const </span><a class="code" href="classmultiBM.html" title="Estimator for Multinomial density.">multiBM</a>*<span class="keyword">&gt;</span> ( mB0 ); beta=mB-&gt;<a class="code" href="classmultiBM.html#7b606116aed7e8834a339cbb0424b1d6">beta</a>;}
+<a name="l00239"></a><a class="code" href="classmultiBM.html#11eeba7e97954e316e959116f90d80e2">00239</a>         <span class="keywordtype">void</span> <a class="code" href="classmultiBM.html#11eeba7e97954e316e959116f90d80e2" title="Incremental Bayes rule.">bayes</a> ( <span class="keyword">const</span> vec &amp;dt ) {
+<a name="l00240"></a>00240                 <span class="keywordflow">if</span> ( <a class="code" href="classBMEF.html#538d632e59f9afa8daa1de74da12ce71" title="forgetting factor">frg</a>&lt;1.0 ) {beta*=<a class="code" href="classBMEF.html#538d632e59f9afa8daa1de74da12ce71" title="forgetting factor">frg</a>;<a class="code" href="classBMEF.html#308cf5d4133cd471fdf1ecd5dfa09d02" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a>=<a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>.<a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77" title="logarithm of the normalizing constant, ">lognc</a>();}
+<a name="l00241"></a>00241                 beta+=dt;
+<a name="l00242"></a>00242                 <span class="keywordflow">if</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> ) {<a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>=<a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>.<a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77" title="logarithm of the normalizing constant, ">lognc</a>()-<a class="code" href="classBMEF.html#308cf5d4133cd471fdf1ecd5dfa09d02" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a>;}
+<a name="l00243"></a>00243         }
+<a name="l00244"></a><a class="code" href="classmultiBM.html#13e26a61757278981fd8cac9a7ef91eb">00244</a>         <span class="keywordtype">double</span> <a class="code" href="classmultiBM.html#13e26a61757278981fd8cac9a7ef91eb">logpred</a> ( <span class="keyword">const</span> vec &amp;dt )<span class="keyword"> const </span>{
+<a name="l00245"></a>00245                 <a class="code" href="classeDirich.html" title="Dirichlet posterior density.">eDirich</a> pred ( <a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a> );
+<a name="l00246"></a>00246                 vec &amp;beta = pred.<a class="code" href="classeDirich.html#6409d0362143a23976b43641ff19e53a" title="access function">_beta</a>();
+<a name="l00247"></a>00247 
+<a name="l00248"></a>00248                 <span class="keywordtype">double</span> lll;
+<a name="l00249"></a>00249                 <span class="keywordflow">if</span> ( <a class="code" href="classBMEF.html#538d632e59f9afa8daa1de74da12ce71" title="forgetting factor">frg</a>&lt;1.0 )
+<a name="l00250"></a>00250                         {beta*=<a class="code" href="classBMEF.html#538d632e59f9afa8daa1de74da12ce71" title="forgetting factor">frg</a>;lll=pred.<a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77" title="logarithm of the normalizing constant, ">lognc</a>();}
+<a name="l00251"></a>00251                 <span class="keywordflow">else</span>
+<a name="l00252"></a>00252                         <span class="keywordflow">if</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> ) {lll=<a class="code" href="classBMEF.html#308cf5d4133cd471fdf1ecd5dfa09d02" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a>;}
+<a name="l00253"></a>00253                         <span class="keywordflow">else</span>{lll=pred.<a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77" title="logarithm of the normalizing constant, ">lognc</a>();}
+<a name="l00254"></a>00254 
+<a name="l00255"></a>00255                 beta+=dt;
+<a name="l00256"></a>00256                 <span class="keywordflow">return</span> pred.<a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77" title="logarithm of the normalizing constant, ">lognc</a>()-lll;
+<a name="l00257"></a>00257         }
+<a name="l00258"></a><a class="code" href="classmultiBM.html#58257073a90aab5d1aafbc9b805d324a">00258</a>         <span class="keywordtype">void</span> <a class="code" href="classmultiBM.html#58257073a90aab5d1aafbc9b805d324a" title="Flatten the posterior.">flatten</a> ( <a class="code" href="classBMEF.html" title="Estimator for Exponential family.">BMEF</a>* B ) {
+<a name="l00259"></a>00259                 <a class="code" href="classeDirich.html" title="Dirichlet posterior density.">eDirich</a>* E=<span class="keyword">dynamic_cast&lt;</span><a class="code" href="classeDirich.html" title="Dirichlet posterior density.">eDirich</a>*<span class="keyword">&gt;</span> ( B );
+<a name="l00260"></a>00260                 <span class="comment">// sum(beta) should be equal to sum(B.beta)</span>
+<a name="l00261"></a>00261                 <span class="keyword">const</span> vec &amp;Eb=E-&gt;<a class="code" href="classeDirich.html#6409d0362143a23976b43641ff19e53a" title="access function">_beta</a>();
+<a name="l00262"></a>00262                 <a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>.<a class="code" href="classeEF.html#4f8385dd1cc9740522dc373b1dc3cbf5" title="Power of the density, used e.g. to flatten the density.">pow</a> ( sum ( beta ) /sum ( Eb ) );
+<a name="l00263"></a>00263                 <span class="keywordflow">if</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> ) {<a class="code" href="classBMEF.html#308cf5d4133cd471fdf1ecd5dfa09d02" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a>=<a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>.<a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77" title="logarithm of the normalizing constant, ">lognc</a>();}
+<a name="l00264"></a>00264         }
+<a name="l00265"></a><a class="code" href="classmultiBM.html#66cdfd83a70bc281840ab0646b941684">00265</a>         <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="classmultiBM.html#66cdfd83a70bc281840ab0646b941684" title="Returns a pointer to the epdf representing posterior density on parameters. Use with...">_epdf</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>;};
+<a name="l00266"></a>00266         <span class="keywordtype">void</span> set_parameters ( <span class="keyword">const</span> vec &amp;beta0 ) {
+<a name="l00267"></a>00267                 <a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>.<a class="code" href="classeDirich.html#c842acb2e1cce5cc9000769ff06c086d" title="Set internal parameters.">set_parameters</a>(beta0);
+<a name="l00268"></a>00268                 <a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a> = <a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>.<a class="code" href="classepdf.html#ca0d32aabb4cbba347e0c37fe8607562" title="access function, possibly dangerous!">_rv</a>();
+<a name="l00269"></a>00269                 <span class="keywordflow">if</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>){<a class="code" href="classBMEF.html#308cf5d4133cd471fdf1ecd5dfa09d02" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a>=<a class="code" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5" title="Conjugate prior and posterior.">est</a>.<a class="code" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77" title="logarithm of the normalizing constant, ">lognc</a>();}
+<a name="l00270"></a>00270         }
+<a name="l00271"></a>00271 };
+<a name="l00272"></a>00272 
+<a name="l00282"></a><a class="code" href="classegamma.html">00282</a> <span class="keyword">class </span><a class="code" href="classegamma.html" title="Gamma posterior density.">egamma</a> : <span class="keyword">public</span> <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> {
+<a name="l00283"></a>00283 <span class="keyword">protected</span>:
+<a name="l00285"></a><a class="code" href="classegamma.html#376cebd8932546c440f21b182910b01b">00285</a>         vec <a class="code" href="classegamma.html#376cebd8932546c440f21b182910b01b" title="Vector .">alpha</a>;
+<a name="l00287"></a><a class="code" href="classegamma.html#cfc5f136467488a421ab22f886323790">00287</a>         vec <a class="code" href="classegamma.html#cfc5f136467488a421ab22f886323790" title="Vector .">beta</a>;
+<a name="l00288"></a>00288 <span class="keyword">public</span> :
+<a name="l00290"></a><a class="code" href="classegamma.html#4b1d34f3b244ea51a58ec10c468788c1">00290</a>         <a class="code" href="classegamma.html#4b1d34f3b244ea51a58ec10c468788c1" title="Default constructor.">egamma</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#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a> ) :<a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> ( rv ) {};
+<a name="l00292"></a><a class="code" href="classegamma.html#8e348b89be82b70471fe8c5630f61339">00292</a>         <span class="keywordtype">void</span> <a class="code" href="classegamma.html#8e348b89be82b70471fe8c5630f61339" title="Sets parameters.">set_parameters</a> ( <span class="keyword">const</span> vec &amp;a, <span class="keyword">const</span> vec &amp;b ) {<a class="code" href="classegamma.html#376cebd8932546c440f21b182910b01b" title="Vector .">alpha</a>=a,<a class="code" href="classegamma.html#cfc5f136467488a421ab22f886323790" title="Vector .">beta</a>=b;};
+<a name="l00293"></a>00293         vec <a class="code" href="classegamma.html#8e10c0021b5dfdd9cb62c6959b5ef425" title="Returns a sample,  from density .">sample</a>() <span class="keyword">const</span>;
+<a name="l00295"></a>00295 <span class="comment">//      mat sample ( int N ) const;</span>
+<a name="l00296"></a>00296         <span class="keywordtype">double</span> <a class="code" href="classegamma.html#de84faac8f9799dfe2777ddbedf997ef" title="TODO: is it used anywhere?">evalpdflog</a> ( <span class="keyword">const</span> vec &amp;val ) <span class="keyword">const</span>;
+<a name="l00297"></a>00297         <span class="keywordtype">double</span> <a class="code" href="classegamma.html#d6dbbdb72360f9e54d64501f80318bb6" title="logarithm of the normalizing constant, ">lognc</a> () <span class="keyword">const</span>;
+<a name="l00299"></a><a class="code" href="classegamma.html#44445c56e60b91b377f207f8d5089790">00299</a>         <span class="keywordtype">void</span> <a class="code" href="classegamma.html#44445c56e60b91b377f207f8d5089790" title="Returns poiter to alpha and beta. Potentially dengerous: use with care!">_param</a> ( vec* &amp;a, vec* &amp;b ) {a=&amp;<a class="code" href="classegamma.html#376cebd8932546c440f21b182910b01b" title="Vector .">alpha</a>;b=&amp;<a class="code" href="classegamma.html#cfc5f136467488a421ab22f886323790" title="Vector .">beta</a>;};
+<a name="l00300"></a><a class="code" href="classegamma.html#6ab5ba56f7cdb2e5921c3e77524fa50a">00300</a>         vec <a class="code" href="classegamma.html#6ab5ba56f7cdb2e5921c3e77524fa50a" title="return expected value">mean</a>()<span class="keyword"> const </span>{vec pom ( <a class="code" href="classegamma.html#376cebd8932546c440f21b182910b01b" title="Vector .">alpha</a> ); pom/=<a class="code" href="classegamma.html#cfc5f136467488a421ab22f886323790" title="Vector .">beta</a>; <span class="keywordflow">return</span> pom;}
+<a name="l00301"></a>00301 };
+<a name="l00302"></a>00302 <span class="comment">/*</span>
+<a name="l00304"></a>00304 <span class="comment">class emix : public epdf {</span>
+<a name="l00305"></a>00305 <span class="comment">protected:</span>
+<a name="l00306"></a>00306 <span class="comment">        int n;</span>
+<a name="l00307"></a>00307 <span class="comment">        vec &amp;w;</span>
+<a name="l00308"></a>00308 <span class="comment">        Array&lt;epdf*&gt; Coms;</span>
+<a name="l00309"></a>00309 <span class="comment">public:</span>
+<a name="l00311"></a>00311 <span class="comment">        emix ( const RV &amp;rv, vec &amp;w0): epdf(rv), n(w0.length()), w(w0), Coms(n) {};</span>
+<a name="l00312"></a>00312 <span class="comment">        void set_parameters( int &amp;i, double wi, epdf* ep){w(i)=wi;Coms(i)=ep;}</span>
+<a name="l00313"></a>00313 <span class="comment">        vec mean(){vec pom; for(int i=0;i&lt;n;i++){pom+=Coms(i)-&gt;mean()*w(i);} return pom;};</span>
+<a name="l00314"></a>00314 <span class="comment">        vec sample() {it_error ( "Not implemented" );return 0;}</span>
+<a name="l00315"></a>00315 <span class="comment">};</span>
+<a name="l00316"></a>00316 <span class="comment">*/</span>
+<a name="l00317"></a>00317 
+<a name="l00319"></a>00319 
+<a name="l00320"></a><a class="code" href="classeuni.html">00320</a> <span class="keyword">class </span><a class="code" href="classeuni.html" title="Uniform distributed density on a rectangular support.">euni</a>: <span class="keyword">public</span> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> {
+<a name="l00321"></a>00321 <span class="keyword">protected</span>:
+<a name="l00323"></a><a class="code" href="classeuni.html#ef42cd8d7645422048d46c46ec5cdac1">00323</a>         vec <a class="code" href="classeuni.html#ef42cd8d7645422048d46c46ec5cdac1" title="lower bound on support">low</a>;
+<a name="l00325"></a><a class="code" href="classeuni.html#71b6d6b41aeb61a7f76f682b72119231">00325</a>         vec <a class="code" href="classeuni.html#71b6d6b41aeb61a7f76f682b72119231" title="upper bound on support">high</a>;
+<a name="l00327"></a><a class="code" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4">00327</a>         vec <a class="code" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4" title="internal">distance</a>;
+<a name="l00329"></a><a class="code" href="classeuni.html#63105490e946e43372d6187ad1bafdda">00329</a>         <span class="keywordtype">double</span> <a class="code" href="classeuni.html#63105490e946e43372d6187ad1bafdda" title="normalizing coefficients">nk</a>;
+<a name="l00331"></a><a class="code" href="classeuni.html#f445a0ce24f39d14c1a4eed53fc8e2c3">00331</a>         <span class="keywordtype">double</span> <a class="code" href="classeuni.html#f445a0ce24f39d14c1a4eed53fc8e2c3" title="cache of log( nk )">lnk</a>;
+<a name="l00332"></a>00332 <span class="keyword">public</span>:
+<a name="l00334"></a><a class="code" href="classeuni.html#2537a6c239cff52e3ba814851a1116cd">00334</a>         <a class="code" href="classeuni.html#2537a6c239cff52e3ba814851a1116cd" title="Defualt constructor.">euni</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a> ) :<a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> ( rv ) {}
+<a name="l00335"></a><a class="code" href="classeuni.html#2723d4992900b5c5495bfa03628195ed">00335</a>         <span class="keywordtype">double</span> <a class="code" href="classeuni.html#2723d4992900b5c5495bfa03628195ed" 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> <a class="code" href="classeuni.html#63105490e946e43372d6187ad1bafdda" title="normalizing coefficients">nk</a>;}
+<a name="l00336"></a><a class="code" href="classeuni.html#06af95d514a6623ad4688bd2ad50ad71">00336</a>         <span class="keywordtype">double</span> <a class="code" href="classeuni.html#06af95d514a6623ad4688bd2ad50ad71" title="Compute log-probability of argument val.">evalpdflog</a> ( <span class="keyword">const</span> vec &amp;val )<span class="keyword"> const  </span>{<span class="keywordflow">return</span> <a class="code" href="classeuni.html#f445a0ce24f39d14c1a4eed53fc8e2c3" title="cache of log( nk )">lnk</a>;}
+<a name="l00337"></a><a class="code" href="classeuni.html#4a0e09392be17beaee120ba98fc038cd">00337</a>         vec <a class="code" href="classeuni.html#4a0e09392be17beaee120ba98fc038cd" title="Returns a sample,  from density .">sample</a>()<span class="keyword"> const </span>{
+<a name="l00338"></a>00338                 vec smp ( <a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a>.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>() );
+<a name="l00339"></a>00339 <span class="preprocessor">#pragma omp critical</span>
+<a name="l00340"></a>00340 <span class="preprocessor"></span>                UniRNG.sample_vector ( <a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a>.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>(),smp );
+<a name="l00341"></a>00341                 <span class="keywordflow">return</span> <a class="code" href="classeuni.html#ef42cd8d7645422048d46c46ec5cdac1" title="lower bound on support">low</a>+elem_mult ( <a class="code" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4" title="internal">distance</a>,smp );
+<a name="l00342"></a>00342         }
+<a name="l00344"></a><a class="code" href="classeuni.html#4fd7c6a05100616ad16ece405cad7bf2">00344</a>         <span class="keywordtype">void</span> <a class="code" href="classeuni.html#4fd7c6a05100616ad16ece405cad7bf2" title="set values of low and high ">set_parameters</a> ( <span class="keyword">const</span> vec &amp;low0, <span class="keyword">const</span> vec &amp;high0 ) {
+<a name="l00345"></a>00345                 <a class="code" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4" title="internal">distance</a> = high0-low0;
+<a name="l00346"></a>00346                 it_assert_debug ( min ( <a class="code" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4" title="internal">distance</a> ) &gt;0.0,<span class="stringliteral">"bad support"</span> );
+<a name="l00347"></a>00347                 <a class="code" href="classeuni.html#ef42cd8d7645422048d46c46ec5cdac1" title="lower bound on support">low</a> = low0;
+<a name="l00348"></a>00348                 <a class="code" href="classeuni.html#71b6d6b41aeb61a7f76f682b72119231" title="upper bound on support">high</a> = high0;
+<a name="l00349"></a>00349                 <a class="code" href="classeuni.html#63105490e946e43372d6187ad1bafdda" title="normalizing coefficients">nk</a> = prod ( 1.0/<a class="code" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4" title="internal">distance</a> );
+<a name="l00350"></a>00350                 <a class="code" href="classeuni.html#f445a0ce24f39d14c1a4eed53fc8e2c3" title="cache of log( nk )">lnk</a> = log ( <a class="code" href="classeuni.html#63105490e946e43372d6187ad1bafdda" title="normalizing coefficients">nk</a> );
+<a name="l00351"></a>00351         }
+<a name="l00352"></a><a class="code" href="classeuni.html#8050087e421a9cfd1b4b1f8bd33b1cc1">00352</a>         vec <a class="code" href="classeuni.html#8050087e421a9cfd1b4b1f8bd33b1cc1" title="return expected value">mean</a>()<span class="keyword"> const </span>{vec pom=<a class="code" href="classeuni.html#71b6d6b41aeb61a7f76f682b72119231" title="upper bound on support">high</a>; pom-=<a class="code" href="classeuni.html#ef42cd8d7645422048d46c46ec5cdac1" title="lower bound on support">low</a>; pom/=2.0; <span class="keywordflow">return</span> pom;}
+<a name="l00353"></a>00353 };
+<a name="l00354"></a>00354 
+<a name="l00355"></a>00355 
+<a name="l00361"></a>00361 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
+<a name="l00362"></a><a class="code" href="classmlnorm.html">00362</a> <span class="keyword">class </span><a class="code" href="classmlnorm.html" title="Normal distributed linear function with linear function of mean value;.">mlnorm</a> : <span class="keyword">public</span> <a class="code" href="classmEF.html" title="Exponential family model.">mEF</a> {
+<a name="l00364"></a>00364         <a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm&lt;sq_T&gt;</a> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>;
+<a name="l00365"></a>00365         mat A;
+<a name="l00366"></a>00366         vec&amp; _mu; <span class="comment">//cached epdf.mu;</span>
+<a name="l00367"></a>00367 <span class="keyword">public</span>:
+<a name="l00369"></a>00369         <a class="code" href="classmlnorm.html#f927203b3f31171c5c10ffc7caa797f5" title="Constructor.">mlnorm</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;<a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>,<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;<a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a> );
+<a name="l00371"></a>00371         <span class="keywordtype">void</span> <a class="code" href="classmlnorm.html#b6749030c5d5abcb3eb6898f74cea3c0" title="Set A and R.">set_parameters</a> ( <span class="keyword">const</span>  mat &amp;A, <span class="keyword">const</span> sq_T &amp;R );
+<a name="l00373"></a>00373         vec <a class="code" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18" title="Generate one sample of the posterior.">samplecond</a> ( vec &amp;cond, <span class="keywordtype">double</span> &amp;lik );
+<a name="l00375"></a>00375         mat <a class="code" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18" title="Generate one sample of the posterior.">samplecond</a> ( vec &amp;cond, vec &amp;lik, <span class="keywordtype">int</span> n );
+<a name="l00377"></a>00377         <span class="keywordtype">void</span> <a class="code" href="classmlnorm.html#5232fc7e305eceab4e2bd6a8daa44195" title="Set value of rvc . Result of this operation is stored in epdf use function _ep to...">condition</a> ( vec &amp;cond );
+<a name="l00378"></a>00378 };
+<a name="l00379"></a>00379 
+<a name="l00389"></a><a class="code" href="classmgamma.html">00389</a> <span class="keyword">class </span><a class="code" href="classmgamma.html" title="Gamma random walk.">mgamma</a> : <span class="keyword">public</span> <a class="code" href="classmEF.html" title="Exponential family model.">mEF</a> {
+<a name="l00390"></a>00390 <span class="keyword">protected</span>:
+<a name="l00392"></a><a class="code" href="classmgamma.html#612dbf35c770a780027619aaac2c443e">00392</a>         <a class="code" href="classegamma.html" title="Gamma posterior density.">egamma</a> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>;
+<a name="l00394"></a><a class="code" href="classmgamma.html#43f733cce0245a52363d566099add687">00394</a>         <span class="keywordtype">double</span> <a class="code" href="classmgamma.html#43f733cce0245a52363d566099add687" title="Constant .">k</a>;
+<a name="l00396"></a><a class="code" href="classmgamma.html#5e90652837448bcc29707e7412f99691">00396</a>         vec* <a class="code" href="classmgamma.html#5e90652837448bcc29707e7412f99691" title="cache of epdf.beta">_beta</a>;
+<a name="l00397"></a>00397 
+<a name="l00398"></a>00398 <span class="keyword">public</span>:
+<a name="l00400"></a>00400         <a class="code" href="classmgamma.html#af43e61b86900c0398d5c0ffc83b94e6" title="Constructor.">mgamma</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="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>,<span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;<a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a> );
+<a name="l00402"></a>00402         <span class="keywordtype">void</span> <a class="code" href="classmgamma.html#a9d646cf758a70126dde7c48790b6e94" title="Set value of k.">set_parameters</a> ( <span class="keywordtype">double</span> <a class="code" href="classmgamma.html#43f733cce0245a52363d566099add687" title="Constant .">k</a> );
+<a name="l00403"></a><a class="code" href="classmgamma.html#a61094c9f7a2d64ea77b130cbc031f97">00403</a>         <span class="keywordtype">void</span> <a class="code" href="classmgamma.html#a61094c9f7a2d64ea77b130cbc031f97" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( <span class="keyword">const</span> vec &amp;val ) {*<a class="code" href="classmgamma.html#5e90652837448bcc29707e7412f99691" title="cache of epdf.beta">_beta</a>=<a class="code" href="classmgamma.html#43f733cce0245a52363d566099add687" title="Constant .">k</a>/val;};
+<a name="l00404"></a>00404 };
+<a name="l00405"></a>00405 
+<a name="l00417"></a><a class="code" href="classmgamma__fix.html">00417</a> <span class="keyword">class </span><a class="code" href="classmgamma__fix.html" title="Gamma random walk around a fixed point.">mgamma_fix</a> : <span class="keyword">public</span> <a class="code" href="classmgamma.html" title="Gamma random walk.">mgamma</a> {
+<a name="l00418"></a>00418 <span class="keyword">protected</span>:
+<a name="l00420"></a><a class="code" href="classmgamma__fix.html#3f48c09caddc298901ad75fe7c0529f6">00420</a>         <span class="keywordtype">double</span> <a class="code" href="classmgamma__fix.html#3f48c09caddc298901ad75fe7c0529f6" title="parameter l">l</a>;
+<a name="l00422"></a><a class="code" href="classmgamma__fix.html#81ce49029ecc385418619b200dcafeb0">00422</a>         vec <a class="code" href="classmgamma__fix.html#81ce49029ecc385418619b200dcafeb0" title="reference vector">refl</a>;
+<a name="l00423"></a>00423 <span class="keyword">public</span>:
+<a name="l00425"></a><a class="code" href="classmgamma__fix.html#b92c3d2e5fd0381033a072e5ef3bcf80">00425</a>         <a class="code" href="classmgamma__fix.html#b92c3d2e5fd0381033a072e5ef3bcf80" title="Constructor.">mgamma_fix</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="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>,<span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;<a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a> ) : <a class="code" href="classmgamma.html" title="Gamma random walk.">mgamma</a> ( rv,rvc ),<a class="code" href="classmgamma__fix.html#81ce49029ecc385418619b200dcafeb0" title="reference vector">refl</a> ( rv.count() ) {};
+<a name="l00427"></a><a class="code" href="classmgamma__fix.html#ec6f846896749e27cb7be9fa48dd1cb1">00427</a>         <span class="keywordtype">void</span> <a class="code" href="classmgamma__fix.html#ec6f846896749e27cb7be9fa48dd1cb1" title="Set value of k.">set_parameters</a> ( <span class="keywordtype">double</span> k0 , vec ref0, <span class="keywordtype">double</span> l0 ) {
+<a name="l00428"></a>00428                 <a class="code" href="classmgamma.html#a9d646cf758a70126dde7c48790b6e94" title="Set value of k.">mgamma::set_parameters</a> ( k0 );
+<a name="l00429"></a>00429                 <a class="code" href="classmgamma__fix.html#81ce49029ecc385418619b200dcafeb0" title="reference vector">refl</a>=pow ( ref0,1.0-l0 );<a class="code" href="classmgamma__fix.html#3f48c09caddc298901ad75fe7c0529f6" title="parameter l">l</a>=l0;
+<a name="l00430"></a>00430         };
+<a name="l00431"></a>00431 
+<a name="l00432"></a><a class="code" href="classmgamma__fix.html#6ea3931eec7b7da7b693e45981052460">00432</a>         <span class="keywordtype">void</span> <a class="code" href="classmgamma__fix.html#6ea3931eec7b7da7b693e45981052460" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( <span class="keyword">const</span> vec &amp;val ) {vec mean=elem_mult ( <a class="code" href="classmgamma__fix.html#81ce49029ecc385418619b200dcafeb0" title="reference vector">refl</a>,pow ( val,<a class="code" href="classmgamma__fix.html#3f48c09caddc298901ad75fe7c0529f6" title="parameter l">l</a> ) ); *<a class="code" href="classmgamma.html#5e90652837448bcc29707e7412f99691" title="cache of epdf.beta">_beta</a>=<a class="code" href="classmgamma.html#43f733cce0245a52363d566099add687" title="Constant .">k</a>/mean;};
+<a name="l00433"></a>00433 };
+<a name="l00434"></a>00434 
+<a name="l00436"></a><a class="code" href="libEF_8h.html#99497a3ff630f761cf6bff7babd23212">00436</a> <span class="keyword">enum</span> <a class="code" href="libEF_8h.html#99497a3ff630f761cf6bff7babd23212" title="Switch between various resampling methods.">RESAMPLING_METHOD</a> { MULTINOMIAL = 0, STRATIFIED = 1, SYSTEMATIC = 3 };
+<a name="l00442"></a><a class="code" href="classeEmp.html">00442</a> <span class="keyword">class </span><a class="code" href="classeEmp.html" title="Weighted empirical density.">eEmp</a>: <span class="keyword">public</span> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> {
+<a name="l00443"></a>00443 <span class="keyword">protected</span> :
+<a name="l00445"></a><a class="code" href="classeEmp.html#8c33034de0e35f03f8bb85d3d67438fd">00445</a>         <span class="keywordtype">int</span> <a class="code" href="classeEmp.html#8c33034de0e35f03f8bb85d3d67438fd" title="Number of particles.">n</a>;
+<a name="l00447"></a><a class="code" href="classeEmp.html#ae78d144404ddba843c93b171b215de8">00447</a>         vec <a class="code" href="classeEmp.html#ae78d144404ddba843c93b171b215de8" title="Sample weights .">w</a>;
+<a name="l00449"></a><a class="code" href="classeEmp.html#a4d6f4bbd6a6824fc39f14676701279a">00449</a>         Array&lt;vec&gt; <a class="code" href="classeEmp.html#a4d6f4bbd6a6824fc39f14676701279a" title="Samples .">samples</a>;
+<a name="l00450"></a>00450 <span class="keyword">public</span>:
+<a name="l00452"></a><a class="code" href="classeEmp.html#0c04b073ecd0dae3d498e680ae27e9e4">00452</a>         <a class="code" href="classeEmp.html#0c04b073ecd0dae3d498e680ae27e9e4" title="Default constructor.">eEmp</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">int</span> n0 ) :<a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> ( rv0 ),<a class="code" href="classeEmp.html#8c33034de0e35f03f8bb85d3d67438fd" title="Number of particles.">n</a> ( n0 ),<a class="code" href="classeEmp.html#ae78d144404ddba843c93b171b215de8" title="Sample weights .">w</a> ( <a class="code" href="classeEmp.html#8c33034de0e35f03f8bb85d3d67438fd" title="Number of particles.">n</a> ),<a class="code" href="classeEmp.html#a4d6f4bbd6a6824fc39f14676701279a" title="Samples .">samples</a> ( <a class="code" href="classeEmp.html#8c33034de0e35f03f8bb85d3d67438fd" title="Number of particles.">n</a> ) {};
+<a name="l00454"></a>00454         <span class="keywordtype">void</span> <a class="code" href="classeEmp.html#eab03bd3381aaea11ce34d5a26556353" title="Set samples and weights.">set_parameters</a> ( <span class="keyword">const</span> vec &amp;w0, <span class="keyword">const</span> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* pdf0 );
+<a name="l00456"></a>00456         <span class="keywordtype">void</span> <a class="code" href="classeEmp.html#e31bc9e6196173c3480b06a761a3e716" title="Set sample.">set_samples</a> ( <span class="keyword">const</span> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* pdf0 );
+<a name="l00458"></a><a class="code" href="classeEmp.html#31b2bfb73b72486a5c89f2ab850c7a9b">00458</a>         vec&amp; <a class="code" href="classeEmp.html#31b2bfb73b72486a5c89f2ab850c7a9b" title="Potentially dangerous, use with care.">_w</a>()  {<span class="keywordflow">return</span> <a class="code" href="classeEmp.html#ae78d144404ddba843c93b171b215de8" title="Sample weights .">w</a>;};
+<a name="l00460"></a><a class="code" href="classeEmp.html#31b747eca73b16f30370827ba4cc3575">00460</a>         Array&lt;vec&gt;&amp; <a class="code" href="classeEmp.html#31b747eca73b16f30370827ba4cc3575" title="access function">_samples</a>() {<span class="keywordflow">return</span> <a class="code" href="classeEmp.html#a4d6f4bbd6a6824fc39f14676701279a" title="Samples .">samples</a>;};
+<a name="l00462"></a>00462         ivec <a class="code" href="classeEmp.html#77268292fc4465cb73ddbfb1f2932a59" title="Function performs resampling, i.e. removal of low-weight samples and duplication...">resample</a> ( <a class="code" href="libEF_8h.html#99497a3ff630f761cf6bff7babd23212" title="Switch between various resampling methods.">RESAMPLING_METHOD</a> method = SYSTEMATIC );
+<a name="l00464"></a><a class="code" href="classeEmp.html#83f9283f92b805508d896479dc1ccf12">00464</a>         vec <a class="code" href="classeEmp.html#83f9283f92b805508d896479dc1ccf12" title="inherited operation : NOT implemneted">sample</a>()<span class="keyword"> const </span>{it_error ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> 0;}
+<a name="l00466"></a><a class="code" href="classeEmp.html#23e7358995400865ad2e278945922fb3">00466</a>         <span class="keywordtype">double</span> <a class="code" href="classeEmp.html#23e7358995400865ad2e278945922fb3" title="inherited operation : NOT implemneted">evalpdflog</a> ( <span class="keyword">const</span> vec &amp;val )<span class="keyword"> const </span>{it_error ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> 0.0;}
+<a name="l00467"></a><a class="code" href="classeEmp.html#ba055c19038cc72628d98e25197e982d">00467</a>         vec <a class="code" href="classeEmp.html#ba055c19038cc72628d98e25197e982d" title="return expected value">mean</a>()<span class="keyword"> const </span>{
+<a name="l00468"></a>00468                 vec pom=zeros ( <a class="code" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9" title="Identified of the random variable.">rv</a>.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return number of scalars in the RV.">count</a>() );
+<a name="l00469"></a>00469                 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i&lt;<a class="code" href="classeEmp.html#8c33034de0e35f03f8bb85d3d67438fd" title="Number of particles.">n</a>;i++ ) {pom+=<a class="code" href="classeEmp.html#a4d6f4bbd6a6824fc39f14676701279a" title="Samples .">samples</a> ( i ) *<a class="code" href="classeEmp.html#ae78d144404ddba843c93b171b215de8" title="Sample weights .">w</a> ( i );}
+<a name="l00470"></a>00470                 <span class="keywordflow">return</span> pom;
+<a name="l00471"></a>00471         }
+<a name="l00472"></a>00472 };
+<a name="l00473"></a>00473 
 <a name="l00474"></a>00474 
-<a name="l00475"></a>00475 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
-<a name="l00476"></a><a class="code" href="classenorm.html#5bf185e31e5954fceb90ada3debd2ff2">00476</a> <span class="keywordtype">void</span> <a class="code" href="classenorm.html#5bf185e31e5954fceb90ada3debd2ff2" title="dupdate in exponential form (not really handy)">enorm&lt;sq_T&gt;::dupdate</a> ( mat &amp;v, <span class="keywordtype">double</span> nu ) {
-<a name="l00477"></a>00477         <span class="comment">//</span>
-<a name="l00478"></a>00478 };
+<a name="l00476"></a>00476 
+<a name="l00477"></a>00477 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
+<a name="l00478"></a><a class="code" href="classenorm.html#7b5cb487a2570e8109bfdc0df149aa06">00478</a> <a class="code" href="classenorm.html#7b5cb487a2570e8109bfdc0df149aa06" title="Default constructor.">enorm&lt;sq_T&gt;::enorm</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv ) :<a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> ( rv ), mu ( rv.count() ),R ( rv.count() ),dim ( rv.count() ) {};
 <a name="l00479"></a>00479 
 <a name="l00480"></a>00480 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
-<a name="l00481"></a><a class="code" href="classenorm.html#5b5fd142b6b17ea334597960e3fe126a">00481</a> <span class="keywordtype">void</span> <a class="code" href="classenorm.html#5b5fd142b6b17ea334597960e3fe126a" title="tupdate in exponential form (not really handy)">enorm&lt;sq_T&gt;::tupdate</a> ( <span class="keywordtype">double</span> phi, mat &amp;vbar, <span class="keywordtype">double</span> nubar ) {
-<a name="l00482"></a>00482         <span class="comment">//</span>
-<a name="l00483"></a>00483 };
-<a name="l00484"></a>00484 
-<a name="l00485"></a>00485 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
-<a name="l00486"></a><a class="code" href="classenorm.html#60b47544f6181ffd4530d3e415ce12c5">00486</a> vec <a class="code" href="classenorm.html#60b47544f6181ffd4530d3e415ce12c5" title="Returns a sample,  from density .">enorm&lt;sq_T&gt;::sample</a>()<span class="keyword"> const </span>{
-<a name="l00487"></a>00487         vec x ( <a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e" title="dimension (redundant from rv.count() for easier coding )">dim</a> );
-<a name="l00488"></a>00488         NorRNG.sample_vector ( <a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e" title="dimension (redundant from rv.count() for easier coding )">dim</a>,x );
-<a name="l00489"></a>00489         vec smp = <a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>.sqrt_mult ( x );
-<a name="l00490"></a>00490 
-<a name="l00491"></a>00491         smp += <a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>;
-<a name="l00492"></a>00492         <span class="keywordflow">return</span> smp;
-<a name="l00493"></a>00493 };
-<a name="l00494"></a>00494 
-<a name="l00495"></a>00495 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
-<a name="l00496"></a><a class="code" href="classenorm.html#60f0f3bfa53d6e65843eea9532b16d36">00496</a> mat <a class="code" href="classenorm.html#60b47544f6181ffd4530d3e415ce12c5" title="Returns a sample,  from density .">enorm&lt;sq_T&gt;::sample</a> ( <span class="keywordtype">int</span> N )<span class="keyword"> const </span>{
-<a name="l00497"></a>00497         mat X ( <a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e" title="dimension (redundant from rv.count() for easier coding )">dim</a>,N );
-<a name="l00498"></a>00498         vec x ( <a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e" title="dimension (redundant from rv.count() for easier coding )">dim</a> );
-<a name="l00499"></a>00499         vec pom;
-<a name="l00500"></a>00500         <span class="keywordtype">int</span> i;
-<a name="l00501"></a>00501 
-<a name="l00502"></a>00502         <span class="keywordflow">for</span> ( i=0;i&lt;N;i++ ) {
-<a name="l00503"></a>00503                 NorRNG.sample_vector ( <a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e" title="dimension (redundant from rv.count() for easier coding )">dim</a>,x );
-<a name="l00504"></a>00504                 pom = <a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>.sqrt_mult ( x );
-<a name="l00505"></a>00505                 pom +=<a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>;
-<a name="l00506"></a>00506                 X.set_col ( i, pom );
-<a name="l00507"></a>00507         }
-<a name="l00508"></a>00508 
-<a name="l00509"></a>00509         <span class="keywordflow">return</span> X;
-<a name="l00510"></a>00510 };
-<a name="l00511"></a>00511 
-<a name="l00512"></a>00512 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
-<a name="l00513"></a><a class="code" href="classenorm.html#b9e1dfd33692d7b3f1a59f17b0e61bd0">00513</a> <span class="keywordtype">double</span> <a class="code" href="classenorm.html#b9e1dfd33692d7b3f1a59f17b0e61bd0" title="Compute probability of argument val.">enorm&lt;sq_T&gt;::eval</a> ( <span class="keyword">const</span> vec &amp;val )<span class="keyword"> const </span>{
-<a name="l00514"></a>00514         <span class="keywordtype">double</span> pdfl,e;
-<a name="l00515"></a>00515         pdfl = <a class="code" href="classenorm.html#609a7c33dbb4fdfab050f3bdd1122401" title="Evaluate normalized log-probability.">evalpdflog</a> ( val );
-<a name="l00516"></a>00516         e = exp ( pdfl );
-<a name="l00517"></a>00517         <span class="keywordflow">return</span> e;
-<a name="l00518"></a>00518 };
-<a name="l00519"></a>00519 
-<a name="l00520"></a>00520 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
-<a name="l00521"></a><a class="code" href="classenorm.html#609a7c33dbb4fdfab050f3bdd1122401">00521</a> <span class="keywordtype">double</span> <a class="code" href="classenorm.html#609a7c33dbb4fdfab050f3bdd1122401" title="Evaluate normalized log-probability.">enorm&lt;sq_T&gt;::evalpdflog</a> ( <span class="keyword">const</span> vec &amp;val )<span class="keyword"> const </span>{
-<a name="l00522"></a>00522         <span class="comment">// 1.83787706640935 = log(2pi)</span>
-<a name="l00523"></a>00523         <span class="keywordflow">return</span>  -0.5* ( +<a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>.invqform ( <a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>-val ) ) - <a class="code" href="classenorm.html#b289a36a69db59d182bb6eba9c05d4a8" title="logarithm of the normalizing constant, ">lognc</a>();
-<a name="l00524"></a>00524 };
-<a name="l00525"></a>00525 
-<a name="l00526"></a>00526 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
-<a name="l00527"></a><a class="code" href="classenorm.html#b289a36a69db59d182bb6eba9c05d4a8">00527</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="classenorm.html#b289a36a69db59d182bb6eba9c05d4a8" title="logarithm of the normalizing constant, ">enorm&lt;sq_T&gt;::lognc</a> ()<span class="keyword"> const </span>{
-<a name="l00528"></a>00528         <span class="comment">// 1.83787706640935 = log(2pi)</span>
-<a name="l00529"></a>00529         <span class="keywordflow">return</span> -0.5* ( <a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>.cols() * 1.83787706640935 +<a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>.logdet() );
+<a name="l00481"></a><a class="code" href="classenorm.html#1394a65caa6e00d42e00cc99b12227af">00481</a> <span class="keywordtype">void</span> <a class="code" href="classenorm.html#1394a65caa6e00d42e00cc99b12227af" title="Set mean value mu and covariance R.">enorm&lt;sq_T&gt;::set_parameters</a> ( <span class="keyword">const</span> vec &amp;mu0, <span class="keyword">const</span> sq_T &amp;R0 ) {
+<a name="l00482"></a>00482 <span class="comment">//Fixme test dimensions of mu0 and R0;</span>
+<a name="l00483"></a>00483         <a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a> = mu0;
+<a name="l00484"></a>00484         <a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a> = R0;
+<a name="l00485"></a>00485 };
+<a name="l00486"></a>00486 
+<a name="l00487"></a>00487 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
+<a name="l00488"></a><a class="code" href="classenorm.html#5bf185e31e5954fceb90ada3debd2ff2">00488</a> <span class="keywordtype">void</span> <a class="code" href="classenorm.html#5bf185e31e5954fceb90ada3debd2ff2" title="dupdate in exponential form (not really handy)">enorm&lt;sq_T&gt;::dupdate</a> ( mat &amp;v, <span class="keywordtype">double</span> nu ) {
+<a name="l00489"></a>00489         <span class="comment">//</span>
+<a name="l00490"></a>00490 };
+<a name="l00491"></a>00491 
+<a name="l00492"></a>00492 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
+<a name="l00493"></a><a class="code" href="classenorm.html#5b5fd142b6b17ea334597960e3fe126a">00493</a> <span class="keywordtype">void</span> <a class="code" href="classenorm.html#5b5fd142b6b17ea334597960e3fe126a" title="tupdate in exponential form (not really handy)">enorm&lt;sq_T&gt;::tupdate</a> ( <span class="keywordtype">double</span> phi, mat &amp;vbar, <span class="keywordtype">double</span> nubar ) {
+<a name="l00494"></a>00494         <span class="comment">//</span>
+<a name="l00495"></a>00495 };
+<a name="l00496"></a>00496 
+<a name="l00497"></a>00497 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
+<a name="l00498"></a><a class="code" href="classenorm.html#60b47544f6181ffd4530d3e415ce12c5">00498</a> vec <a class="code" href="classenorm.html#60b47544f6181ffd4530d3e415ce12c5" title="Returns a sample,  from density .">enorm&lt;sq_T&gt;::sample</a>()<span class="keyword"> const </span>{
+<a name="l00499"></a>00499         vec x ( <a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e" title="dimension (redundant from rv.count() for easier coding )">dim</a> );
+<a name="l00500"></a>00500         NorRNG.sample_vector ( <a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e" title="dimension (redundant from rv.count() for easier coding )">dim</a>,x );
+<a name="l00501"></a>00501         vec smp = <a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>.sqrt_mult ( x );
+<a name="l00502"></a>00502 
+<a name="l00503"></a>00503         smp += <a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>;
+<a name="l00504"></a>00504         <span class="keywordflow">return</span> smp;
+<a name="l00505"></a>00505 };
+<a name="l00506"></a>00506 
+<a name="l00507"></a>00507 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
+<a name="l00508"></a><a class="code" href="classenorm.html#60f0f3bfa53d6e65843eea9532b16d36">00508</a> mat <a class="code" href="classenorm.html#60b47544f6181ffd4530d3e415ce12c5" title="Returns a sample,  from density .">enorm&lt;sq_T&gt;::sample</a> ( <span class="keywordtype">int</span> N )<span class="keyword"> const </span>{
+<a name="l00509"></a>00509         mat X ( <a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e" title="dimension (redundant from rv.count() for easier coding )">dim</a>,N );
+<a name="l00510"></a>00510         vec x ( <a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e" title="dimension (redundant from rv.count() for easier coding )">dim</a> );
+<a name="l00511"></a>00511         vec pom;
+<a name="l00512"></a>00512         <span class="keywordtype">int</span> i;
+<a name="l00513"></a>00513 
+<a name="l00514"></a>00514         <span class="keywordflow">for</span> ( i=0;i&lt;N;i++ ) {
+<a name="l00515"></a>00515                 NorRNG.sample_vector ( <a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e" title="dimension (redundant from rv.count() for easier coding )">dim</a>,x );
+<a name="l00516"></a>00516                 pom = <a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>.sqrt_mult ( x );
+<a name="l00517"></a>00517                 pom +=<a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>;
+<a name="l00518"></a>00518                 X.set_col ( i, pom );
+<a name="l00519"></a>00519         }
+<a name="l00520"></a>00520 
+<a name="l00521"></a>00521         <span class="keywordflow">return</span> X;
+<a name="l00522"></a>00522 };
+<a name="l00523"></a>00523 
+<a name="l00524"></a>00524 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
+<a name="l00525"></a><a class="code" href="classenorm.html#b9e1dfd33692d7b3f1a59f17b0e61bd0">00525</a> <span class="keywordtype">double</span> <a class="code" href="classenorm.html#b9e1dfd33692d7b3f1a59f17b0e61bd0" title="Compute probability of argument val.">enorm&lt;sq_T&gt;::eval</a> ( <span class="keyword">const</span> vec &amp;val )<span class="keyword"> const </span>{
+<a name="l00526"></a>00526         <span class="keywordtype">double</span> pdfl,e;
+<a name="l00527"></a>00527         pdfl = <a class="code" href="classeEF.html#6466e8d4aa9dd64698ed288cbb1afc03" title="Evaluate normalized log-probability.">evalpdflog</a> ( val );
+<a name="l00528"></a>00528         e = exp ( pdfl );
+<a name="l00529"></a>00529         <span class="keywordflow">return</span> e;
 <a name="l00530"></a>00530 };
 <a name="l00531"></a>00531 
 <a name="l00532"></a>00532 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
-<a name="l00533"></a><a class="code" href="classmlnorm.html#f927203b3f31171c5c10ffc7caa797f5">00533</a> <a class="code" href="classmlnorm.html#f927203b3f31171c5c10ffc7caa797f5" title="Constructor.">mlnorm&lt;sq_T&gt;::mlnorm</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv0,<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rvc0 ) :<a class="code" href="classmEF.html" title="Exponential family model.">mEF</a> ( rv0,rvc0 ),<a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> ( rv0 ),A ( rv0.count(),rv0.count() ),<a class="code" href="classenorm.html#0b8cb284e5af920a1b64a21d057ec5ac" title="returns a pointer to the internal mean value. Use with Care!">_mu</a> ( <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.<a class="code" href="classenorm.html#0b8cb284e5af920a1b64a21d057ec5ac" title="returns a pointer to the internal mean value. Use with Care!">_mu</a>() ) {
-<a name="l00534"></a>00534         <a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a> =&amp;<a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>;
-<a name="l00535"></a>00535 }
-<a name="l00536"></a>00536 
-<a name="l00537"></a>00537 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
-<a name="l00538"></a><a class="code" href="classmlnorm.html#b6749030c5d5abcb3eb6898f74cea3c0">00538</a> <span class="keywordtype">void</span> <a class="code" href="classmlnorm.html#b6749030c5d5abcb3eb6898f74cea3c0" title="Set A and R.">mlnorm&lt;sq_T&gt;::set_parameters</a> ( <span class="keyword">const</span> mat &amp;A0, <span class="keyword">const</span> sq_T &amp;R0 ) {
-<a name="l00539"></a>00539         <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.set_parameters ( zeros ( <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>() ),R0 );
-<a name="l00540"></a>00540         A = A0;
-<a name="l00541"></a>00541 }
-<a name="l00542"></a>00542 
-<a name="l00543"></a>00543 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
-<a name="l00544"></a><a class="code" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18">00544</a> vec <a class="code" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18" title="Generate one sample of the posterior.">mlnorm&lt;sq_T&gt;::samplecond</a> ( vec &amp;cond, <span class="keywordtype">double</span> &amp;lik ) {
-<a name="l00545"></a>00545         this-&gt;<a class="code" href="classmlnorm.html#5232fc7e305eceab4e2bd6a8daa44195" title="Set value of rvc . Result of this operation is stored in epdf use function _ep to...">condition</a> ( cond );
-<a name="l00546"></a>00546         vec smp = <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.sample();
-<a name="l00547"></a>00547         lik = <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.eval ( smp );
-<a name="l00548"></a>00548         <span class="keywordflow">return</span> smp;
-<a name="l00549"></a>00549 }
-<a name="l00550"></a>00550 
-<a name="l00551"></a>00551 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
-<a name="l00552"></a><a class="code" href="classmlnorm.html#215fb88cc8b95d64cdefd6849abdd1e8">00552</a> mat <a class="code" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18" title="Generate one sample of the posterior.">mlnorm&lt;sq_T&gt;::samplecond</a> ( vec &amp;cond, vec &amp;lik, <span class="keywordtype">int</span> n ) {
-<a name="l00553"></a>00553         <span class="keywordtype">int</span> i;
-<a name="l00554"></a>00554         <span class="keywordtype">int</span> dim = <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>();
-<a name="l00555"></a>00555         mat Smp ( dim,n );
-<a name="l00556"></a>00556         vec smp ( dim );
+<a name="l00533"></a><a class="code" href="classenorm.html#c1e3dcba256b0153cfdb286120e110be">00533</a> <span class="keywordtype">double</span> <a class="code" href="classenorm.html#c1e3dcba256b0153cfdb286120e110be" title="Evaluate normalized log-probability.">enorm&lt;sq_T&gt;::evalpdflog_nn</a> ( <span class="keyword">const</span> vec &amp;val )<span class="keyword"> const </span>{
+<a name="l00534"></a>00534         <span class="comment">// 1.83787706640935 = log(2pi)</span>
+<a name="l00535"></a>00535         <span class="keywordflow">return</span>  -0.5* (<a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>.invqform ( <a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>-val ) );<span class="comment">// - lognc();</span>
+<a name="l00536"></a>00536 };
+<a name="l00537"></a>00537 
+<a name="l00538"></a>00538 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
+<a name="l00539"></a><a class="code" href="classenorm.html#b289a36a69db59d182bb6eba9c05d4a8">00539</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="classenorm.html#b289a36a69db59d182bb6eba9c05d4a8" title="logarithm of the normalizing constant, ">enorm&lt;sq_T&gt;::lognc</a> ()<span class="keyword"> const </span>{
+<a name="l00540"></a>00540         <span class="comment">// 1.83787706640935 = log(2pi)</span>
+<a name="l00541"></a>00541         <span class="keywordflow">return</span> 0.5* ( <a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>.cols() * 1.83787706640935 +<a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>.logdet() );
+<a name="l00542"></a>00542 };
+<a name="l00543"></a>00543 
+<a name="l00544"></a>00544 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
+<a name="l00545"></a><a class="code" href="classmlnorm.html#f927203b3f31171c5c10ffc7caa797f5">00545</a> <a class="code" href="classmlnorm.html#f927203b3f31171c5c10ffc7caa797f5" title="Constructor.">mlnorm&lt;sq_T&gt;::mlnorm</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv0,<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rvc0 ) :<a class="code" href="classmEF.html" title="Exponential family model.">mEF</a> ( rv0,rvc0 ),<a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> ( rv0 ),A ( rv0.count(),rv0.count() ),<a class="code" href="classenorm.html#0b8cb284e5af920a1b64a21d057ec5ac" title="returns a pointer to the internal mean value. Use with Care!">_mu</a> ( <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.<a class="code" href="classenorm.html#0b8cb284e5af920a1b64a21d057ec5ac" title="returns a pointer to the internal mean value. Use with Care!">_mu</a>() ) {
+<a name="l00546"></a>00546         <a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a> =&amp;<a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>;
+<a name="l00547"></a>00547 }
+<a name="l00548"></a>00548 
+<a name="l00549"></a>00549 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
+<a name="l00550"></a><a class="code" href="classmlnorm.html#b6749030c5d5abcb3eb6898f74cea3c0">00550</a> <span class="keywordtype">void</span> <a class="code" href="classmlnorm.html#b6749030c5d5abcb3eb6898f74cea3c0" title="Set A and R.">mlnorm&lt;sq_T&gt;::set_parameters</a> ( <span class="keyword">const</span> mat &amp;A0, <span class="keyword">const</span> sq_T &amp;R0 ) {
+<a name="l00551"></a>00551         <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.set_parameters ( zeros ( <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>() ),R0 );
+<a name="l00552"></a>00552         A = A0;
+<a name="l00553"></a>00553 }
+<a name="l00554"></a>00554 
+<a name="l00555"></a>00555 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
+<a name="l00556"></a><a class="code" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18">00556</a> vec <a class="code" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18" title="Generate one sample of the posterior.">mlnorm&lt;sq_T&gt;::samplecond</a> ( vec &amp;cond, <span class="keywordtype">double</span> &amp;lik ) {
 <a name="l00557"></a>00557         this-&gt;<a class="code" href="classmlnorm.html#5232fc7e305eceab4e2bd6a8daa44195" title="Set value of rvc . Result of this operation is stored in epdf use function _ep to...">condition</a> ( cond );
-<a name="l00558"></a>00558 
-<a name="l00559"></a>00559         <span class="keywordflow">for</span> ( i=0; i&lt;n; i++ ) {
-<a name="l00560"></a>00560                 smp = <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.sample();
-<a name="l00561"></a>00561                 lik ( i ) = <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.eval ( smp );
-<a name="l00562"></a>00562                 Smp.set_col ( i ,smp );
-<a name="l00563"></a>00563         }
-<a name="l00564"></a>00564 
-<a name="l00565"></a>00565         <span class="keywordflow">return</span> Smp;
-<a name="l00566"></a>00566 }
-<a name="l00567"></a>00567 
-<a name="l00568"></a>00568 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
-<a name="l00569"></a><a class="code" href="classmlnorm.html#5232fc7e305eceab4e2bd6a8daa44195">00569</a> <span class="keywordtype">void</span> <a class="code" href="classmlnorm.html#5232fc7e305eceab4e2bd6a8daa44195" title="Set value of rvc . Result of this operation is stored in epdf use function _ep to...">mlnorm&lt;sq_T&gt;::condition</a> ( vec &amp;cond ) {
-<a name="l00570"></a>00570         _mu = A*cond;
-<a name="l00571"></a>00571 <span class="comment">//R is already assigned;</span>
-<a name="l00572"></a>00572 }
-<a name="l00573"></a>00573 
-<a name="l00575"></a>00575 
+<a name="l00558"></a>00558         vec smp = <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.sample();
+<a name="l00559"></a>00559         lik = <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.eval ( smp );
+<a name="l00560"></a>00560         <span class="keywordflow">return</span> smp;
+<a name="l00561"></a>00561 }
+<a name="l00562"></a>00562 
+<a name="l00563"></a>00563 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
+<a name="l00564"></a><a class="code" href="classmlnorm.html#215fb88cc8b95d64cdefd6849abdd1e8">00564</a> mat <a class="code" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18" title="Generate one sample of the posterior.">mlnorm&lt;sq_T&gt;::samplecond</a> ( vec &amp;cond, vec &amp;lik, <span class="keywordtype">int</span> n ) {
+<a name="l00565"></a>00565         <span class="keywordtype">int</span> i;
+<a name="l00566"></a>00566         <span class="keywordtype">int</span> dim = <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>();
+<a name="l00567"></a>00567         mat Smp ( dim,n );
+<a name="l00568"></a>00568         vec smp ( dim );
+<a name="l00569"></a>00569         this-&gt;<a class="code" href="classmlnorm.html#5232fc7e305eceab4e2bd6a8daa44195" title="Set value of rvc . Result of this operation is stored in epdf use function _ep to...">condition</a> ( cond );
+<a name="l00570"></a>00570 
+<a name="l00571"></a>00571         <span class="keywordflow">for</span> ( i=0; i&lt;n; i++ ) {
+<a name="l00572"></a>00572                 smp = <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.sample();
+<a name="l00573"></a>00573                 lik ( i ) = <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.eval ( smp );
+<a name="l00574"></a>00574                 Smp.set_col ( i ,smp );
+<a name="l00575"></a>00575         }
 <a name="l00576"></a>00576 
-<a name="l00577"></a>00577 <span class="preprocessor">#endif //EF_H</span>
+<a name="l00577"></a>00577         <span class="keywordflow">return</span> Smp;
+<a name="l00578"></a>00578 }
+<a name="l00579"></a>00579 
+<a name="l00580"></a>00580 <span class="keyword">template</span>&lt;<span class="keyword">class</span> sq_T&gt;
+<a name="l00581"></a><a class="code" href="classmlnorm.html#5232fc7e305eceab4e2bd6a8daa44195">00581</a> <span class="keywordtype">void</span> <a class="code" href="classmlnorm.html#5232fc7e305eceab4e2bd6a8daa44195" title="Set value of rvc . Result of this operation is stored in epdf use function _ep to...">mlnorm&lt;sq_T&gt;::condition</a> ( vec &amp;cond ) {
+<a name="l00582"></a>00582         _mu = A*cond;
+<a name="l00583"></a>00583 <span class="comment">//R is already assigned;</span>
+<a name="l00584"></a>00584 }
+<a name="l00585"></a>00585 
+<a name="l00587"></a>00587 
+<a name="l00588"></a>00588 
+<a name="l00589"></a>00589 <span class="preprocessor">#endif //EF_H</span>
 </pre></div></div>
-<hr size="1"><address style="text-align: right;"><small>Generated on Tue Sep 23 16:00:45 2008 for mixpp by&nbsp;
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Oct 9 21:26:31 2008 for mixpp by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
