<?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="bdm_2estim_2arx_8cpp" kind="file">
    <compoundname>arx.cpp</compoundname>
    <includes refid="arx_8h" local="yes">arx.h</includes>
    <incdepgraph>
      <node id="188">
        <label>libBM.h</label>
        <link refid="libBM_8h"/>
        <childnode refid="186" relation="include">
        </childnode>
      </node>
      <node id="191">
        <label>../itpp_ext.h</label>
        <link refid="itpp__ext_8h-source"/>
        <childnode refid="186" relation="include">
        </childnode>
      </node>
      <node id="189">
        <label>../stat/libEF.h</label>
        <link refid="libEF_8h"/>
        <childnode refid="186" relation="include">
        </childnode>
        <childnode refid="190" relation="include">
        </childnode>
        <childnode refid="188" relation="include">
        </childnode>
        <childnode refid="191" relation="include">
        </childnode>
      </node>
      <node id="185">
        <label>arx.h</label>
        <link refid="arx_8h"/>
        <childnode refid="186" relation="include">
        </childnode>
        <childnode refid="187" relation="include">
        </childnode>
        <childnode refid="189" relation="include">
        </childnode>
      </node>
      <node id="187">
        <label>../stat/libFN.h</label>
        <link refid="libFN_8h-source"/>
        <childnode refid="186" relation="include">
        </childnode>
        <childnode refid="188" relation="include">
        </childnode>
      </node>
      <node id="186">
        <label>itpp/itbase.h</label>
      </node>
      <node id="184">
        <label>work/git/mixpp/bdm/estim/arx.cpp</label>
        <link refid="bdm/estim/arx.cpp"/>
        <childnode refid="185" relation="include">
        </childnode>
      </node>
      <node id="190">
        <label>../math/libDC.h</label>
        <link refid="libDC_8h"/>
        <childnode refid="186" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="bdm_2estim_2arx_8cpp_1d5bd9c8ac7c67d44b621bb06282c0dc5" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>double</type>
        <definition>double egiw_bestbelow</definition>
        <argsstring>(egiw Eg, egiw Eg0, double Egll, ivec &amp;indeces)</argsstring>
        <name>egiw_bestbelow</name>
        <param>
          <type><ref refid="classegiw" kindref="compound">egiw</ref></type>
          <declname>Eg</declname>
        </param>
        <param>
          <type><ref refid="classegiw" kindref="compound">egiw</ref></type>
          <declname>Eg0</declname>
        </param>
        <param>
          <type>double</type>
          <declname>Egll</declname>
        </param>
        <param>
          <type>ivec &amp;</type>
          <declname>indeces</declname>
        </param>
        <briefdescription>
