<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.5.6">
  <compounddef id="testSmp_8cpp" kind="file">
    <compoundname>testSmp.cpp</compoundname>
    <includes local="no">itpp/itbase.h</includes>
    <includes refid="libEF_8h" local="no">stat/libEF.h</includes>
    <includes refid="emix_8h" local="no">stat/emix.h</includes>
    <incdepgraph>
      <node id="920">
        <label>libBM.h</label>
        <link refid="libBM_8h"/>
        <childnode refid="917" relation="include">
        </childnode>
      </node>
      <node id="922">
        <label>stat/emix.h</label>
        <link refid="emix_8h"/>
        <childnode refid="920" relation="include">
        </childnode>
        <childnode refid="918" relation="include">
        </childnode>
      </node>
      <node id="921">
        <label>../itpp_ext.h</label>
        <link refid="itpp__ext_8h-source"/>
        <childnode refid="917" relation="include">
        </childnode>
      </node>
      <node id="918">
        <label>stat/libEF.h</label>
        <link refid="libEF_8h"/>
        <childnode refid="917" relation="include">
        </childnode>
        <childnode refid="919" relation="include">
        </childnode>
        <childnode refid="920" relation="include">
        </childnode>
        <childnode refid="921" relation="include">
        </childnode>
      </node>
      <node id="917">
        <label>itpp/itbase.h</label>
      </node>
      <node id="916">
        <label>work/git/mixpp/tests/testSmp.cpp</label>
        <link refid="testSmp.cpp"/>
        <childnode refid="917" relation="include">
        </childnode>
        <childnode refid="918" relation="include">
        </childnode>
        <childnode refid="922" relation="include">
        </childnode>
      </node>
      <node id="919">
        <label>../math/libDC.h</label>
        <link refid="libDC_8h"/>
        <childnode refid="917" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="testSmp_8cpp_1e3186ff19d9ad2c3984dbd12c10bd9ad" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void disp</definition>
        <argsstring>(const vec &amp;tmu, const mat &amp;tR, const mat &amp;Smp)</argsstring>
        <name>disp</name>
        <param>
          <type>const vec &amp;</type>
          <declname>tmu</declname>
        </param>
        <param>
          <type>const mat &amp;</type>
          <declname>tR</declname>
        </param>
        <param>
          <type>const mat &amp;</type>
          <declname>Smp</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/tests/testSmp.cpp" line="11" bodyfile="/home/smidl/work/git/mixpp/tests/testSmp.cpp" bodystart="11" bodyend="20"/>
      </memberdef>
      <memberdef kind="function" id="testSmp_8cpp_1e66f6b31b5ad750f1fe042a706a4e3d4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int main</definition>
        <argsstring>()</argsstring>
        <name>main</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/tests/testSmp.cpp" line="22" bodyfile="/home/smidl/work/git/mixpp/tests/testSmp.cpp" bodystart="22" bodyend="120"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="preprocessor">#include<sp/>&lt;itpp/itbase.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="libEF_8h" kindref="compound" tooltip="Probability distributions for Exponential Family models.">stat/libEF.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="emix_8h" kindref="compound" tooltip="Probability distributions for Mixtures of pdfs.">stat/emix.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight><highlight class="keyword">using<sp/>namespace<sp/></highlight><highlight class="normal">itpp;</highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight><highlight class="comment">//These<sp/>lines<sp/>are<sp/>needed<sp/>for<sp/>use<sp/>of<sp/>cout<sp/>and<sp/>endl</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight><highlight class="keyword">using</highlight><highlight class="normal"><sp/>std::cout;</highlight></codeline>
