Show
Ignore:
Timestamp:
06/02/09 10:24:26 (16 years ago)
Author:
smidl
Message:

doc - oprava

Files:
1 modified

Legend:

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

    r353 r354  
    7676<a name="l00023"></a>00023  
    7777<a name="l00024"></a>00024  
    78 <a name="l00026"></a>00026         <span class="keyword">extern</span> <a class="code" href="classitpp_1_1Uniform__RNG.html" title="Uniform distribution.">Uniform_RNG</a> UniRNG; 
    79 <a name="l00028"></a>00028         <span class="keyword">extern</span> <a class="code" href="classitpp_1_1Normal__RNG.html" title="Normal distributionNormal (Gaussian) random variables, using a simplified Ziggurat...">Normal_RNG</a> NorRNG; 
    80 <a name="l00030"></a>00030         <span class="keyword">extern</span> <a class="code" href="classitpp_1_1Gamma__RNG.html" title="Gamma distributionGenerate samples from Gamma(alpha,beta) density, according to the...">Gamma_RNG</a> GamRNG; 
     78<a name="l00026"></a>00026         <span class="keyword">extern</span> Uniform_RNG UniRNG; 
     79<a name="l00028"></a>00028         <span class="keyword">extern</span> Normal_RNG NorRNG; 
     80<a name="l00030"></a>00030         <span class="keyword">extern</span> <a class="code" href="classitpp_1_1Gamma__RNG.html" title="Gamma distribution.">Gamma_RNG</a> GamRNG; 
    8181<a name="l00031"></a>00031  
    8282<a name="l00038"></a><a class="code" href="classbdm_1_1eEF.html">00038</a>         <span class="keyword">class </span><a class="code" href="classbdm_1_1eEF.html" title="General conjugate exponential family posterior density.">eEF</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> 
     
    8686<a name="l00043"></a><a class="code" href="classbdm_1_1eEF.html#d5459d472d0feca7cf1fb5f65c4b9ef4">00043</a> <span class="comment"></span>                        <a class="code" href="classbdm_1_1eEF.html#d5459d472d0feca7cf1fb5f65c4b9ef4" title="default constructor">eEF</a> ( ) :<a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> ( ) {}; 
    8787<a name="l00045"></a>00045                         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1eEF.html#cd678fc9b02007a4b8d6692e746f1bf8" title="logarithm of the normalizing constant, ">lognc</a>() <span class="keyword">const</span> =0; 
    88 <a name="l00047"></a><a class="code" href="classbdm_1_1eEF.html#deef7d6273ba4d5a5cf0bbd91ec7277a">00047</a>                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1eEF.html#deef7d6273ba4d5a5cf0bbd91ec7277a" title="TODO decide if it is really needed.">dupdate</a> ( mat &amp;v ) {<a class="code" href="group__errorhandlingfunc.html#g22d38e98332f9edff88cc501463eedce" title="Abort unconditionally.">it_error</a> ( <span class="stringliteral">"Not implemented"</span> );}; 
    89 <a name="l00049"></a><a class="code" href="classbdm_1_1eEF.html#a4135778ecd9ab774762936c82a097c6">00049</a>                         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1eEF.html#a4135778ecd9ab774762936c82a097c6" title="Evaluate normalized log-probability.">evallog_nn</a> ( <span class="keyword">const</span> vec &amp;val )<span class="keyword"> const</span>{<a class="code" href="group__errorhandlingfunc.html#g22d38e98332f9edff88cc501463eedce" title="Abort unconditionally.">it_error</a> ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> 0.0;}; 
    90 <a name="l00051"></a><a class="code" href="classbdm_1_1eEF.html#a36d06ecdd6f4c79dc122510eaccc692">00051</a>                         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1eEF.html#a36d06ecdd6f4c79dc122510eaccc692" title="Evaluate normalized log-probability.">evallog</a> ( <span class="keyword">const</span> vec &amp;val )<span class="keyword"> const </span>{<span class="keywordtype">double</span> tmp;tmp= <a class="code" href="classbdm_1_1eEF.html#a4135778ecd9ab774762936c82a097c6" title="Evaluate normalized log-probability.">evallog_nn</a> ( val )-<a class="code" href="classbdm_1_1eEF.html#cd678fc9b02007a4b8d6692e746f1bf8" title="logarithm of the normalizing constant, ">lognc</a>();<a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a> ( std::isfinite ( tmp ),<span class="stringliteral">"Infinite value"</span> ); <span class="keywordflow">return</span> tmp;} 
     88<a name="l00047"></a><a class="code" href="classbdm_1_1eEF.html#deef7d6273ba4d5a5cf0bbd91ec7277a">00047</a>                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1eEF.html#deef7d6273ba4d5a5cf0bbd91ec7277a" title="TODO decide if it is really needed.">dupdate</a> ( mat &amp;v ) {it_error ( <span class="stringliteral">"Not implemented"</span> );}; 
     89<a name="l00049"></a><a class="code" href="classbdm_1_1eEF.html#a4135778ecd9ab774762936c82a097c6">00049</a>                         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1eEF.html#a4135778ecd9ab774762936c82a097c6" title="Evaluate normalized log-probability.">evallog_nn</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;}; 
     90<a name="l00051"></a><a class="code" href="classbdm_1_1eEF.html#a36d06ecdd6f4c79dc122510eaccc692">00051</a>                         <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1eEF.html#a36d06ecdd6f4c79dc122510eaccc692" title="Evaluate normalized log-probability.">evallog</a> ( <span class="keyword">const</span> vec &amp;val )<span class="keyword"> const </span>{<span class="keywordtype">double</span> tmp;tmp= <a class="code" href="classbdm_1_1eEF.html#a4135778ecd9ab774762936c82a097c6" title="Evaluate normalized log-probability.">evallog_nn</a> ( val )-<a class="code" href="classbdm_1_1eEF.html#cd678fc9b02007a4b8d6692e746f1bf8" title="logarithm of the normalizing constant, ">lognc</a>();it_assert_debug ( std::isfinite ( tmp ),<span class="stringliteral">"Infinite value"</span> ); <span class="keywordflow">return</span> tmp;} 
    9191<a name="l00053"></a><a class="code" href="classbdm_1_1eEF.html#79a7c8ea8c02e45d410bd1d7ffd72b41">00053</a>                         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1eEF.html#a36d06ecdd6f4c79dc122510eaccc692" title="Evaluate normalized log-probability.">evallog</a> ( <span class="keyword">const</span> mat &amp;Val )<span class="keyword"> const</span> 
    9292<a name="l00054"></a>00054 <span class="keyword">                        </span>{ 
     
    9595<a name="l00057"></a>00057                                 <span class="keywordflow">return</span> x-<a class="code" href="classbdm_1_1eEF.html#cd678fc9b02007a4b8d6692e746f1bf8" title="logarithm of the normalizing constant, ">lognc</a>(); 
    9696<a name="l00058"></a>00058                         } 
    97 <a name="l00060"></a><a class="code" href="classbdm_1_1eEF.html#cf38af29e8e3d650c640509a52396053">00060</a>                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1eEF.html#cf38af29e8e3d650c640509a52396053" title="Power of the density, used e.g. to flatten the density.">pow</a> ( <span class="keywordtype">double</span> p ) {<a class="code" href="group__errorhandlingfunc.html#g22d38e98332f9edff88cc501463eedce" title="Abort unconditionally.">it_error</a> ( <span class="stringliteral">"Not implemented"</span> );}; 
     97<a name="l00060"></a><a class="code" href="classbdm_1_1eEF.html#cf38af29e8e3d650c640509a52396053">00060</a>                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1eEF.html#cf38af29e8e3d650c640509a52396053" title="Power of the density, used e.g. to flatten the density.">pow</a> ( <span class="keywordtype">double</span> p ) {it_error ( <span class="stringliteral">"Not implemented"</span> );}; 
    9898<a name="l00061"></a>00061         }; 
    9999<a name="l00062"></a>00062  
     
    113113<a name="l00087"></a><a class="code" href="classbdm_1_1BMEF.html#2def512872ed8a4fc3b702371ec0be55">00087</a>                         <a class="code" href="classbdm_1_1BMEF.html#2def512872ed8a4fc3b702371ec0be55" title="Default constructor (=empty constructor).">BMEF</a> ( <span class="keywordtype">double</span> frg0=1.0 ) :<a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a> ( ), <a class="code" href="classbdm_1_1BMEF.html#1331865e10fb1ccef65bb4c47fa3be64" title="forgetting factor">frg</a> ( frg0 ) {} 
    114114<a name="l00089"></a><a class="code" href="classbdm_1_1BMEF.html#9662379513101405e159e76717104e62">00089</a>                         <a class="code" href="classbdm_1_1BMEF.html#9662379513101405e159e76717104e62" title="Copy constructor.">BMEF</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a> &amp;B ) :<a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a> ( B ), <a class="code" href="classbdm_1_1BMEF.html#1331865e10fb1ccef65bb4c47fa3be64" title="forgetting factor">frg</a> ( B.<a class="code" href="classbdm_1_1BMEF.html#1331865e10fb1ccef65bb4c47fa3be64" title="forgetting factor">frg</a> ), <a class="code" href="classbdm_1_1BMEF.html#06e7b3ac03e10017d4288c76888e2865" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a> ( B.<a class="code" href="classbdm_1_1BMEF.html#06e7b3ac03e10017d4288c76888e2865" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a> ) {} 
    115 <a name="l00091"></a><a class="code" href="classbdm_1_1BMEF.html#d2b528b7a41ca67163152142f5404051">00091</a>                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1BMEF.html#d2b528b7a41ca67163152142f5404051" title="get statistics from another model">set_statistics</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a>* BM0 ) {<a class="code" href="group__errorhandlingfunc.html#g22d38e98332f9edff88cc501463eedce" title="Abort unconditionally.">it_error</a> ( <span class="stringliteral">"Not implemented"</span> );}; 
     115<a name="l00091"></a><a class="code" href="classbdm_1_1BMEF.html#d2b528b7a41ca67163152142f5404051">00091</a>                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1BMEF.html#d2b528b7a41ca67163152142f5404051" title="get statistics from another model">set_statistics</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a>* BM0 ) {it_error ( <span class="stringliteral">"Not implemented"</span> );}; 
    116116<a name="l00093"></a><a class="code" href="classbdm_1_1BMEF.html#bf58deb99af2a6cc674f13ff90300de6">00093</a>                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1BMEF.html#bf58deb99af2a6cc674f13ff90300de6" title="Weighted update of sufficient statistics (Bayes rule).">bayes</a> ( <span class="keyword">const</span> vec &amp;data, <span class="keyword">const</span> <span class="keywordtype">double</span> w ) {}; 
    117117<a name="l00094"></a>00094                         <span class="comment">//original Bayes</span> 
    118118<a name="l00095"></a>00095                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1BMEF.html#bf58deb99af2a6cc674f13ff90300de6" title="Weighted update of sufficient statistics (Bayes rule).">bayes</a> ( <span class="keyword">const</span> vec &amp;dt ); 
    119 <a name="l00097"></a><a class="code" href="classbdm_1_1BMEF.html#b2916a2e71a958665054473124d5e749">00097</a>                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1BMEF.html#b2916a2e71a958665054473124d5e749" title="Flatten the posterior according to the given BMEF (of the same type!).">flatten</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a> * B ) {<a class="code" href="group__errorhandlingfunc.html#g22d38e98332f9edff88cc501463eedce" title="Abort unconditionally.">it_error</a> ( <span class="stringliteral">"Not implemented"</span> );} 
     119<a name="l00097"></a><a class="code" href="classbdm_1_1BMEF.html#b2916a2e71a958665054473124d5e749">00097</a>                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1BMEF.html#b2916a2e71a958665054473124d5e749" title="Flatten the posterior according to the given BMEF (of the same type!).">flatten</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a> * B ) {it_error ( <span class="stringliteral">"Not implemented"</span> );} 
    120120<a name="l00099"></a>00099 <span class="comment">//      virtual void flatten ( double nu0 ) {it_error ( "Not implemented" );}</span> 
    121121<a name="l00100"></a>00100  
    122 <a name="l00101"></a><a class="code" href="classbdm_1_1BMEF.html#62d2e4691bed41a1efa6b9c2e35e5c67">00101</a>                         <a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a>* <a class="code" href="classbdm_1_1BMEF.html#62d2e4691bed41a1efa6b9c2e35e5c67" title="Flatten the posterior as if to keep nu0 data.">_copy_</a> ()<span class="keyword"> const </span>{<a class="code" href="group__errorhandlingfunc.html#g22d38e98332f9edff88cc501463eedce" title="Abort unconditionally.">it_error</a> ( <span class="stringliteral">"function _copy_ not implemented for this BM"</span> ); <span class="keywordflow">return</span> NULL;}; 
     122<a name="l00101"></a><a class="code" href="classbdm_1_1BMEF.html#62d2e4691bed41a1efa6b9c2e35e5c67">00101</a>                         <a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a>* <a class="code" href="classbdm_1_1BMEF.html#62d2e4691bed41a1efa6b9c2e35e5c67" title="Flatten the posterior as if to keep nu0 data.">_copy_</a> ()<span class="keyword"> const </span>{it_error ( <span class="stringliteral">"function _copy_ not implemented for this BM"</span> ); <span class="keywordflow">return</span> NULL;}; 
    123123<a name="l00102"></a>00102         }; 
    124124<a name="l00103"></a>00103  
     
    146146<a name="l00138"></a>00138                         <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1enorm.html#25785343aff102cc5df1cab08ba16d32" title="logarithm of the normalizing constant, ">lognc</a> () <span class="keyword">const</span>; 
    147147<a name="l00139"></a><a class="code" href="classbdm_1_1enorm.html#b2fa2915c35366392fe9bb022ca1a600">00139</a>                         vec <a class="code" href="classbdm_1_1enorm.html#b2fa2915c35366392fe9bb022ca1a600" title="return expected value">mean</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1enorm.html#c702a194720853570d08b65482f842c7" title="mean value">mu</a>;} 
    148 <a name="l00140"></a><a class="code" href="classbdm_1_1enorm.html#729c75ef0fa8abae03d58ad1f81e6773">00140</a>                         vec <a class="code" href="classbdm_1_1enorm.html#729c75ef0fa8abae03d58ad1f81e6773" title="return expected variance (not covariance!)">variance</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="group__diag.html#gb0938c932c1cbc19b2ce6c5ac1007553" title="Get the diagonal elements of the input matrix m.">diag</a> ( <a class="code" href="classbdm_1_1enorm.html#2d92dde696b2a7a5b10ddef5d22ba2c2" title="Covariance matrix in decomposed form.">R</a>.to_mat() );} 
     148<a name="l00140"></a><a class="code" href="classbdm_1_1enorm.html#729c75ef0fa8abae03d58ad1f81e6773">00140</a>                         vec <a class="code" href="classbdm_1_1enorm.html#729c75ef0fa8abae03d58ad1f81e6773" title="return expected variance (not covariance!)">variance</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> diag ( <a class="code" href="classbdm_1_1enorm.html#2d92dde696b2a7a5b10ddef5d22ba2c2" title="Covariance matrix in decomposed form.">R</a>.to_mat() );} 
    149149<a name="l00141"></a>00141 <span class="comment">//      mlnorm&lt;sq_T&gt;* condition ( const RV &amp;rvn ) const ; &lt;=========== fails to cmpile. Why?</span> 
    150150<a name="l00142"></a>00142                         <a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a>* <a class="code" href="classbdm_1_1enorm.html#baea4d49c657342b58297d68cda16d26" title="Return conditional density on the given RV, the remaining rvs will be in conditioning...">condition</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rvn ) <span class="keyword">const</span> ; 
     
    224224<a name="l00250"></a>00250                         } 
    225225<a name="l00252"></a>00252  
    226 <a name="l00253"></a><a class="code" href="classbdm_1_1eDirich.html#3290613d31d58daa8a45a54b003871fc">00253</a>                         vec <a class="code" href="classbdm_1_1eDirich.html#3290613d31d58daa8a45a54b003871fc" title="Returns a sample,  from density .">sample</a>()<span class="keyword"> const </span>{<a class="code" href="group__errorhandlingfunc.html#g22d38e98332f9edff88cc501463eedce" title="Abort unconditionally.">it_error</a> ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> vec_1 ( 0.0 );}; 
    227 <a name="l00254"></a><a class="code" href="classbdm_1_1eDirich.html#cb343355ec791298bb5a3404cd482fb6">00254</a>                         vec <a class="code" href="classbdm_1_1eDirich.html#cb343355ec791298bb5a3404cd482fb6" title="return expected value">mean</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1eDirich.html#f25886a49b4667af61245de81c83b5d2" title="sufficient statistics">beta</a>/<a class="code" href="group__matrix__functions.html#gfcf8f54c2f4fc257bbc3111700b08355" title="Sum of elements in the matrix m, either along columns or rows.">sum</a>(<a class="code" href="classbdm_1_1eDirich.html#f25886a49b4667af61245de81c83b5d2" title="sufficient statistics">beta</a>);}; 
    228 <a name="l00255"></a><a class="code" href="classbdm_1_1eDirich.html#43c547a2507e233706f92712d8c2aacc">00255</a>                         vec <a class="code" href="classbdm_1_1eDirich.html#43c547a2507e233706f92712d8c2aacc" title="return expected variance (not covariance!)">variance</a>()<span class="keyword"> const </span>{<span class="keywordtype">double</span> <a class="code" href="group__miscfunc.html#gf7e65712c6e83e029747b025cab6eba4" title="Deprecated gamma function for matrices. Will be changed to tgamma().">gamma</a> =<a class="code" href="group__matrix__functions.html#gfcf8f54c2f4fc257bbc3111700b08355" title="Sum of elements in the matrix m, either along columns or rows.">sum</a>(<a class="code" href="classbdm_1_1eDirich.html#f25886a49b4667af61245de81c83b5d2" title="sufficient statistics">beta</a>); <span class="keywordflow">return</span> elem_mult ( <a class="code" href="classbdm_1_1eDirich.html#f25886a49b4667af61245de81c83b5d2" title="sufficient statistics">beta</a>, ( <a class="code" href="classbdm_1_1eDirich.html#f25886a49b4667af61245de81c83b5d2" title="sufficient statistics">beta</a>+1 ) ) / ( gamma* ( gamma+1 ) );} 
     226<a name="l00253"></a><a class="code" href="classbdm_1_1eDirich.html#3290613d31d58daa8a45a54b003871fc">00253</a>                         vec <a class="code" href="classbdm_1_1eDirich.html#3290613d31d58daa8a45a54b003871fc" 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 );}; 
     227<a name="l00254"></a><a class="code" href="classbdm_1_1eDirich.html#cb343355ec791298bb5a3404cd482fb6">00254</a>                         vec <a class="code" href="classbdm_1_1eDirich.html#cb343355ec791298bb5a3404cd482fb6" title="return expected value">mean</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1eDirich.html#f25886a49b4667af61245de81c83b5d2" title="sufficient statistics">beta</a>/sum(<a class="code" href="classbdm_1_1eDirich.html#f25886a49b4667af61245de81c83b5d2" title="sufficient statistics">beta</a>);}; 
     228<a name="l00255"></a><a class="code" href="classbdm_1_1eDirich.html#43c547a2507e233706f92712d8c2aacc">00255</a>                         vec <a class="code" href="classbdm_1_1eDirich.html#43c547a2507e233706f92712d8c2aacc" title="return expected variance (not covariance!)">variance</a>()<span class="keyword"> const </span>{<span class="keywordtype">double</span> gamma =sum(<a class="code" href="classbdm_1_1eDirich.html#f25886a49b4667af61245de81c83b5d2" title="sufficient statistics">beta</a>); <span class="keywordflow">return</span> elem_mult ( <a class="code" href="classbdm_1_1eDirich.html#f25886a49b4667af61245de81c83b5d2" title="sufficient statistics">beta</a>, ( <a class="code" href="classbdm_1_1eDirich.html#f25886a49b4667af61245de81c83b5d2" title="sufficient statistics">beta</a>+1 ) ) / ( gamma* ( gamma+1 ) );} 
    229229<a name="l00257"></a><a class="code" href="classbdm_1_1eDirich.html#e09a24938e80c3d94b0ee842d1552318">00257</a>                         <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1eDirich.html#e09a24938e80c3d94b0ee842d1552318" title="In this instance, val is ...">evallog_nn</a> ( <span class="keyword">const</span> vec &amp;val )<span class="keyword"> const</span> 
    230230<a name="l00258"></a>00258 <span class="keyword">                        </span>{ 
    231 <a name="l00259"></a>00259                                 <span class="keywordtype">double</span> tmp; tmp= ( <a class="code" href="classbdm_1_1eDirich.html#f25886a49b4667af61245de81c83b5d2" title="sufficient statistics">beta</a>-1 ) *<a class="code" href="group__logexpfunc.html#g320dc9f6d27a6cfe4e149633fd1ea566" title="The natural logarithm of the elements.">log</a> ( val );               <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a> ( std::isfinite ( tmp ),<span class="stringliteral">"Infinite value"</span> ); 
     231<a name="l00259"></a>00259                                 <span class="keywordtype">double</span> tmp; tmp= ( <a class="code" href="classbdm_1_1eDirich.html#f25886a49b4667af61245de81c83b5d2" title="sufficient statistics">beta</a>-1 ) *log ( val );               it_assert_debug ( std::isfinite ( tmp ),<span class="stringliteral">"Infinite value"</span> ); 
    232232<a name="l00260"></a>00260                                 <span class="keywordflow">return</span> tmp; 
    233233<a name="l00261"></a>00261                         }; 
     
    235235<a name="l00263"></a>00263 <span class="keyword">                        </span>{ 
    236236<a name="l00264"></a>00264                                 <span class="keywordtype">double</span> tmp; 
    237 <a name="l00265"></a>00265                                 <span class="keywordtype">double</span> gam=<a class="code" href="group__matrix__functions.html#gfcf8f54c2f4fc257bbc3111700b08355" title="Sum of elements in the matrix m, either along columns or rows.">sum</a> ( <a class="code" href="classbdm_1_1eDirich.html#f25886a49b4667af61245de81c83b5d2" title="sufficient statistics">beta</a> ); 
     237<a name="l00265"></a>00265                                 <span class="keywordtype">double</span> gam=sum ( <a class="code" href="classbdm_1_1eDirich.html#f25886a49b4667af61245de81c83b5d2" title="sufficient statistics">beta</a> ); 
    238238<a name="l00266"></a>00266                                 <span class="keywordtype">double</span> lgb=0.0; 
    239239<a name="l00267"></a>00267                                 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i&lt;<a class="code" href="classbdm_1_1eDirich.html#f25886a49b4667af61245de81c83b5d2" title="sufficient statistics">beta</a>.length();i++ ) {lgb+=lgamma ( <a class="code" href="classbdm_1_1eDirich.html#f25886a49b4667af61245de81c83b5d2" title="sufficient statistics">beta</a> ( i ) );} 
    240240<a name="l00268"></a>00268                                 tmp= lgb-lgamma ( gam ); 
    241 <a name="l00269"></a>00269                                 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a> ( std::isfinite ( tmp ),<span class="stringliteral">"Infinite value"</span> ); 
     241<a name="l00269"></a>00269                                 it_assert_debug ( std::isfinite ( tmp ),<span class="stringliteral">"Infinite value"</span> ); 
    242242<a name="l00270"></a>00270                                 <span class="keywordflow">return</span> tmp; 
    243243<a name="l00271"></a>00271                         }; 
     
    284284<a name="l00320"></a>00320                                 <span class="comment">// sum(beta) should be equal to sum(B.beta)</span> 
    285285<a name="l00321"></a>00321                                 <span class="keyword">const</span> vec &amp;Eb=E-&gt;<a class="code" href="classbdm_1_1multiBM.html#044263356944c92209eecd39a5187d25" title="Pointer inside est to sufficient statistics.">beta</a>;<span class="comment">//const_cast&lt;multiBM*&gt; ( E )-&gt;_beta();</span> 
    286 <a name="l00322"></a>00322                                 <a class="code" href="classbdm_1_1multiBM.html#044263356944c92209eecd39a5187d25" title="Pointer inside est to sufficient statistics.">beta</a>*= ( <a class="code" href="group__matrix__functions.html#gfcf8f54c2f4fc257bbc3111700b08355" title="Sum of elements in the matrix m, either along columns or rows.">sum</a> ( Eb ) /<a class="code" href="group__matrix__functions.html#gfcf8f54c2f4fc257bbc3111700b08355" title="Sum of elements in the matrix m, either along columns or rows.">sum</a> ( <a class="code" href="classbdm_1_1multiBM.html#044263356944c92209eecd39a5187d25" title="Pointer inside est to sufficient statistics.">beta</a> ) ); 
     286<a name="l00322"></a>00322                                 <a class="code" href="classbdm_1_1multiBM.html#044263356944c92209eecd39a5187d25" title="Pointer inside est to sufficient statistics.">beta</a>*= ( sum ( Eb ) /sum ( <a class="code" href="classbdm_1_1multiBM.html#044263356944c92209eecd39a5187d25" title="Pointer inside est to sufficient statistics.">beta</a> ) ); 
    287287<a name="l00323"></a>00323                                 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a> ) {<a class="code" href="classbdm_1_1BMEF.html#06e7b3ac03e10017d4288c76888e2865" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a>=<a class="code" href="classbdm_1_1multiBM.html#9ecc6878abbd20eb8d8e43b6ab3f941a" title="Conjugate prior and posterior.">est</a>.<a class="code" href="classbdm_1_1eDirich.html#279a99f6266c82fe2273e83841f19eb2" title="logarithm of the normalizing constant, ">lognc</a>();} 
    288288<a name="l00324"></a>00324                         } 
     
    354354<a name="l00437"></a>00437                         { 
    355355<a name="l00438"></a>00438                                 <a class="code" href="classbdm_1_1euni.html#d3c27e331f90c754d80228108de8ed4c" title="internal">distance</a> = high0-low0; 
    356 <a name="l00439"></a>00439                                 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a> ( <a class="code" href="group__protocol.html#g27dde5be5aac902c0de838b4b872cd2f" title="ADD DOCUMENTATION HERE.">min</a> ( <a class="code" href="classbdm_1_1euni.html#d3c27e331f90c754d80228108de8ed4c" title="internal">distance</a> ) &gt;0.0,<span class="stringliteral">"bad support"</span> ); 
     356<a name="l00439"></a>00439                                 it_assert_debug ( min ( <a class="code" href="classbdm_1_1euni.html#d3c27e331f90c754d80228108de8ed4c" title="internal">distance</a> ) &gt;0.0,<span class="stringliteral">"bad support"</span> ); 
    357357<a name="l00440"></a>00440                                 <a class="code" href="classbdm_1_1euni.html#ff7ce6a2ef5ef0015bbd1398bed12f32" title="lower bound on support">low</a> = low0; 
    358358<a name="l00441"></a>00441                                 <a class="code" href="classbdm_1_1euni.html#cfad2dea4a62db6872bda8abd75f0de1" title="upper bound on support">high</a> = high0; 
    359 <a name="l00442"></a>00442                                 <a class="code" href="classbdm_1_1euni.html#31bb13e8449a8eff35246d46dae35c20" title="normalizing coefficients">nk</a> = <a class="code" href="group__matrix__functions.html#g22fdeace9f20483008cf4dc6d471cbc2" title="Product of elements in the matrix m.">prod</a> ( 1.0/<a class="code" href="classbdm_1_1euni.html#d3c27e331f90c754d80228108de8ed4c" title="internal">distance</a> ); 
    360 <a name="l00443"></a>00443                                 <a class="code" href="classbdm_1_1euni.html#3e63be48dd58659663ca60cd18700476" title="cache of log( nk )">lnk</a> = <a class="code" href="group__logexpfunc.html#g320dc9f6d27a6cfe4e149633fd1ea566" title="The natural logarithm of the elements.">log</a> ( <a class="code" href="classbdm_1_1euni.html#31bb13e8449a8eff35246d46dae35c20" title="normalizing coefficients">nk</a> ); 
     359<a name="l00442"></a>00442                                 <a class="code" href="classbdm_1_1euni.html#31bb13e8449a8eff35246d46dae35c20" title="normalizing coefficients">nk</a> = prod ( 1.0/<a class="code" href="classbdm_1_1euni.html#d3c27e331f90c754d80228108de8ed4c" title="internal">distance</a> ); 
     360<a name="l00443"></a>00443                                 <a class="code" href="classbdm_1_1euni.html#3e63be48dd58659663ca60cd18700476" title="cache of log( nk )">lnk</a> = log ( <a class="code" href="classbdm_1_1euni.html#31bb13e8449a8eff35246d46dae35c20" title="normalizing coefficients">nk</a> ); 
    361361<a name="l00444"></a>00444                                 <a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a> = <a class="code" href="classbdm_1_1euni.html#ff7ce6a2ef5ef0015bbd1398bed12f32" title="lower bound on support">low</a>.length(); 
    362362<a name="l00445"></a>00445                         } 
     
    368368<a name="l00452"></a>00452                                 vec smp ( <a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a> ); 
    369369<a name="l00453"></a>00453 <span class="preprocessor">#pragma omp critical</span> 
    370 <a name="l00454"></a>00454 <span class="preprocessor"></span>                                UniRNG.<a class="code" href="classitpp_1_1Uniform__RNG.html#3059402ccc1a0af044b9bd217a32f5c7" title="Get a Uniformly distributed [0,1) vector.">sample_vector</a> ( <a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a> ,smp ); 
     370<a name="l00454"></a>00454 <span class="preprocessor"></span>                                UniRNG.sample_vector ( <a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a> ,smp ); 
    371371<a name="l00455"></a>00455                                 <span class="keywordflow">return</span> <a class="code" href="classbdm_1_1euni.html#ff7ce6a2ef5ef0015bbd1398bed12f32" title="lower bound on support">low</a>+elem_mult ( <a class="code" href="classbdm_1_1euni.html#d3c27e331f90c754d80228108de8ed4c" title="internal">distance</a>,smp ); 
    372372<a name="l00456"></a>00456                         } 
    373373<a name="l00458"></a><a class="code" href="classbdm_1_1euni.html#46caa8c13aba2e6228f964208918b226">00458</a>                         vec <a class="code" href="classbdm_1_1euni.html#46caa8c13aba2e6228f964208918b226" title="set values of low and high ">mean</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> ( <a class="code" href="classbdm_1_1euni.html#cfad2dea4a62db6872bda8abd75f0de1" title="upper bound on support">high</a>-<a class="code" href="classbdm_1_1euni.html#ff7ce6a2ef5ef0015bbd1398bed12f32" title="lower bound on support">low</a> ) /2.0;} 
    374 <a name="l00459"></a><a class="code" href="classbdm_1_1euni.html#951f932155111f6053c980f672b4c22c">00459</a>                         vec <a class="code" href="classbdm_1_1euni.html#951f932155111f6053c980f672b4c22c" title="return expected variance (not covariance!)">variance</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> ( <a class="code" href="group__logexpfunc.html#g40f48a75172e7f8bc8e58ed54262a04d" title="Calculates x to the power of y (x^y).">pow</a> ( <a class="code" href="classbdm_1_1euni.html#cfad2dea4a62db6872bda8abd75f0de1" title="upper bound on support">high</a>,2 ) +<a class="code" href="group__logexpfunc.html#g40f48a75172e7f8bc8e58ed54262a04d" title="Calculates x to the power of y (x^y).">pow</a> ( <a class="code" href="classbdm_1_1euni.html#ff7ce6a2ef5ef0015bbd1398bed12f32" title="lower bound on support">low</a>,2 ) +elem_mult ( <a class="code" href="classbdm_1_1euni.html#cfad2dea4a62db6872bda8abd75f0de1" title="upper bound on support">high</a>,<a class="code" href="classbdm_1_1euni.html#ff7ce6a2ef5ef0015bbd1398bed12f32" title="lower bound on support">low</a> ) ) /3.0;} 
     374<a name="l00459"></a><a class="code" href="classbdm_1_1euni.html#951f932155111f6053c980f672b4c22c">00459</a>                         vec <a class="code" href="classbdm_1_1euni.html#951f932155111f6053c980f672b4c22c" title="return expected variance (not covariance!)">variance</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> ( pow ( <a class="code" href="classbdm_1_1euni.html#cfad2dea4a62db6872bda8abd75f0de1" title="upper bound on support">high</a>,2 ) +pow ( <a class="code" href="classbdm_1_1euni.html#ff7ce6a2ef5ef0015bbd1398bed12f32" title="lower bound on support">low</a>,2 ) +elem_mult ( <a class="code" href="classbdm_1_1euni.html#cfad2dea4a62db6872bda8abd75f0de1" title="upper bound on support">high</a>,<a class="code" href="classbdm_1_1euni.html#ff7ce6a2ef5ef0015bbd1398bed12f32" title="lower bound on support">low</a> ) ) /3.0;} 
    375375<a name="l00460"></a>00460         }; 
    376376<a name="l00461"></a>00461  
     
    410410<a name="l00511"></a>00511                 <span class="keyword">public</span>: 
    411411<a name="l00513"></a><a class="code" href="classbdm_1_1mgnorm.html#1b014915d74470d3efab74e07cacb97d">00513</a>                         <a class="code" href="classbdm_1_1mgnorm.html#1b014915d74470d3efab74e07cacb97d" title="default constructor">mgnorm</a>() :mu ( <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>._mu() ) {<a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>=&amp;<a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>;} 
    412 <a name="l00515"></a><a class="code" href="classbdm_1_1mgnorm.html#578e02458e2a0d17f3864826b6ebd564">00515</a>                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1mgnorm.html#578e02458e2a0d17f3864826b6ebd564" title="set mean function">set_parameters</a> ( <a class="code" href="classbdm_1_1fnc.html" title="Class representing function  of variable  represented by rv.">fnc</a>* g0, <span class="keyword">const</span> sq_T &amp;R0 ) {g=g0; <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.set_parameters ( <a class="code" href="group__specmat.html#g10723ecada06221cbe64fe2736a59de1" title="A Double (rows,cols)-matrix of zeros.">zeros</a> ( g-&gt;<a class="code" href="classbdm_1_1fnc.html#083832294da9d1e40804158b979c4341" title="access function">dimension</a>() ), R0 );} 
     412<a name="l00515"></a><a class="code" href="classbdm_1_1mgnorm.html#578e02458e2a0d17f3864826b6ebd564">00515</a>                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1mgnorm.html#578e02458e2a0d17f3864826b6ebd564" title="set mean function">set_parameters</a> ( <a class="code" href="classbdm_1_1fnc.html" title="Class representing function  of variable  represented by rv.">fnc</a>* g0, <span class="keyword">const</span> sq_T &amp;R0 ) {g=g0; <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.set_parameters ( zeros ( g-&gt;<a class="code" href="classbdm_1_1fnc.html#083832294da9d1e40804158b979c4341" title="access function">dimension</a>() ), R0 );} 
    413413<a name="l00516"></a><a class="code" href="classbdm_1_1mgnorm.html#b31d63472cf6a1030cd8dbd8094c1f6d">00516</a>                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1mgnorm.html#b31d63472cf6a1030cd8dbd8094c1f6d" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( <span class="keyword">const</span> vec &amp;cond ) {mu=g-&gt;<a class="code" href="classbdm_1_1fnc.html#6277b11d7fffc7ef8a2fa3e84ae5bad4" title="function evaluates numerical value of  at  cond ">eval</a> ( cond );}; 
    414414<a name="l00517"></a>00517         }; 
     
    425425<a name="l00535"></a>00535                         <span class="keywordtype">void</span> set_parameters ( <span class="keyword">const</span> mat &amp;A0, <span class="keyword">const</span> vec &amp;mu0, <span class="keyword">const</span> <a class="code" href="classldmat.html" title="Matrix stored in LD form, (commonly known as UD).">ldmat</a> &amp;R0, <span class="keyword">const</span> <a class="code" href="classldmat.html" title="Matrix stored in LD form, (commonly known as UD).">ldmat</a>&amp; Lambda0 ) 
    426426<a name="l00536"></a>00536                         { 
    427 <a name="l00537"></a>00537                                 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a> ( A0.rows() ==mu0.length(),<span class="stringliteral">""</span> ); 
    428 <a name="l00538"></a>00538                                 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a> ( R0.<a class="code" href="group__math.html#g96dfb21865db4f5bd36fa70f9b0b1163" title="access function">rows</a>() ==A0.rows(),<span class="stringliteral">""</span> ); 
     427<a name="l00537"></a>00537                                 it_assert_debug ( A0.rows() ==mu0.length(),<span class="stringliteral">""</span> ); 
     428<a name="l00538"></a>00538                                 it_assert_debug ( R0.<a class="code" href="group__math.html#g96dfb21865db4f5bd36fa70f9b0b1163" title="access function">rows</a>() ==A0.rows(),<span class="stringliteral">""</span> ); 
    429429<a name="l00539"></a>00539  
    430430<a name="l00540"></a>00540                                 <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.set_parameters ( mu0,Lambda ); <span class="comment">//</span> 
     
    480480<a name="l00621"></a>00621                         { 
    481481<a name="l00622"></a>00622                                 <a class="code" href="classbdm_1_1migamma.html#dc56bc9da542e0103ec16b9be8e5e38c" title="Constant .">k</a>=k0; 
    482 <a name="l00623"></a>00623                                 <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.set_parameters ( ( 1.0/ ( <a class="code" href="classbdm_1_1migamma.html#dc56bc9da542e0103ec16b9be8e5e38c" title="Constant .">k</a>*<a class="code" href="classbdm_1_1migamma.html#dc56bc9da542e0103ec16b9be8e5e38c" title="Constant .">k</a> ) +2.0 ) *<a class="code" href="group__specmat.html#gdc0f3edbf58bced9e82d8b260d395cac" title="A float (rows,cols)-matrix of ones.">ones</a> ( len ) <span class="comment">/*alpha*/</span>, <a class="code" href="group__specmat.html#gdc0f3edbf58bced9e82d8b260d395cac" title="A float (rows,cols)-matrix of ones.">ones</a> ( len ) <span class="comment">/*beta*/</span> ); 
     482<a name="l00623"></a>00623                                 <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.set_parameters ( ( 1.0/ ( <a class="code" href="classbdm_1_1migamma.html#dc56bc9da542e0103ec16b9be8e5e38c" title="Constant .">k</a>*<a class="code" href="classbdm_1_1migamma.html#dc56bc9da542e0103ec16b9be8e5e38c" title="Constant .">k</a> ) +2.0 ) *ones ( len ) <span class="comment">/*alpha*/</span>, ones ( len ) <span class="comment">/*beta*/</span> ); 
    483483<a name="l00624"></a>00624                                 <a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6" title="dimension of the condition">dimc</a> = dimension(); 
    484484<a name="l00625"></a>00625                         }; 
     
    499499<a name="l00655"></a>00655                         { 
    500500<a name="l00656"></a>00656                                 <a class="code" href="classbdm_1_1mgamma__fix.html#1bfd30e90db9dc1fbda4a9fbb0b716b2" title="Set value of k.">mgamma::set_parameters</a> ( k0, ref0 ); 
    501 <a name="l00657"></a>00657                                 <a class="code" href="classbdm_1_1mgamma__fix.html#018c6f901a04e419455308a07eb3b0b2" title="reference vector">refl</a>=<a class="code" href="group__logexpfunc.html#g40f48a75172e7f8bc8e58ed54262a04d" title="Calculates x to the power of y (x^y).">pow</a> ( ref0,1.0-l0 );<a class="code" href="classbdm_1_1mgamma__fix.html#1eb701506aabb2e6af007e487212d6fa" title="parameter l">l</a>=l0; 
     501<a name="l00657"></a>00657                                 <a class="code" href="classbdm_1_1mgamma__fix.html#018c6f901a04e419455308a07eb3b0b2" title="reference vector">refl</a>=pow ( ref0,1.0-l0 );<a class="code" href="classbdm_1_1mgamma__fix.html#1eb701506aabb2e6af007e487212d6fa" title="parameter l">l</a>=l0; 
    502502<a name="l00658"></a>00658                                 <a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6" title="dimension of the condition">dimc</a>=dimension(); 
    503503<a name="l00659"></a>00659                         }; 
    504504<a name="l00660"></a>00660  
    505 <a name="l00661"></a><a class="code" href="classbdm_1_1mgamma__fix.html#1d539591deb7a38bb3403c2b396c8ff7">00661</a>                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1mgamma__fix.html#1d539591deb7a38bb3403c2b396c8ff7" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( <span class="keyword">const</span> vec &amp;val ) {vec <a class="code" href="group__statistics.html#gc370b4cfdc6baa037b7442ae6e2c4b5c" title="The mean value.">mean</a>=elem_mult ( <a class="code" href="classbdm_1_1mgamma__fix.html#018c6f901a04e419455308a07eb3b0b2" title="reference vector">refl</a>,<a class="code" href="group__logexpfunc.html#g40f48a75172e7f8bc8e58ed54262a04d" title="Calculates x to the power of y (x^y).">pow</a> ( val,<a class="code" href="classbdm_1_1mgamma__fix.html#1eb701506aabb2e6af007e487212d6fa" title="parameter l">l</a> ) ); <a class="code" href="classbdm_1_1mgamma.html#3d95f4dde9214ff6dba265e18af60312" title="cache of epdf.beta">_beta</a>=<a class="code" href="classbdm_1_1mgamma.html#b20cf88cca1fe9b0b8f2a412608bfd09" title="Constant .">k</a>/mean;}; 
     505<a name="l00661"></a><a class="code" href="classbdm_1_1mgamma__fix.html#1d539591deb7a38bb3403c2b396c8ff7">00661</a>                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1mgamma__fix.html#1d539591deb7a38bb3403c2b396c8ff7" 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="classbdm_1_1mgamma__fix.html#018c6f901a04e419455308a07eb3b0b2" title="reference vector">refl</a>,pow ( val,<a class="code" href="classbdm_1_1mgamma__fix.html#1eb701506aabb2e6af007e487212d6fa" title="parameter l">l</a> ) ); <a class="code" href="classbdm_1_1mgamma.html#3d95f4dde9214ff6dba265e18af60312" title="cache of epdf.beta">_beta</a>=<a class="code" href="classbdm_1_1mgamma.html#b20cf88cca1fe9b0b8f2a412608bfd09" title="Constant .">k</a>/mean;}; 
    506506<a name="l00662"></a>00662         }; 
    507507<a name="l00663"></a>00663  
     
    517517<a name="l00689"></a>00689                         { 
    518518<a name="l00690"></a>00690                                 <a class="code" href="classbdm_1_1migamma__ref.html#b0b4eb278ef5d0831ec4954ba7bd2800" title="Set value of k.">migamma::set_parameters</a> ( ref0.length(), k0 ); 
    519 <a name="l00691"></a>00691                                 <a class="code" href="classbdm_1_1migamma__ref.html#3692dc67caf4367e15564d37f45476f6" title="reference vector">refl</a>=<a class="code" href="group__logexpfunc.html#g40f48a75172e7f8bc8e58ed54262a04d" title="Calculates x to the power of y (x^y).">pow</a> ( ref0,1.0-l0 ); 
     519<a name="l00691"></a>00691                                 <a class="code" href="classbdm_1_1migamma__ref.html#3692dc67caf4367e15564d37f45476f6" title="reference vector">refl</a>=pow ( ref0,1.0-l0 ); 
    520520<a name="l00692"></a>00692                                 <a class="code" href="classbdm_1_1migamma__ref.html#cdc1345ba8375fbdb18a69322d2f841d" title="parameter l">l</a>=l0; 
    521521<a name="l00693"></a>00693                                 <a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6" title="dimension of the condition">dimc</a> = dimension(); 
     
    524524<a name="l00696"></a><a class="code" href="classbdm_1_1migamma__ref.html#ae86b2e4ff963d62e05d4e130514634a">00696</a>                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1migamma__ref.html#ae86b2e4ff963d62e05d4e130514634a" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( <span class="keyword">const</span> vec &amp;val ) 
    525525<a name="l00697"></a>00697                         { 
    526 <a name="l00698"></a>00698                                 vec <a class="code" href="group__statistics.html#gc370b4cfdc6baa037b7442ae6e2c4b5c" title="The mean value.">mean</a>=elem_mult ( <a class="code" href="classbdm_1_1migamma__ref.html#3692dc67caf4367e15564d37f45476f6" title="reference vector">refl</a>,<a class="code" href="group__logexpfunc.html#g40f48a75172e7f8bc8e58ed54262a04d" title="Calculates x to the power of y (x^y).">pow</a> ( val,<a class="code" href="classbdm_1_1migamma__ref.html#cdc1345ba8375fbdb18a69322d2f841d" title="parameter l">l</a> ) ); 
     526<a name="l00698"></a>00698                                 vec mean=elem_mult ( <a class="code" href="classbdm_1_1migamma__ref.html#3692dc67caf4367e15564d37f45476f6" title="reference vector">refl</a>,pow ( val,<a class="code" href="classbdm_1_1migamma__ref.html#cdc1345ba8375fbdb18a69322d2f841d" title="parameter l">l</a> ) ); 
    527527<a name="l00699"></a>00699                                 <a class="code" href="classbdm_1_1migamma__ref.html#ae86b2e4ff963d62e05d4e130514634a" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">migamma::condition</a> ( mean ); 
    528528<a name="l00700"></a>00700                         }; 
     
    532532<a name="l00713"></a>00713         { 
    533533<a name="l00714"></a>00714                 <span class="keyword">public</span>: 
    534 <a name="l00715"></a><a class="code" href="classbdm_1_1elognorm.html#8b948e2bce1253765a2542199913aaba">00715</a>                         vec <a class="code" href="classbdm_1_1elognorm.html#8b948e2bce1253765a2542199913aaba" title="Returns a sample,  from density .">sample</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="group__logexpfunc.html#g7a3da29d4e6a8c814237453086793335" title="Exp of the elements of a complex matrix m.">exp</a> ( <a class="code" href="classbdm_1_1enorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm&lt;ldmat&gt;::sample</a>() );}; 
    535 <a name="l00716"></a><a class="code" href="classbdm_1_1elognorm.html#adb41e4f4d6600dec6f8c1dbc5ed9eea">00716</a>                         vec <a class="code" href="classbdm_1_1elognorm.html#adb41e4f4d6600dec6f8c1dbc5ed9eea" title="return expected value">mean</a>()<span class="keyword"> const </span>{vec var=<a class="code" href="classbdm_1_1enorm.html#729c75ef0fa8abae03d58ad1f81e6773" title="return expected variance (not covariance!)">enorm&lt;ldmat&gt;::variance</a>();<span class="keywordflow">return</span> <a class="code" href="group__logexpfunc.html#g7a3da29d4e6a8c814237453086793335" title="Exp of the elements of a complex matrix m.">exp</a> ( <a class="code" href="classbdm_1_1enorm.html#c702a194720853570d08b65482f842c7" title="mean value">mu</a> - 0.5*var );}; 
     534<a name="l00715"></a><a class="code" href="classbdm_1_1elognorm.html#8b948e2bce1253765a2542199913aaba">00715</a>                         vec <a class="code" href="classbdm_1_1elognorm.html#8b948e2bce1253765a2542199913aaba" title="Returns a sample,  from density .">sample</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> exp ( <a class="code" href="classbdm_1_1enorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm&lt;ldmat&gt;::sample</a>() );}; 
     535<a name="l00716"></a><a class="code" href="classbdm_1_1elognorm.html#adb41e4f4d6600dec6f8c1dbc5ed9eea">00716</a>                         vec <a class="code" href="classbdm_1_1elognorm.html#adb41e4f4d6600dec6f8c1dbc5ed9eea" title="return expected value">mean</a>()<span class="keyword"> const </span>{vec var=<a class="code" href="classbdm_1_1enorm.html#729c75ef0fa8abae03d58ad1f81e6773" title="return expected variance (not covariance!)">enorm&lt;ldmat&gt;::variance</a>();<span class="keywordflow">return</span> exp ( <a class="code" href="classbdm_1_1enorm.html#c702a194720853570d08b65482f842c7" title="mean value">mu</a> - 0.5*var );}; 
    536536<a name="l00717"></a>00717  
    537537<a name="l00718"></a>00718         }; 
     
    545545<a name="l00739"></a>00739                 <span class="keyword">public</span>: 
    546546<a name="l00741"></a><a class="code" href="classbdm_1_1mlognorm.html#a5d6eb2688d02e0348b96c4fbd7bde41">00741</a>                         <a class="code" href="classbdm_1_1mlognorm.html#a5d6eb2688d02e0348b96c4fbd7bde41" title="Constructor.">mlognorm</a> ( ) : eno (), <a class="code" href="classbdm_1_1mlognorm.html#7d0063f77d899ef22e8c5edd642176d2" title="access">mu</a> ( eno._mu() ) {<a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>=&amp;eno;}; 
    547 <a name="l00743"></a><a class="code" href="classbdm_1_1mlognorm.html#604cab0e8a76f9041dc3c606043bb39f">00743</a>                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1mlognorm.html#604cab0e8a76f9041dc3c606043bb39f" title="Set value of k.">set_parameters</a> ( <span class="keywordtype">int</span> <a class="code" href="group__matrix__functions.html#g3c1a2b0972c6a8e1215eb3f76d7c7512" title="Length of vector.">size</a>, <span class="keywordtype">double</span> k ) 
     547<a name="l00743"></a><a class="code" href="classbdm_1_1mlognorm.html#604cab0e8a76f9041dc3c606043bb39f">00743</a>                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1mlognorm.html#604cab0e8a76f9041dc3c606043bb39f" title="Set value of k.">set_parameters</a> ( <span class="keywordtype">int</span> size, <span class="keywordtype">double</span> k ) 
    548548<a name="l00744"></a>00744                         { 
    549 <a name="l00745"></a>00745                                 <a class="code" href="classbdm_1_1mlognorm.html#a51128a2e503b8b2ce698244b9e0db1a" title="parameter 1/2*sigma^2">sig2</a> = 0.5*<a class="code" href="group__logexpfunc.html#g320dc9f6d27a6cfe4e149633fd1ea566" title="The natural logarithm of the elements.">log</a> ( k*k+1 ); 
    550 <a name="l00746"></a>00746                                 eno.<a class="code" href="classbdm_1_1enorm.html#b8322f2c11560871dd922c660f4771bb">set_parameters</a> ( <a class="code" href="group__specmat.html#g10723ecada06221cbe64fe2736a59de1" title="A Double (rows,cols)-matrix of zeros.">zeros</a> ( size ),2*<a class="code" href="classbdm_1_1mlognorm.html#a51128a2e503b8b2ce698244b9e0db1a" title="parameter 1/2*sigma^2">sig2</a>*<a class="code" href="group__specmat.html#gbfc73e72a56769280cd9fda812367196" title="A non-copying version of the eye function.">eye</a> ( size ) ); 
     549<a name="l00745"></a>00745                                 <a class="code" href="classbdm_1_1mlognorm.html#a51128a2e503b8b2ce698244b9e0db1a" title="parameter 1/2*sigma^2">sig2</a> = 0.5*log ( k*k+1 ); 
     550<a name="l00746"></a>00746                                 eno.<a class="code" href="classbdm_1_1enorm.html#b8322f2c11560871dd922c660f4771bb">set_parameters</a> ( zeros ( size ),2*<a class="code" href="classbdm_1_1mlognorm.html#a51128a2e503b8b2ce698244b9e0db1a" title="parameter 1/2*sigma^2">sig2</a>*eye ( size ) ); 
    551551<a name="l00747"></a>00747  
    552552<a name="l00748"></a>00748                                 <a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6" title="dimension of the condition">dimc</a> = size; 
     
    555555<a name="l00751"></a><a class="code" href="classbdm_1_1mlognorm.html#9106d8fd8bdf2b6be675ffd8f3ca584e">00751</a>                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1mlognorm.html#9106d8fd8bdf2b6be675ffd8f3ca584e" title="Update ep so that it represents this mpdf conditioned on rvc = cond.">condition</a> ( <span class="keyword">const</span> vec &amp;val ) 
    556556<a name="l00752"></a>00752                         { 
    557 <a name="l00753"></a>00753                                 <a class="code" href="classbdm_1_1mlognorm.html#7d0063f77d899ef22e8c5edd642176d2" title="access">mu</a>=<a class="code" href="group__logexpfunc.html#g320dc9f6d27a6cfe4e149633fd1ea566" title="The natural logarithm of the elements.">log</a> ( val )-<a class="code" href="classbdm_1_1mlognorm.html#a51128a2e503b8b2ce698244b9e0db1a" title="parameter 1/2*sigma^2">sig2</a>;<span class="comment">//elem_mult ( refl,pow ( val,l ) );</span> 
     557<a name="l00753"></a>00753                                 <a class="code" href="classbdm_1_1mlognorm.html#7d0063f77d899ef22e8c5edd642176d2" title="access">mu</a>=log ( val )-<a class="code" href="classbdm_1_1mlognorm.html#a51128a2e503b8b2ce698244b9e0db1a" title="parameter 1/2*sigma^2">sig2</a>;<span class="comment">//elem_mult ( refl,pow ( val,l ) );</span> 
    558558<a name="l00754"></a>00754                         }; 
    559559<a name="l00755"></a>00755         }; 
     
    569569<a name="l00771"></a>00771                         mat sample_mat()<span class="keyword"> const</span> 
    570570<a name="l00772"></a>00772 <span class="keyword">                        </span>{ 
    571 <a name="l00773"></a>00773                                 mat X=<a class="code" href="group__specmat.html#g10723ecada06221cbe64fe2736a59de1" title="A Double (rows,cols)-matrix of zeros.">zeros</a> ( <a class="code" href="classbdm_1_1eWishartCh.html#b745c73faef785009484180582050a1f" title="dimension of matrix ">p</a>,<a class="code" href="classbdm_1_1eWishartCh.html#b745c73faef785009484180582050a1f" title="dimension of matrix ">p</a> ); 
     571<a name="l00773"></a>00773                                 mat X=zeros ( <a class="code" href="classbdm_1_1eWishartCh.html#b745c73faef785009484180582050a1f" title="dimension of matrix ">p</a>,<a class="code" href="classbdm_1_1eWishartCh.html#b745c73faef785009484180582050a1f" title="dimension of matrix ">p</a> ); 
    572572<a name="l00774"></a>00774  
    573573<a name="l00775"></a>00775                                 <span class="comment">//sample diagonal</span> 
    574574<a name="l00776"></a>00776                                 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i&lt;<a class="code" href="classbdm_1_1eWishartCh.html#b745c73faef785009484180582050a1f" title="dimension of matrix ">p</a>;i++ ) 
    575575<a name="l00777"></a>00777                                 { 
    576 <a name="l00778"></a>00778                                         GamRNG.<a class="code" href="classitpp_1_1Gamma__RNG.html#cced56e9bb421619b7ff32fbf794d501" title="Set alpha and beta.">setup</a> ( 0.5* ( <a class="code" href="classbdm_1_1eWishartCh.html#1879a14d7d2bb05062523b189baa11c3" title="degrees of freedom ">delta</a>-i ) , 0.5 ); <span class="comment">// no +1 !! index if from 0</span> 
     576<a name="l00778"></a>00778                                         GamRNG.<a class="code" href="classitpp_1_1Gamma__RNG.html#dfaae19411e39aa87e1f72e409b6babe" title="Set lambda.">setup</a> ( 0.5* ( <a class="code" href="classbdm_1_1eWishartCh.html#1879a14d7d2bb05062523b189baa11c3" title="degrees of freedom ">delta</a>-i ) , 0.5 ); <span class="comment">// no +1 !! index if from 0</span> 
    577577<a name="l00779"></a>00779 <span class="preprocessor">#pragma omp critical</span> 
    578 <a name="l00780"></a>00780 <span class="preprocessor"></span>                                        X ( i,i ) =<a class="code" href="group__miscfunc.html#g20af7c97287e8275db8c2b0f650310ac" title="Square root of the elements.">sqrt</a> ( GamRNG() ); 
     578<a name="l00780"></a>00780 <span class="preprocessor"></span>                                        X ( i,i ) =sqrt ( GamRNG() ); 
    579579<a name="l00781"></a>00781                                 } 
    580580<a name="l00782"></a>00782                                 <span class="comment">//do the rest</span> 
     
    584584<a name="l00786"></a>00786                                         { 
    585585<a name="l00787"></a>00787 <span class="preprocessor">#pragma omp critical</span> 
    586 <a name="l00788"></a>00788 <span class="preprocessor"></span>                                                X ( i,j ) =NorRNG.<a class="code" href="classitpp_1_1Normal__RNG.html#10bf6949c45e781a36e967d9c8448614" title="Get a Normal distributed (0,1) sample.">sample</a>(); 
     586<a name="l00788"></a>00788 <span class="preprocessor"></span>                                                X ( i,j ) =NorRNG.sample(); 
    587587<a name="l00789"></a>00789                                         } 
    588588<a name="l00790"></a>00790                                 } 
     
    607607<a name="l00812"></a>00812                         <span class="keywordtype">void</span> set_parameters ( <span class="keyword">const</span> mat &amp;Y0, <span class="keyword">const</span> <span class="keywordtype">double</span> delta0) { 
    608608<a name="l00813"></a>00813                                 delta = delta0; 
    609 <a name="l00814"></a>00814                                 W.set_parameters ( <a class="code" href="group__inverse.html#g125b083397cc9450b8a67a485b545bc8" title="Inverse of real square matrix.Calculate the inverse of the real matrix .">inv</a> ( Y0 ),delta0 );  
     609<a name="l00814"></a>00814                                 W.set_parameters ( inv ( Y0 ),delta0 );  
    610610<a name="l00815"></a>00815                                 dim = W.dimension(); p=Y0.rows(); 
    611611<a name="l00816"></a>00816                         } 
    612 <a name="l00817"></a>00817                         vec sample()<span class="keyword"> const </span>{mat iCh; iCh=<a class="code" href="group__inverse.html#g125b083397cc9450b8a67a485b545bc8" title="Inverse of real square matrix.Calculate the inverse of the real matrix .">inv</a> ( W.sample_mat() ); <span class="keywordflow">return</span> vec ( iCh._data(),<a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a> );} 
     612<a name="l00817"></a>00817                         vec sample()<span class="keyword"> const </span>{mat iCh; iCh=inv ( W.sample_mat() ); <span class="keywordflow">return</span> vec ( iCh._data(),<a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a> );} 
    613613<a name="l00818"></a>00818                         <span class="keywordtype">void</span> _setY ( <span class="keyword">const</span> vec &amp;y0 ) 
    614614<a name="l00819"></a>00819                         { 
     
    617617<a name="l00822"></a>00822                                 copy_vector ( dim, y0._data(), Ch._data() ); 
    618618<a name="l00823"></a>00823                                  
    619 <a name="l00824"></a>00824                                 iCh=<a class="code" href="group__inverse.html#g125b083397cc9450b8a67a485b545bc8" title="Inverse of real square matrix.Calculate the inverse of the real matrix .">inv</a> ( Ch ); 
     619<a name="l00824"></a>00824                                 iCh=inv ( Ch ); 
    620620<a name="l00825"></a>00825                                 W.setY ( iCh ); 
    621621<a name="l00826"></a>00826                         } 
     
    630630<a name="l00835"></a>00835                                 mat M=Y.<a class="code" href="classchmat.html#045addd685f8d978efda232d7dcb070e" title="Conversion to full matrix.">to_mat</a>()*iX.to_mat(); 
    631631<a name="l00836"></a>00836                                  
    632 <a name="l00837"></a>00837                                 <span class="keywordtype">double</span> log1 = 0.5*p*(2*Y.<a class="code" href="classchmat.html#b504ca818203b13e667cb3c503980382" title="Logarithm of a determinant.">logdet</a>())-0.5*(delta+p+1)*(2*X.logdet())-0.5*<a class="code" href="group__diag.html#gd10b393e16f1a426b6daed5b9b78c3fb" title="The trace of the matrix m, i.e. the sum of the diagonal elements.">trace</a>(M);  
     632<a name="l00837"></a>00837                                 <span class="keywordtype">double</span> log1 = 0.5*p*(2*Y.<a class="code" href="classchmat.html#b504ca818203b13e667cb3c503980382" title="Logarithm of a determinant.">logdet</a>())-0.5*(delta+p+1)*(2*X.logdet())-0.5*trace(M);  
    633633<a name="l00838"></a>00838                                 <span class="comment">//Fixme! Multivariate gamma omitted!! it is ok for sampling, but not otherwise!!</span> 
    634634<a name="l00839"></a>00839                                  
     
    659659<a name="l00865"></a>00865                                 p=p0; 
    660660<a name="l00866"></a>00866                                 <span class="keywordtype">double</span> delta = 2/(k*k)+p+3; 
    661 <a name="l00867"></a>00867                                 sqd=<a class="code" href="group__miscfunc.html#g20af7c97287e8275db8c2b0f650310ac" title="Square root of the elements.">sqrt</a> ( delta-p-1 ); 
     661<a name="l00867"></a>00867                                 sqd=sqrt ( delta-p-1 ); 
    662662<a name="l00868"></a>00868                                 l=l0; 
    663 <a name="l00869"></a>00869                                 refl=<a class="code" href="group__logexpfunc.html#g40f48a75172e7f8bc8e58ed54262a04d" title="Calculates x to the power of y (x^y).">pow</a>(ref0,1-l); 
     663<a name="l00869"></a>00869                                 refl=pow(ref0,1-l); 
    664664<a name="l00870"></a>00870                                  
    665 <a name="l00871"></a>00871                                 eiW.set_parameters ( <a class="code" href="group__specmat.html#gbfc73e72a56769280cd9fda812367196" title="A non-copying version of the eye function.">eye</a> ( p ),delta ); 
     665<a name="l00871"></a>00871                                 eiW.set_parameters ( eye ( p ),delta ); 
    666666<a name="l00872"></a>00872                                 <a class="code" href="classbdm_1_1mpdf.html#5eea43c56d38e4441bfb30270db949c0" title="pointer to internal epdf">ep</a>=&amp;eiW; 
    667667<a name="l00873"></a>00873                                 <a class="code" href="classbdm_1_1mpdf.html#7c1900976ff13dbc09c9729b3bbff9e6" title="dimension of the condition">dimc</a>=eiW.dimension(); 
     
    671671<a name="l00877"></a>00877                                 <span class="keywordtype">int</span> ri=0; 
    672672<a name="l00878"></a>00878                                 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0;i&lt;p*p;i+=(p+1)){<span class="comment">//trace diagonal element</span> 
    673 <a name="l00879"></a>00879                                         z(i) = <a class="code" href="group__logexpfunc.html#g40f48a75172e7f8bc8e58ed54262a04d" title="Calculates x to the power of y (x^y).">pow</a>(z(i),l)*refl(ri); 
     673<a name="l00879"></a>00879                                         z(i) = pow(z(i),l)*refl(ri); 
    674674<a name="l00880"></a>00880                                         ri++; 
    675675<a name="l00881"></a>00881                                 } 
     
    685685<a name="l00898"></a><a class="code" href="classbdm_1_1eEmp.html#9798006271ca77629855113f1283a031">00898</a>                         <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1eEmp.html#9798006271ca77629855113f1283a031" title="Number of particles.">n</a>; 
    686686<a name="l00900"></a><a class="code" href="classbdm_1_1eEmp.html#9d39241aab7c4bbeb07c6d516421c67d">00900</a>                         vec <a class="code" href="classbdm_1_1eEmp.html#9d39241aab7c4bbeb07c6d516421c67d" title="Sample weights .">w</a>; 
    687 <a name="l00902"></a><a class="code" href="classbdm_1_1eEmp.html#73d819553a0f268b055a087d2d4486f3">00902</a>                         <a class="code" href="classitpp_1_1Array.html">Array&lt;vec&gt;</a> <a class="code" href="classbdm_1_1eEmp.html#73d819553a0f268b055a087d2d4486f3" title="Samples .">samples</a>; 
     687<a name="l00902"></a><a class="code" href="classbdm_1_1eEmp.html#73d819553a0f268b055a087d2d4486f3">00902</a>                         Array&lt;vec&gt; <a class="code" href="classbdm_1_1eEmp.html#73d819553a0f268b055a087d2d4486f3" title="Samples .">samples</a>; 
    688688<a name="l00903"></a>00903                 <span class="keyword">public</span>: 
    689689<a name="l00906"></a>00906                         <a class="code" href="classbdm_1_1eEmp.html" title="Weighted empirical density.">eEmp</a> ( ) :<a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> ( ),<a class="code" href="classbdm_1_1eEmp.html#9d39241aab7c4bbeb07c6d516421c67d" title="Sample weights .">w</a> ( ),<a class="code" href="classbdm_1_1eEmp.html#73d819553a0f268b055a087d2d4486f3" title="Samples .">samples</a> ( ) {}; 
     
    691691<a name="l00909"></a>00909  
    692692<a name="l00911"></a>00911                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1eEmp.html#7cfd383180b486fe4526bdf0179350c0" title="Set samples and weights.">set_statistics</a> ( <span class="keyword">const</span> vec &amp;w0, <span class="keyword">const</span> epdf* pdf0 ); 
    693 <a name="l00913"></a><a class="code" href="classbdm_1_1eEmp.html#cef74aa5f87d10d440b9b1e8bc78c1e7">00913</a>                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1eEmp.html#cef74aa5f87d10d440b9b1e8bc78c1e7" title="Set samples and weights.">set_statistics</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* pdf0 , <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1eEmp.html#9798006271ca77629855113f1283a031" title="Number of particles.">n</a> ) {<a class="code" href="classbdm_1_1eEmp.html#cef74aa5f87d10d440b9b1e8bc78c1e7" title="Set samples and weights.">set_statistics</a> ( <a class="code" href="group__specmat.html#gdc0f3edbf58bced9e82d8b260d395cac" title="A float (rows,cols)-matrix of ones.">ones</a> ( n ) /n,pdf0 );}; 
     693<a name="l00913"></a><a class="code" href="classbdm_1_1eEmp.html#cef74aa5f87d10d440b9b1e8bc78c1e7">00913</a>                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1eEmp.html#cef74aa5f87d10d440b9b1e8bc78c1e7" title="Set samples and weights.">set_statistics</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* pdf0 , <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1eEmp.html#9798006271ca77629855113f1283a031" title="Number of particles.">n</a> ) {<a class="code" href="classbdm_1_1eEmp.html#cef74aa5f87d10d440b9b1e8bc78c1e7" title="Set samples and weights.">set_statistics</a> ( ones ( n ) /n,pdf0 );}; 
    694694<a name="l00915"></a>00915                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1eEmp.html#b62d802b8ef39f7c4dcbeb366c90951a" title="Set sample.">set_samples</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* pdf0 ); 
    695 <a name="l00917"></a><a class="code" href="classbdm_1_1eEmp.html#c74c281d652356c19b6b079e42ca7ef1">00917</a>                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1eEmp.html#c74c281d652356c19b6b079e42ca7ef1" title="Set sample.">set_parameters</a> ( <span class="keywordtype">int</span> n0, <span class="keywordtype">bool</span> copy=<span class="keyword">true</span> ) {<a class="code" href="classbdm_1_1eEmp.html#9798006271ca77629855113f1283a031" title="Number of particles.">n</a>=n0; <a class="code" href="classbdm_1_1eEmp.html#9d39241aab7c4bbeb07c6d516421c67d" title="Sample weights .">w</a>.set_size ( n0,copy );<a class="code" href="classbdm_1_1eEmp.html#73d819553a0f268b055a087d2d4486f3" title="Samples .">samples</a>.<a class="code" href="classitpp_1_1Array.html#dbf76c71f29014a4d53f254e83f3ff1c" title="Resizing an Array&amp;lt;T&amp;gt;.">set_size</a> ( n0,copy );}; 
     695<a name="l00917"></a><a class="code" href="classbdm_1_1eEmp.html#c74c281d652356c19b6b079e42ca7ef1">00917</a>                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1eEmp.html#c74c281d652356c19b6b079e42ca7ef1" title="Set sample.">set_parameters</a> ( <span class="keywordtype">int</span> n0, <span class="keywordtype">bool</span> copy=<span class="keyword">true</span> ) {<a class="code" href="classbdm_1_1eEmp.html#9798006271ca77629855113f1283a031" title="Number of particles.">n</a>=n0; <a class="code" href="classbdm_1_1eEmp.html#9d39241aab7c4bbeb07c6d516421c67d" title="Sample weights .">w</a>.set_size ( n0,copy );<a class="code" href="classbdm_1_1eEmp.html#73d819553a0f268b055a087d2d4486f3" title="Samples .">samples</a>.set_size ( n0,copy );}; 
    696696<a name="l00919"></a><a class="code" href="classbdm_1_1eEmp.html#d7f83cc0415cd44ae7cc8b4bdad93aef">00919</a>                         vec&amp; <a class="code" href="classbdm_1_1eEmp.html#d7f83cc0415cd44ae7cc8b4bdad93aef" title="Potentially dangerous, use with care.">_w</a>()  {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1eEmp.html#9d39241aab7c4bbeb07c6d516421c67d" title="Sample weights .">w</a>;}; 
    697697<a name="l00921"></a><a class="code" href="classbdm_1_1eEmp.html#b7d7106f486e3fad38590914a693d714">00921</a>                         <span class="keyword">const</span> vec&amp; <a class="code" href="classbdm_1_1eEmp.html#b7d7106f486e3fad38590914a693d714" title="Potentially dangerous, use with care.">_w</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1eEmp.html#9d39241aab7c4bbeb07c6d516421c67d" title="Sample weights .">w</a>;}; 
    698 <a name="l00923"></a><a class="code" href="classbdm_1_1eEmp.html#c24966b0aaeb767bc8a6b4fd60931be2">00923</a>                         <a class="code" href="classitpp_1_1Array.html">Array&lt;vec&gt;</a>&amp; <a class="code" href="classbdm_1_1eEmp.html#c24966b0aaeb767bc8a6b4fd60931be2" title="access function">_samples</a>() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1eEmp.html#73d819553a0f268b055a087d2d4486f3" title="Samples .">samples</a>;}; 
    699 <a name="l00925"></a><a class="code" href="classbdm_1_1eEmp.html#b59af0efdb009d98ea8ebfa965e74ae2">00925</a>                         <span class="keyword">const</span> <a class="code" href="classitpp_1_1Array.html">Array&lt;vec&gt;</a>&amp; <a class="code" href="classbdm_1_1eEmp.html#b59af0efdb009d98ea8ebfa965e74ae2" title="access function">_samples</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1eEmp.html#73d819553a0f268b055a087d2d4486f3" title="Samples .">samples</a>;}; 
     698<a name="l00923"></a><a class="code" href="classbdm_1_1eEmp.html#c24966b0aaeb767bc8a6b4fd60931be2">00923</a>                         Array&lt;vec&gt;&amp; <a class="code" href="classbdm_1_1eEmp.html#c24966b0aaeb767bc8a6b4fd60931be2" title="access function">_samples</a>() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1eEmp.html#73d819553a0f268b055a087d2d4486f3" title="Samples .">samples</a>;}; 
     699<a name="l00925"></a><a class="code" href="classbdm_1_1eEmp.html#b59af0efdb009d98ea8ebfa965e74ae2">00925</a>                         <span class="keyword">const</span> Array&lt;vec&gt;&amp; <a class="code" href="classbdm_1_1eEmp.html#b59af0efdb009d98ea8ebfa965e74ae2" title="access function">_samples</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1eEmp.html#73d819553a0f268b055a087d2d4486f3" title="Samples .">samples</a>;}; 
    700700<a name="l00927"></a>00927                         ivec <a class="code" href="classbdm_1_1eEmp.html#f06ce255de5dbb2313f52ee51f82ba3d" title="Function performs resampling, i.e. removal of low-weight samples and duplication...">resample</a> ( RESAMPLING_METHOD method=SYSTEMATIC ); 
    701 <a name="l00929"></a><a class="code" href="classbdm_1_1eEmp.html#97f1e07b5ae6eebc91c7365f0f88d270">00929</a>                         vec <a class="code" href="classbdm_1_1eEmp.html#97f1e07b5ae6eebc91c7365f0f88d270" title="inherited operation : NOT implemneted">sample</a>()<span class="keyword"> const </span>{<a class="code" href="group__errorhandlingfunc.html#g22d38e98332f9edff88cc501463eedce" title="Abort unconditionally.">it_error</a> ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> 0;} 
    702 <a name="l00931"></a><a class="code" href="classbdm_1_1eEmp.html#01654c014d3aa068f8d4ecba4be86d09">00931</a>                         <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1eEmp.html#01654c014d3aa068f8d4ecba4be86d09" title="inherited operation : NOT implemneted">evallog</a> ( <span class="keyword">const</span> vec &amp;val )<span class="keyword"> const </span>{<a class="code" href="group__errorhandlingfunc.html#g22d38e98332f9edff88cc501463eedce" title="Abort unconditionally.">it_error</a> ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> 0.0;} 
     701<a name="l00929"></a><a class="code" href="classbdm_1_1eEmp.html#97f1e07b5ae6eebc91c7365f0f88d270">00929</a>                         vec <a class="code" href="classbdm_1_1eEmp.html#97f1e07b5ae6eebc91c7365f0f88d270" 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;} 
     702<a name="l00931"></a><a class="code" href="classbdm_1_1eEmp.html#01654c014d3aa068f8d4ecba4be86d09">00931</a>                         <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1eEmp.html#01654c014d3aa068f8d4ecba4be86d09" title="inherited operation : NOT implemneted">evallog</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;} 
    703703<a name="l00932"></a><a class="code" href="classbdm_1_1eEmp.html#bbfcb4f868c7381298c281a256d8c4b9">00932</a>                         vec <a class="code" href="classbdm_1_1eEmp.html#bbfcb4f868c7381298c281a256d8c4b9" title="return expected value">mean</a>()<span class="keyword"> const</span> 
    704704<a name="l00933"></a>00933 <span class="keyword">                        </span>{ 
    705 <a name="l00934"></a>00934                                 vec pom=<a class="code" href="group__specmat.html#g10723ecada06221cbe64fe2736a59de1" title="A Double (rows,cols)-matrix of zeros.">zeros</a> ( <a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a> ); 
     705<a name="l00934"></a>00934                                 vec pom=zeros ( <a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a> ); 
    706706<a name="l00935"></a>00935                                 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i&lt;<a class="code" href="classbdm_1_1eEmp.html#9798006271ca77629855113f1283a031" title="Number of particles.">n</a>;i++ ) {pom+=<a class="code" href="classbdm_1_1eEmp.html#73d819553a0f268b055a087d2d4486f3" title="Samples .">samples</a> ( i ) *<a class="code" href="classbdm_1_1eEmp.html#9d39241aab7c4bbeb07c6d516421c67d" title="Sample weights .">w</a> ( i );} 
    707707<a name="l00936"></a>00936                                 <span class="keywordflow">return</span> pom; 
     
    709709<a name="l00938"></a><a class="code" href="classbdm_1_1eEmp.html#05e9ebf467ede737cb6a3621d7fd3c87">00938</a>                         vec <a class="code" href="classbdm_1_1eEmp.html#05e9ebf467ede737cb6a3621d7fd3c87" title="return expected variance (not covariance!)">variance</a>()<span class="keyword"> const</span> 
    710710<a name="l00939"></a>00939 <span class="keyword">                        </span>{ 
    711 <a name="l00940"></a>00940                                 vec pom=<a class="code" href="group__specmat.html#g10723ecada06221cbe64fe2736a59de1" title="A Double (rows,cols)-matrix of zeros.">zeros</a> ( <a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a> ); 
    712 <a name="l00941"></a>00941                                 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i&lt;<a class="code" href="classbdm_1_1eEmp.html#9798006271ca77629855113f1283a031" title="Number of particles.">n</a>;i++ ) {pom+=<a class="code" href="group__logexpfunc.html#g40f48a75172e7f8bc8e58ed54262a04d" title="Calculates x to the power of y (x^y).">pow</a> ( <a class="code" href="classbdm_1_1eEmp.html#73d819553a0f268b055a087d2d4486f3" title="Samples .">samples</a> ( i ),2 ) *<a class="code" href="classbdm_1_1eEmp.html#9d39241aab7c4bbeb07c6d516421c67d" title="Sample weights .">w</a> ( i );} 
    713 <a name="l00942"></a>00942                                 <span class="keywordflow">return</span> pom-<a class="code" href="group__logexpfunc.html#g40f48a75172e7f8bc8e58ed54262a04d" title="Calculates x to the power of y (x^y).">pow</a> ( <a class="code" href="classbdm_1_1eEmp.html#bbfcb4f868c7381298c281a256d8c4b9" title="return expected value">mean</a>(),2 ); 
     711<a name="l00940"></a>00940                                 vec pom=zeros ( <a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a> ); 
     712<a name="l00941"></a>00941                                 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i&lt;<a class="code" href="classbdm_1_1eEmp.html#9798006271ca77629855113f1283a031" title="Number of particles.">n</a>;i++ ) {pom+=pow ( <a class="code" href="classbdm_1_1eEmp.html#73d819553a0f268b055a087d2d4486f3" title="Samples .">samples</a> ( i ),2 ) *<a class="code" href="classbdm_1_1eEmp.html#9d39241aab7c4bbeb07c6d516421c67d" title="Sample weights .">w</a> ( i );} 
     713<a name="l00942"></a>00942                                 <span class="keywordflow">return</span> pom-pow ( <a class="code" href="classbdm_1_1eEmp.html#bbfcb4f868c7381298c281a256d8c4b9" title="return expected value">mean</a>(),2 ); 
    714714<a name="l00943"></a>00943                         } 
    715715<a name="l00945"></a><a class="code" href="classbdm_1_1eEmp.html#b1c9df656144edf79ba2d885613f661f">00945</a>                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1eEmp.html#b1c9df656144edf79ba2d885613f661f" title="For this class, qbounds are minimum and maximum value of the population!">qbounds</a> ( vec &amp;lb, vec &amp;ub, <span class="keywordtype">double</span> perc=0.95 )<span class="keyword"> const</span> 
     
    759759<a name="l00990"></a>00990                 vec x ( <a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a> ); 
    760760<a name="l00991"></a>00991 <span class="preprocessor">#pragma omp critical</span> 
    761 <a name="l00992"></a>00992 <span class="preprocessor"></span>                NorRNG.<a class="code" href="classitpp_1_1Normal__RNG.html#03e547de2b7ed75be013ab665a07c4e8" title="Get a Normal distributed (0,1) vector.">sample_vector</a> ( <a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a>,x ); 
     761<a name="l00992"></a>00992 <span class="preprocessor"></span>                NorRNG.sample_vector ( <a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a>,x ); 
    762762<a name="l00993"></a>00993                 vec smp = <a class="code" href="classbdm_1_1enorm.html#2d92dde696b2a7a5b10ddef5d22ba2c2" title="Covariance matrix in decomposed form.">R</a>.sqrt_mult ( x ); 
    763763<a name="l00994"></a>00994  
     
    777777<a name="l01008"></a>01008                 { 
    778778<a name="l01009"></a>01009 <span class="preprocessor">#pragma omp critical</span> 
    779 <a name="l01010"></a>01010 <span class="preprocessor"></span>                        NorRNG.<a class="code" href="classitpp_1_1Normal__RNG.html#03e547de2b7ed75be013ab665a07c4e8" title="Get a Normal distributed (0,1) vector.">sample_vector</a> ( <a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a>,x ); 
     779<a name="l01010"></a>01010 <span class="preprocessor"></span>                        NorRNG.sample_vector ( <a class="code" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce" title="dimension of the random variable">dim</a>,x ); 
    780780<a name="l01011"></a>01011                         pom = <a class="code" href="classbdm_1_1enorm.html#2d92dde696b2a7a5b10ddef5d22ba2c2" title="Covariance matrix in decomposed form.">R</a>.sqrt_mult ( x ); 
    781781<a name="l01012"></a>01012                         pom +=<a class="code" href="classbdm_1_1enorm.html#c702a194720853570d08b65482f842c7" title="mean value">mu</a>; 
     
    813813<a name="l01044"></a><a class="code" href="classbdm_1_1mlnorm.html#5d18dec3167584338a4775c1d165d96f">01044</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1mlnorm.html#5d18dec3167584338a4775c1d165d96f" 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> vec &amp;mu0, <span class="keyword">const</span> sq_T &amp;R0 ) 
    814814<a name="l01045"></a>01045         { 
    815 <a name="l01046"></a>01046                 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a> ( A0.rows() ==mu0.length(),<span class="stringliteral">""</span> ); 
    816 <a name="l01047"></a>01047                 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a> ( A0.rows() ==R0.rows(),<span class="stringliteral">""</span> ); 
     815<a name="l01046"></a>01046                 it_assert_debug ( A0.rows() ==mu0.length(),<span class="stringliteral">""</span> ); 
     816<a name="l01047"></a>01047                 it_assert_debug ( A0.rows() ==R0.rows(),<span class="stringliteral">""</span> ); 
    817817<a name="l01048"></a>01048  
    818 <a name="l01049"></a>01049                 <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.set_parameters ( <a class="code" href="group__specmat.html#g10723ecada06221cbe64fe2736a59de1" title="A Double (rows,cols)-matrix of zeros.">zeros</a> ( A0.rows() ),R0 ); 
     818<a name="l01049"></a>01049                 <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.set_parameters ( zeros ( A0.rows() ),R0 ); 
    819819<a name="l01050"></a>01050                 A = A0; 
    820820<a name="l01051"></a>01051                 mu_const = mu0; 
     
    857857<a name="l01088"></a><a class="code" href="classbdm_1_1enorm.html#c2996bdaffad38fbe0fc776db54c9d80">01088</a>         <a class="code" href="classbdm_1_1enorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm&lt;sq_T&gt;</a>* <a class="code" href="classbdm_1_1enorm.html#c2996bdaffad38fbe0fc776db54c9d80" title="Return marginal density on the given RV, the remainig rvs are intergrated out.">enorm&lt;sq_T&gt;::marginal</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rvn )<span class="keyword"> const</span> 
    858858<a name="l01089"></a>01089 <span class="keyword">        </span>{ 
    859 <a name="l01090"></a>01090                 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a> ( <a class="code" href="classbdm_1_1epdf.html#c4b863ff84c7a4882fb3ad18556027f9" title="True if rv is assigned.">isnamed</a>(), <span class="stringliteral">"rv description is not assigned"</span> ); 
     859<a name="l01090"></a>01090                 it_assert_debug ( <a class="code" href="classbdm_1_1epdf.html#c4b863ff84c7a4882fb3ad18556027f9" title="True if rv is assigned.">isnamed</a>(), <span class="stringliteral">"rv description is not assigned"</span> ); 
    860860<a name="l01091"></a>01091                 ivec irvn = rvn.<a class="code" href="classbdm_1_1RV.html#cbebdb5e0d30101a6eb63550ef701c55">dataind</a> ( <a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Description of the random variable.">rv</a> ); 
    861861<a name="l01092"></a>01092  
     
    872872<a name="l01103"></a>01103 <span class="keyword">        </span>{ 
    873873<a name="l01104"></a>01104  
    874 <a name="l01105"></a>01105                 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a> ( <a class="code" href="classbdm_1_1epdf.html#c4b863ff84c7a4882fb3ad18556027f9" title="True if rv is assigned.">isnamed</a>(),<span class="stringliteral">"rvs are not assigned"</span> ); 
     874<a name="l01105"></a>01105                 it_assert_debug ( <a class="code" href="classbdm_1_1epdf.html#c4b863ff84c7a4882fb3ad18556027f9" title="True if rv is assigned.">isnamed</a>(),<span class="stringliteral">"rvs are not assigned"</span> ); 
    875875<a name="l01106"></a>01106  
    876876<a name="l01107"></a>01107                 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> rvc = <a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Description of the random variable.">rv</a>.<a class="code" href="classbdm_1_1RV.html#aec44dabdf0a6d90fbae95e1356eda39" title="Subtract another variable from the current one.">subt</a> ( rvn ); 
    877 <a name="l01108"></a>01108                 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a> ( ( rvc.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() +rvn.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() ==<a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Description of the random variable.">rv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() ),<span class="stringliteral">"wrong rvn"</span> ); 
     877<a name="l01108"></a>01108                 it_assert_debug ( ( rvc.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() +rvn.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() ==<a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Description of the random variable.">rv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() ),<span class="stringliteral">"wrong rvn"</span> ); 
    878878<a name="l01109"></a>01109                 <span class="comment">//Permutation vector of the new R</span> 
    879879<a name="l01110"></a>01110                 ivec irvn = rvn.<a class="code" href="classbdm_1_1RV.html#cbebdb5e0d30101a6eb63550ef701c55">dataind</a> ( <a class="code" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8" title="Description of the random variable.">rv</a> ); 
     
    893893<a name="l01124"></a>01124                 vec mu1 = <a class="code" href="classbdm_1_1enorm.html#c702a194720853570d08b65482f842c7" title="mean value">mu</a> ( irvn ); 
    894894<a name="l01125"></a>01125                 vec mu2 = <a class="code" href="classbdm_1_1enorm.html#c702a194720853570d08b65482f842c7" title="mean value">mu</a> ( irvc ); 
    895 <a name="l01126"></a>01126                 mat A=S12*<a class="code" href="group__inverse.html#g125b083397cc9450b8a67a485b545bc8" title="Inverse of real square matrix.Calculate the inverse of the real matrix .">inv</a> ( S22 ); 
     895<a name="l01126"></a>01126                 mat A=S12*inv ( S22 ); 
    896896<a name="l01127"></a>01127                 sq_T R_n ( S11 - A *S12.T() ); 
    897897<a name="l01128"></a>01128  
     
    915915<a name="l01147"></a>01147 <span class="preprocessor">#endif //EF_H</span> 
    916916</pre></div></div> 
    917 <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:12 2009 for mixpp by&nbsp; 
     917<hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:11:00 2009 for mixpp by&nbsp; 
    918918<a href="http://www.doxygen.org/index.html"> 
    919919<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>