<para>Return the best structure. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>Eg</parametername>
</parameternamelist>
<parameterdescription>
<para>a copy of GiW density that is being examined </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>Eg0</parametername>
</parameternamelist>
<parameterdescription>
<para>a copy of prior GiW density before estimation </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>Egll</parametername>
</parameternamelist>
<parameterdescription>
<para>likelihood of the current Eg </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>indeces</parametername>
</parameternamelist>
<parameterdescription>
<para>current indeces </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>best likelihood in the structure below the given one </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/bdm/estim/arx.cpp" line="33" bodyfile="/home/smidl/work/git/mixpp/bdm/estim/arx.cpp" bodystart="33" bodyend="80"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="preprocessor">#include<sp/>&quot;<ref refid="arx_8h" kindref="compound" tooltip="Bayesian Filtering for generalized autoregressive (ARX) model.">arx.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight><highlight class="keyword">using<sp/>namespace<sp/></highlight><highlight class="normal">itpp;</highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight></codeline>
<codeline lineno="5" refid="classARX_1ba82c956ca893826811aefe1e4af465d" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classARX_1ba82c956ca893826811aefe1e4af465d" kindref="member" tooltip="Here .">ARX::bayes</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>vec<sp/>&amp;dt<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="6"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>lnc;</highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classARX_1e467144efb0a5acbc10dba4eff8638fe" kindref="member" tooltip="forgetting factor">frg</ref>&lt;1.0)<sp/>{</highlight></codeline>
<codeline lineno="9"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classARX_12291297861dd74ca0175a01f910a0ef7" kindref="member" tooltip="cached value of est.V">V</ref>*=<ref refid="classARX_1e467144efb0a5acbc10dba4eff8638fe" kindref="member" tooltip="forgetting factor">frg</ref>;</highlight></codeline>
<codeline lineno="10"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classARX_1a4182c281098b2d86b62518a7493d9be" kindref="member" tooltip="cached value of est.nu">nu</ref>*=<ref refid="classARX_1e467144efb0a5acbc10dba4eff8638fe" kindref="member" tooltip="forgetting factor">frg</ref>;</highlight></codeline>
<codeline lineno="11"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classBM_1bf6fb59b30141074f8ee1e2f43d03129" kindref="member" tooltip="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</ref>)<sp/>{</highlight></codeline>
<codeline lineno="12"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classARX_16d0cd0f0734aa77cdc5e48f1cf6737ec" kindref="member" tooltip="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</ref><sp/>=<sp/><ref refid="classARX_1691d023662beffa1dda611b416c0e27e" kindref="member" tooltip="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</ref>.<ref refid="classegiw_170eb1a0b88459b227f919b425b0d3359" kindref="member" tooltip="logarithm of the normalizing constant, ">lognc</ref>();</highlight></codeline>
<codeline lineno="13"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="14"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="15"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classARX_12291297861dd74ca0175a01f910a0ef7" kindref="member" tooltip="cached value of est.V">V</ref>.<ref refid="classldmat_10f0f6e083e6d947cf58097ffce3ccd1a" kindref="member">opupdt</ref><sp/>(<sp/>dt,1.0);</highlight></codeline>
<codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classARX_1a4182c281098b2d86b62518a7493d9be" kindref="member" tooltip="cached value of est.nu">nu</ref>+=1.0;</highlight></codeline>
<codeline lineno="17"><highlight class="normal"></highlight></codeline>
<codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/><ref refid="classBM_1bf6fb59b30141074f8ee1e2f43d03129" kindref="member" tooltip="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</ref><sp/>)<sp/>{</highlight></codeline>
<codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lnc<sp/>=<sp/><ref refid="classARX_1691d023662beffa1dda611b416c0e27e" kindref="member" tooltip="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</ref>.<ref refid="classegiw_170eb1a0b88459b227f919b425b0d3359" kindref="member" tooltip="logarithm of the normalizing constant, ">lognc</ref>();</highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classBM_15623fef6572a08c2b53b8c87b82dc979" kindref="member" tooltip="Logarithm of marginalized data likelihood.">ll</ref><sp/>=<sp/>lnc<sp/>-<sp/><ref refid="classARX_16d0cd0f0734aa77cdc5e48f1cf6737ec" kindref="member" tooltip="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</ref>;</highlight></codeline>
<codeline lineno="21"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>last_lognc<sp/>=<sp/>lnc;</highlight></codeline>
<codeline lineno="22"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classARX_164ea7c8ff48bf2548bac3e985e24da19" kindref="member" tooltip="total likelihood">tll</ref><sp/>+=<ref refid="classBM_15623fef6572a08c2b53b8c87b82dc979" kindref="member" tooltip="Logarithm of marginalized data likelihood.">ll</ref>;</highlight></codeline>
<codeline lineno="23"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="24"><highlight class="normal">}</highlight></codeline>
<codeline lineno="25"><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>egiw_bestbelow<sp/>(<sp/><ref refid="classegiw" kindref="compound" tooltip="Gauss-inverse-Wishart density stored in LD form.">egiw</ref><sp/>Eg,<sp/><ref refid="classegiw" kindref="compound" tooltip="Gauss-inverse-Wishart density stored in LD form.">egiw</ref><sp/>Eg0,<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>Egll,<sp/>ivec<sp/>&amp;indeces<sp/>)<sp/>{<sp/></highlight><highlight class="comment">//parameter<sp/>Eg<sp/>is<sp/>a<sp/>copy!</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><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/>Vo<sp/>=<sp/>Eg.<ref refid="classegiw_1533e792e1175bfa06d5d595dc5d080d5" kindref="member" tooltip="returns a pointer to the internal statistics. Use with Care!">_V</ref>();<sp/></highlight><highlight class="comment">//copy</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><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/>Vo0<sp/>=<sp/>Eg.<ref refid="classegiw_1533e792e1175bfa06d5d595dc5d080d5" kindref="member" tooltip="returns a pointer to the internal statistics. Use with Care!">_V</ref>();<sp/></highlight><highlight class="comment">//copy</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><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>&amp;<sp/>Vp<sp/>=<sp/>Eg.<ref refid="classegiw_1533e792e1175bfa06d5d595dc5d080d5" kindref="member" tooltip="returns a pointer to the internal statistics. Use with Care!">_V</ref>();<sp/></highlight><highlight class="comment">//<sp/>pointer<sp/>into<sp/>Eg</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><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>&amp;<sp/>Vp0<sp/>=<sp/>Eg.<ref refid="classegiw_1533e792e1175bfa06d5d595dc5d080d5" kindref="member" tooltip="returns a pointer to the internal statistics. Use with Care!">_V</ref>();<sp/></highlight><highlight class="comment">//<sp/>pointer<sp/>into<sp/>Eg</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>end<sp/>=<sp/>Vp.<ref refid="classldmat_196dfb21865db4f5bd36fa70f9b0b1163" kindref="member" tooltip="access function">rows</ref>()-1;</highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>Li;</highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>Li0;</highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>maxll=Egll;</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>tmpll=Egll;</highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>belll=Egll;</highlight></codeline>
<codeline lineno="45"><highlight class="normal"></highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ivec<sp/>tmpindeces;</highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ivec<sp/>maxindeces=indeces;</highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"></highlight></codeline>
<codeline lineno="50"><highlight class="normal">cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;bb:(&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>indeces<sp/>&lt;&lt;</highlight><highlight class="stringliteral">&quot;)<sp/>ll=&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>Egll<sp/>&lt;&lt;endl;</highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//try<sp/>to<sp/>remove<sp/>only<sp/>one<sp/>rv</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/>i=0;i&lt;end;i++<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//copy<sp/>original</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Li<sp/>=<sp/>Vo.<ref refid="classldmat_15f44f100248c6627314afaa653b9e5bd" kindref="member" tooltip="Access functions.">_L</ref>();</highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Li0<sp/>=<sp/>Vo0.<ref refid="classldmat_15f44f100248c6627314afaa653b9e5bd" kindref="member" tooltip="Access functions.">_L</ref>();</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//remove<sp/>stuff</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Li.del_col<sp/>(<sp/>i+1<sp/>);</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Li0.del_col<sp/>(<sp/>i+1<sp/>);</highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Vp.<ref refid="classldmat_1f291faa073e7bc8dfafc7ae93daa2506" kindref="member" tooltip="Transforms general  into pure .">ldform</ref><sp/>(<sp/>Li,Vo.<ref refid="classldmat_1282c879f50aa9ef934e7f46d86881582" kindref="member" tooltip="Access functions.">_D</ref>()<sp/>);</highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Vp0.<ref refid="classldmat_1f291faa073e7bc8dfafc7ae93daa2506" kindref="member" tooltip="Transforms general  into pure .">ldform</ref><sp/>(<sp/>Li0,Vo0.<ref refid="classldmat_1282c879f50aa9ef934e7f46d86881582" kindref="member" tooltip="Access functions.">_D</ref>()<sp/>);</highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpll<sp/>=<sp/>Eg.<ref refid="classegiw_170eb1a0b88459b227f919b425b0d3359" kindref="member" tooltip="logarithm of the normalizing constant, ">lognc</ref>()-Eg0.<ref refid="classegiw_170eb1a0b88459b227f919b425b0d3359" kindref="member" tooltip="logarithm of the normalizing constant, ">lognc</ref>();<sp/></highlight><highlight class="comment">//<sp/>likelihood<sp/>is<sp/>difference<sp/>of<sp/>norm.<sp/>coefs.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="63"><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal">cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;i=(&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>i<sp/>&lt;&lt;</highlight><highlight class="stringliteral">&quot;)<sp/>ll=&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>tmpll<sp/>&lt;&lt;endl;</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>tmpll<sp/>&gt;<sp/>Egll<sp/>)<sp/>{<sp/></highlight><highlight class="comment">//increase<sp/>of<sp/>the<sp/>likelihood</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpindeces<sp/>=<sp/>indeces;</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpindeces.del<sp/>(<sp/>i<sp/>);</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//search<sp/>for<sp/>a<sp/>better<sp/>match<sp/>in<sp/>this<sp/>substructure</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>belll=egiw_bestbelow<sp/>(<sp/>Eg,<sp/>Eg0,<sp/>tmpll,<sp/>tmpindeces<sp/>);</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>belll&gt;maxll<sp/>)<sp/>{<sp/></highlight><highlight class="comment">//better<sp/>match<sp/>found</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>maxll<sp/>=<sp/>belll;</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>maxindeces<sp/>=<sp/>tmpindeces;</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>indeces<sp/>=<sp/>maxindeces;</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>maxll;</highlight></codeline>
<codeline lineno="80"><highlight class="normal">}</highlight></codeline>
<codeline lineno="81"><highlight class="normal"></highlight></codeline>
<codeline lineno="82" refid="classARX_1130bb7336aac681ce14b027b8f1409fa" refkind="member"><highlight class="normal">ivec<sp/><ref refid="classARX_1130bb7336aac681ce14b027b8f1409fa" kindref="member" tooltip="Brute force structure estimation.">ARX::structure_est</ref><sp/>(<sp/><ref refid="classegiw" kindref="compound" tooltip="Gauss-inverse-Wishart density stored in LD form.">egiw</ref><sp/>est0<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ivec<sp/>ind=linspace<sp/>(<sp/>1,<ref refid="classBM_1af00f0612fabe66241dd507188cdbf88" kindref="member" tooltip="Random variable of the posterior.">rv</ref>.<ref refid="classRV_1f5c7b8bd589eef09ccdf3329a0addea0" kindref="member" tooltip="Return number of scalars in the RV.">count</ref>()-1<sp/>);</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>egiw_bestbelow<sp/>(<sp/><ref refid="classARX_1691d023662beffa1dda611b416c0e27e" kindref="member" tooltip="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</ref>,<sp/>est0,<sp/><ref refid="classARX_1691d023662beffa1dda611b416c0e27e" kindref="member" tooltip="Posterior estimate of  in the form of Normal-inverse Wishart density.">est</ref>.<ref refid="classegiw_170eb1a0b88459b227f919b425b0d3359" kindref="member" tooltip="logarithm of the normalizing constant, ">lognc</ref>()-<sp/>est0.<ref refid="classegiw_170eb1a0b88459b227f919b425b0d3359" kindref="member" tooltip="logarithm of the normalizing constant, ">lognc</ref>(),<sp/>ind<sp/>);</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ind;</highlight></codeline>
<codeline lineno="86"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="/home/smidl/work/git/mixpp/bdm/estim/arx.cpp"/>
  </compounddef>
</doxygen>