<codeline lineno="9"><highlight class="normal"></highlight><highlight class="keyword">using</highlight><highlight class="normal"><sp/>std::endl;</highlight></codeline>
<codeline lineno="10"><highlight class="normal"></highlight></codeline>
<codeline lineno="11"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>disp(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>vec<sp/>&amp;tmu,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>mat<sp/>&amp;tR,</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>mat<sp/>&amp;Smp){</highlight></codeline>
<codeline lineno="12"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>N<sp/>=<sp/>Smp.cols();</highlight></codeline>
<codeline lineno="13"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>Emu<sp/>=<sp/>Smp*ones(N)<sp/>/N<sp/>;</highlight></codeline>
<codeline lineno="14"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>Er<sp/>=<sp/>(Smp*Smp.transpose())/N<sp/>-<sp/>outer_product(Emu,Emu);</highlight></codeline>
<codeline lineno="15"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;True<sp/>mu:&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>tmu<sp/>&lt;&lt;endl;</highlight></codeline>
<codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;Emp<sp/><sp/>mu:&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>Emu<sp/>&lt;&lt;endl;</highlight></codeline>
<codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;True<sp/>R:&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>tR<sp/>&lt;&lt;endl;</highlight></codeline>
<codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;Emp<sp/><sp/>R:&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>Er<sp/>&lt;&lt;endl;</highlight></codeline>
<codeline lineno="20"><highlight class="normal">}</highlight></codeline>
<codeline lineno="21"><highlight class="normal"></highlight></codeline>
<codeline lineno="22"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="sim__var_8cpp_1e66f6b31b5ad750f1fe042a706a4e3d4" kindref="member" tooltip="Extended Kalman filter with unknown Q.">main</ref>()<sp/>{</highlight></codeline>
<codeline lineno="23"><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>RNG_randomize();</highlight></codeline>
<codeline lineno="25"><highlight class="normal"></highlight></codeline>
<codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>x(</highlight><highlight class="stringliteral">&quot;{x<sp/>}&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;2&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="27"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>y(</highlight><highlight class="stringliteral">&quot;{y<sp/>}&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;2&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>N<sp/>=<sp/>10000;<sp/></highlight><highlight class="comment">//number<sp/>of<sp/>samples</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>mu0<sp/>=<sp/></highlight><highlight class="stringliteral">&quot;1.5<sp/>1.7&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>V0(</highlight><highlight class="stringliteral">&quot;1.2<sp/>0.3;<sp/>0.3<sp/>5&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classldmat" kindref="compound" tooltip="Matrix stored in LD form, (typically known as UD).">ldmat</ref><sp/>R<sp/>=<sp/><ref refid="classldmat" kindref="compound" tooltip="Matrix stored in LD form, (typically known as UD).">ldmat</ref>(V0);</highlight></codeline>
<codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="33"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;======<sp/>ENorm<sp/>======<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;endl;</highlight></codeline>
<codeline lineno="34"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classenorm" kindref="compound" tooltip="Gaussian density with positive definite (decomposed) covariance matrix.">enorm&lt;ldmat&gt;</ref><sp/>eN(x);</highlight></codeline>
<codeline lineno="35"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>eN.set_parameters(mu0,R);</highlight></codeline>
<codeline lineno="36"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>Smp<sp/>=<sp/>eN.sample(N);</highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>disp(mu0,R.<ref refid="classldmat_15b0515da8dc2293d9e4360b74cc26c9e" kindref="member" tooltip="Conversion to full matrix.">to_mat</ref>(),Smp);</highlight></codeline>
<codeline lineno="39"><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;======<sp/>MlNorm<sp/>======<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;endl;</highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>I<sp/>=<sp/>eye(2);</highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>lik(N);</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classmlnorm" kindref="compound" tooltip="Normal distributed linear function with linear function of mean value;.">mlnorm&lt;ldmat&gt;</ref><sp/>ML(x,x);</highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ML.set_parameters(I,R);</highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Smp<sp/>=<sp/>ML.samplecond(mu0,lik,N);</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>disp(mu0,R.<ref refid="classldmat_15b0515da8dc2293d9e4360b74cc26c9e" kindref="member" tooltip="Conversion to full matrix.">to_mat</ref>(),Smp);</highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;======<sp/>EGamma<sp/>======<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;endl;<sp/></highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>a<sp/>=<sp/></highlight><highlight class="stringliteral">&quot;100000,10000&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>b<sp/>=<sp/>a/10.0;</highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classegamma" kindref="compound" tooltip="Gamma posterior density.">egamma</ref><sp/>eG(x);</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>eG.set_parameters(a,b);</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/>eG.eval(a)&lt;&lt;endl;</highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Smp<sp/>=<sp/>eG.sampleN(N);</highlight></codeline>
<codeline lineno="57"><highlight class="normal"></highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>g_mu<sp/>=<sp/>elem_div(a,b);</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>g_var<sp/>=<sp/>elem_div(a,pow(b,2.0));</highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>disp(g_mu,diag(g_var),Smp);</highlight></codeline>
<codeline lineno="61"><highlight class="normal"></highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;======<sp/>MGamma<sp/>======<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;endl;<sp/></highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classmgamma" kindref="compound" tooltip="Gamma random walk.">mgamma</ref><sp/>mG(x,x);</highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>k<sp/>=<sp/>10.0;</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mG.set_parameters(k);</highlight></codeline>
<codeline lineno="66"><highlight class="normal"></highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Smp=mG.samplecond(mu0,lik,N);</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>disp(mu0,pow(mu0,2.0)/k,Smp);</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;=======<sp/>EMix<sp/>========<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>endl;</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classemix" kindref="compound" tooltip="Mixture of epdfs.">emix</ref><sp/>eMix(x);</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Array&lt;epdf*&gt;<sp/>Coms(2);</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Coms(0)<sp/>=<sp/>&amp;eG;</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Coms(1)<sp/>=<sp/>&amp;eN;</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>eMix.set_parameters(vec_2(0.5,0.5),<sp/>Coms);</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>smp<sp/>=<sp/>eMix.sample();</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Smp<sp/>=<sp/>eMix.sampleN(N);</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>disp(eMix.mean(),zeros(2),Smp);</highlight></codeline>
<codeline lineno="80"><highlight class="normal"></highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;=======<sp/>MEpdf<sp/>========<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>endl;</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classmepdf" kindref="compound" tooltip="Unconditional mpdf, allows using epdf in the role of mpdf.">mepdf</ref><sp/>meMix(eMix);</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Smp<sp/>=<sp/>meMix.samplecond(mu0,lik,N);</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>disp(eMix.mean(),zeros(2),Smp);</highlight></codeline>
<codeline lineno="86"><highlight class="normal"></highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;=======<sp/>MMix<sp/>========<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>endl;</highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classmmix" kindref="compound" tooltip="Mixture of mpdfs with constant weights, all mpdfs are of equal type.">mmix</ref><sp/>mMix(x,x);</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Array&lt;mpdf*&gt;<sp/>mComs(2);</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mComs(0)<sp/>=<sp/>&amp;mG;</highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>eN.set_mu(vec_2(0.0,0.0));</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classmepdf" kindref="compound" tooltip="Unconditional mpdf, allows using epdf in the role of mpdf.">mepdf</ref><sp/>mEnorm(eN);</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mComs(1)<sp/>=<sp/>&amp;mEnorm;</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mMix.set_parameters(vec_2(0.5,0.5),mComs);</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Smp<sp/>=<sp/>mMix.samplecond(mu0,lik,N);</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>disp(mMix._epdf().mean(),zeros(2),Smp);</highlight></codeline>
<codeline lineno="98"><highlight class="normal"></highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;=======<sp/>EProd<sp/>========<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>endl;</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>we<sp/>have<sp/>to<sp/>change<sp/>eG.rv<sp/>to<sp/>y</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>eG._rv()=<sp/>y;<sp/></highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//create<sp/>array<sp/></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Array&lt;mpdf*&gt;<sp/>A(2);</highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classmepdf" kindref="compound" tooltip="Unconditional mpdf, allows using epdf in the role of mpdf.">mepdf</ref><sp/>meN(eN);</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classmepdf" kindref="compound" tooltip="Unconditional mpdf, allows using epdf in the role of mpdf.">mepdf</ref><sp/>meG(eG);</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>A(0)<sp/>=<sp/>&amp;meN;</highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>A(1)<sp/>=<sp/>&amp;meG;</highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classmprod" kindref="compound" tooltip="Chain rule decomposition of epdf.">mprod</ref><sp/>eP(A);</highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>epV=zeros(4,4);</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>epV.set_submatrix(0,0,V0);</highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>epV.set_submatrix(2,2,diag(g_var));</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Smp<sp/>=<sp/>eP.samplecond(vec(0),lik,N);</highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>disp(eP.mean(),<sp/>epV,Smp);</highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Exit<sp/>program:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="119"><highlight class="normal"></highlight></codeline>
<codeline lineno="120"><highlight class="normal">}</highlight></codeline>
<codeline lineno="121"><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="/home/smidl/work/git/mixpp/tests/testSmp.cpp"/>
  </compounddef>
</doxygen>
