<?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="libKF_8cpp" kind="file">
    <compoundname>libKF.cpp</compoundname>
    <includes local="no">itpp/itbase.h</includes>
    <includes refid="libKF_8h" local="yes">libKF.h</includes>
    <incdepgraph>
      <node id="228">
        <label>libBM.h</label>
        <link refid="libBM_8h"/>
        <childnode refid="225" relation="include">
        </childnode>
      </node>
      <node id="231">
        <label>../itpp_ext.h</label>
        <link refid="itpp__ext_8h-source"/>
        <childnode refid="225" relation="include">
        </childnode>
      </node>
      <node id="229">
        <label>../stat/libEF.h</label>
        <link refid="libEF_8h"/>
        <childnode refid="225" relation="include">
        </childnode>
        <childnode refid="230" relation="include">
        </childnode>
        <childnode refid="228" relation="include">
        </childnode>
        <childnode refid="231" relation="include">
        </childnode>
      </node>
      <node id="227">
        <label>../stat/libFN.h</label>
        <link refid="libFN_8h-source"/>
        <childnode refid="225" relation="include">
        </childnode>
        <childnode refid="228" relation="include">
        </childnode>
      </node>
      <node id="225">
        <label>itpp/itbase.h</label>
      </node>
      <node id="224">
        <label>work/git/mixpp/bdm/estim/libKF.cpp</label>
        <link refid="libKF.cpp"/>
        <childnode refid="225" relation="include">
        </childnode>
        <childnode refid="226" relation="include">
        </childnode>
      </node>
      <node id="232">
        <label>../math/chmat.h</label>
        <link refid="chmat_8h"/>
        <childnode refid="225" relation="include">
        </childnode>
        <childnode refid="230" relation="include">
        </childnode>
        <childnode refid="231" relation="include">
        </childnode>
      </node>
      <node id="226">
        <label>libKF.h</label>
        <link refid="libKF_8h"/>
        <childnode refid="225" relation="include">
        </childnode>
        <childnode refid="227" relation="include">
        </childnode>
        <childnode refid="229" relation="include">
        </childnode>
        <childnode refid="232" relation="include">
        </childnode>
      </node>
      <node id="230">
        <label>../math/libDC.h</label>
        <link refid="libDC_8h"/>
        <childnode refid="225" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="libKF_8cpp_186ba216243ed95bb46d80d88775d16af" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>std::ostream &amp;</type>
        <definition>std::ostream&amp; operator&lt;&lt;</definition>
        <argsstring>(std::ostream &amp;os, const KalmanFull &amp;kf)</argsstring>
        <name>operator&lt;&lt;</name>
        <param>
          <type>std::ostream &amp;</type>
          <declname>os</declname>
        </param>
        <param>
          <type>const <ref refid="classKalmanFull" kindref="compound">KalmanFull</ref> &amp;</type>
          <declname>kf</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/bdm/estim/libKF.cpp" line="56" bodyfile="/home/smidl/work/git/mixpp/bdm/estim/libKF.cpp" bodystart="56" bodyend="59"/>
      </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/>&quot;<ref refid="libKF_8h" kindref="compound" tooltip="Bayesian Filtering for linear Gaussian models (Kalman Filter) and extensions.">libKF.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight><highlight class="keyword">using<sp/>namespace<sp/></highlight><highlight class="normal">itpp;</highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight><highlight class="keyword">using</highlight><highlight class="normal"><sp/>std::endl;</highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight></codeline>
<codeline lineno="8" refid="classKalmanFull_17197ab6e7380790006394eabd3b97043" refkind="member"><highlight class="normal"><ref refid="classKalmanFull_19d7cc2235b643d9662cd9c8b8469747d" kindref="member" tooltip="For EKFfull;.">KalmanFull::KalmanFull</ref><sp/>(<sp/>mat<sp/>A0,<sp/>mat<sp/>B0,<sp/>mat<sp/>C0,<sp/>mat<sp/>D0,<sp/>mat<sp/>R0,<sp/>mat<sp/>Q0,<sp/>mat<sp/>P0,<sp/>vec<sp/>mu0<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="9"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dimx<sp/>=<sp/>A0.rows();</highlight></codeline>
<codeline lineno="10"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dimu<sp/>=<sp/>B0.cols();</highlight></codeline>
<codeline lineno="11"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dimy<sp/>=<sp/>C0.rows();</highlight></codeline>
<codeline lineno="12"><highlight class="normal"></highlight></codeline>
<codeline lineno="13"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_assert_debug<sp/>(<sp/>A0.cols()<sp/>==dimx,<sp/></highlight><highlight class="stringliteral">&quot;KalmanFull:<sp/>A<sp/>is<sp/>not<sp/>square&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="14"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_assert_debug<sp/>(<sp/>B0.rows()<sp/>==dimx,<sp/></highlight><highlight class="stringliteral">&quot;KalmanFull:<sp/>B<sp/>is<sp/>not<sp/>compatible&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="15"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_assert_debug<sp/>(<sp/>C0.cols()<sp/>==dimx,<sp/></highlight><highlight class="stringliteral">&quot;KalmanFull:<sp/>C<sp/>is<sp/>not<sp/>square&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_assert_debug<sp/>(<sp/>(<sp/>D0.rows()<sp/>==dimy<sp/>)<sp/>||<sp/>(<sp/>D0.cols()<sp/>==dimu<sp/>),<sp/></highlight><highlight class="stringliteral">&quot;KalmanFull:<sp/>D<sp/>is<sp/>not<sp/>compatible&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_assert_debug<sp/>(<sp/>(<sp/>R0.cols()<sp/>==dimy<sp/>)<sp/>||<sp/>(<sp/>R0.rows()<sp/>==dimy<sp/>),<sp/></highlight><highlight class="stringliteral">&quot;KalmanFull:<sp/>R<sp/>is<sp/>not<sp/>compatible&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_assert_debug<sp/>(<sp/>(<sp/>Q0.cols()<sp/>==dimx<sp/>)<sp/>||<sp/>(<sp/>Q0.rows()<sp/>==dimx<sp/>),<sp/></highlight><highlight class="stringliteral">&quot;KalmanFull:<sp/>Q<sp/>is<sp/>not<sp/>compatible&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="19"><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>A<sp/>=<sp/>A0;</highlight></codeline>
<codeline lineno="21"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>B<sp/>=<sp/>B0;</highlight></codeline>
<codeline lineno="22"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>C<sp/>=<sp/>C0;</highlight></codeline>
<codeline lineno="23"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>D<sp/>=<sp/>D0;</highlight></codeline>
<codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>R<sp/>=<sp/>R0;</highlight></codeline>
<codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Q<sp/>=<sp/>Q0;</highlight></codeline>
<codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanFull_1fb5aec635e2720cc5ac31bc01c18a68a" kindref="member" tooltip="Mean value of the posterior density.">mu</ref><sp/>=<sp/>mu0;</highlight></codeline>
<codeline lineno="27"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanFull_1b75dc059e84fa8ffc076203b30f926cc" kindref="member" tooltip="Variance of the posterior density.">P</ref><sp/>=<sp/>P0;</highlight></codeline>
<codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="29"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ll<sp/>=<sp/>0.0;</highlight></codeline>
<codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>evalll=</highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="31"><highlight class="normal">}</highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight></codeline>
<codeline lineno="33" refid="classKalmanFull_113a041cd98ff157703766be275a657bb" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classKalmanFull_113a041cd98ff157703766be275a657bb" kindref="member" tooltip="Here dt = [yt;ut] of appropriate dimensions.">KalmanFull::bayes</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>vec<sp/>&amp;dt<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="34"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_assert_debug<sp/>(<sp/>dt.length()<sp/>==<sp/>(<sp/>dimy+dimu<sp/>),</highlight><highlight class="stringliteral">&quot;KalmanFull::bayes<sp/>wrong<sp/>size<sp/>of<sp/>dt&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>u<sp/>=<sp/>dt.get<sp/>(<sp/>dimy,dimy+dimu-1<sp/>);</highlight></codeline>
<codeline lineno="37"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>y<sp/>=<sp/>dt.get<sp/>(<sp/>0,dimy-1<sp/>);</highlight></codeline>
<codeline lineno="38"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Time<sp/>update</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanFull_1fb5aec635e2720cc5ac31bc01c18a68a" kindref="member" tooltip="Mean value of the posterior density.">mu</ref><sp/>=<sp/>A*<ref refid="classKalmanFull_1fb5aec635e2720cc5ac31bc01c18a68a" kindref="member" tooltip="Mean value of the posterior density.">mu</ref><sp/>+<sp/>B*u;</highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanFull_1b75dc059e84fa8ffc076203b30f926cc" kindref="member" tooltip="Variance of the posterior density.">P</ref><sp/><sp/>=<sp/>A*<ref refid="classKalmanFull_1b75dc059e84fa8ffc076203b30f926cc" kindref="member" tooltip="Variance of the posterior density.">P</ref>*A.transpose()<sp/>+<sp/>Q;</highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Data<sp/>update</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>_Ry<sp/>=<sp/>C*<ref refid="classKalmanFull_1b75dc059e84fa8ffc076203b30f926cc" kindref="member" tooltip="Variance of the posterior density.">P</ref>*C.transpose()<sp/>+<sp/>R;</highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>_iRy<sp/>=<sp/>inv<sp/>(<sp/>_Ry<sp/>);</highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>_K<sp/>=<sp/><ref refid="classKalmanFull_1b75dc059e84fa8ffc076203b30f926cc" kindref="member" tooltip="Variance of the posterior density.">P</ref>*C.transpose()<sp/>*_iRy;</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanFull_1b75dc059e84fa8ffc076203b30f926cc" kindref="member" tooltip="Variance of the posterior density.">P</ref><sp/>-=<sp/>_K*C*<ref refid="classKalmanFull_1b75dc059e84fa8ffc076203b30f926cc" kindref="member" tooltip="Variance of the posterior density.">P</ref>;<sp/></highlight><highlight class="comment">//<sp/>P<sp/>=<sp/>P<sp/>-KCP;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanFull_1fb5aec635e2720cc5ac31bc01c18a68a" kindref="member" tooltip="Mean value of the posterior density.">mu</ref><sp/>+=<sp/>_K*<sp/>(<sp/>y-C*<ref refid="classKalmanFull_1fb5aec635e2720cc5ac31bc01c18a68a" kindref="member" tooltip="Mean value of the posterior density.">mu</ref>-D*u<sp/>);</highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>evalll<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//from<sp/>enorm</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>x=y-C*<ref refid="classKalmanFull_1fb5aec635e2720cc5ac31bc01c18a68a" kindref="member" tooltip="Mean value of the posterior density.">mu</ref>-D*u;</highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ll<sp/>=<sp/>-0.5*<sp/>(<sp/>R.cols()<sp/>*<sp/>1.83787706640935<sp/>+log<sp/>(<sp/>det<sp/>(<sp/>_Ry<sp/>)<sp/>)<sp/>+x*<sp/>(<sp/>_iRy*x<sp/>)<sp/>);</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="54"><highlight class="normal">};</highlight></codeline>
<codeline lineno="55"><highlight class="normal"></highlight></codeline>
<codeline lineno="56" refid="classKalmanFull_186ba216243ed95bb46d80d88775d16af" refkind="member"><highlight class="normal">std::ostream<sp/>&amp;<ref refid="classKalmanFull_186ba216243ed95bb46d80d88775d16af" kindref="member" tooltip="print elements of KF">operator&lt;&lt; </ref>(<sp/>std::ostream<sp/>&amp;os,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classKalmanFull" kindref="compound" tooltip="Basic Kalman filter with full matrices (education purpose only)! Will be deleted...">KalmanFull</ref><sp/>&amp;kf<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>os<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;mu:&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>kf.<ref refid="classKalmanFull_1fb5aec635e2720cc5ac31bc01c18a68a" kindref="member" tooltip="Mean value of the posterior density.">mu</ref><sp/>&lt;&lt;<sp/>endl<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;P:&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>kf.<ref refid="classKalmanFull_1b75dc059e84fa8ffc076203b30f926cc" kindref="member" tooltip="Variance of the posterior density.">P</ref><sp/>&lt;&lt;endl;</highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>os;</highlight></codeline>
<codeline lineno="59"><highlight class="normal">}</highlight></codeline>
<codeline lineno="60"><highlight class="normal"></highlight></codeline>
<codeline lineno="61"><highlight class="normal"></highlight></codeline>
<codeline lineno="62"><highlight class="normal"></highlight></codeline>
<codeline lineno="64" refid="classEKFfull_167ac4de96fd025197da767fe0472c7f7" refkind="member"><highlight class="normal"><ref refid="classEKFfull_167ac4de96fd025197da767fe0472c7f7" kindref="member" tooltip="Default constructor.">EKFfull::EKFfull</ref><sp/>(<sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>rvx0,<sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>rvy0,<sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>rvu0<sp/>)<sp/>:<sp/><ref refid="classBM" kindref="compound" tooltip="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</ref><sp/>(<sp/>rvx0<sp/>),E(rvx0)<sp/>{};</highlight></codeline>
<codeline lineno="65"><highlight class="normal"></highlight></codeline>
<codeline lineno="66" refid="classEKFfull_1fc753106e0d4cf68e4f2160fd54458c0" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classEKFfull_1fc753106e0d4cf68e4f2160fd54458c0" kindref="member" tooltip="Set nonlinear functions for mean values and covariance matrices.">EKFfull::set_parameters</ref><sp/>(<sp/><ref refid="classdiffbifn" kindref="compound" tooltip="Class representing a differentiable function of two variables .">diffbifn</ref>*<sp/>pfxu0,<sp/><sp/><ref refid="classdiffbifn" kindref="compound" tooltip="Class representing a differentiable function of two variables .">diffbifn</ref>*<sp/>phxu0,</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>mat<sp/>Q0,</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>mat<sp/>R0<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pfxu<sp/>=<sp/>pfxu0;</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>phxu<sp/>=<sp/>phxu0;</highlight></codeline>
<codeline lineno="69"><highlight class="normal"></highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dimx<sp/>=<sp/><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>();</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dimy<sp/>=<sp/>phxu0-&gt;<ref refid="classfnc_1a8891973d0ca48ce38e1886df45ca298" kindref="member" tooltip="access function">_dimy</ref>();</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dimu<sp/>=<sp/>phxu0-&gt;<ref refid="classdiffbifn_1fc8779acbff170611aff0ee70cee3879" kindref="member" tooltip="access function">_dimu</ref>();</highlight></codeline>
<codeline lineno="73"><highlight class="normal"></highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>A.set_size(dimx,dimx);</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>C.set_size(dimy,dimx);</highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//initialize<sp/>matrices<sp/>A<sp/>C,<sp/>later,<sp/>these<sp/>will<sp/>be<sp/>only<sp/>updated!</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pfxu-&gt;<ref refid="classdiffbifn_16d217a02d4fa13931258d4bebdd0feb4" kindref="member" tooltip="Evaluates  and writes result into A .">dfdx_cond</ref><sp/>(<sp/><ref refid="classKalmanFull_1fb5aec635e2720cc5ac31bc01c18a68a" kindref="member" tooltip="Mean value of the posterior density.">mu</ref>,zeros<sp/>(<sp/>dimu<sp/>),A,</highlight><highlight class="keyword">true</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>B.clear();</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>phxu-&gt;<ref refid="classdiffbifn_16d217a02d4fa13931258d4bebdd0feb4" kindref="member" tooltip="Evaluates  and writes result into A .">dfdx_cond</ref><sp/>(<sp/><ref refid="classKalmanFull_1fb5aec635e2720cc5ac31bc01c18a68a" kindref="member" tooltip="Mean value of the posterior density.">mu</ref>,zeros<sp/>(<sp/>dimu<sp/>),C,</highlight><highlight class="keyword">true</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>D.clear();</highlight></codeline>
<codeline lineno="81"><highlight class="normal"></highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>R<sp/>=<sp/>R0;</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Q<sp/>=<sp/>Q0;</highlight></codeline>
<codeline lineno="84"><highlight class="normal">}</highlight></codeline>
<codeline lineno="85"><highlight class="normal"></highlight></codeline>
<codeline lineno="86" refid="classEKFfull_18ca46f177e395fa714bbd8bd29ea43e0" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classEKFfull_18ca46f177e395fa714bbd8bd29ea43e0" kindref="member" tooltip="Here dt = [yt;ut] of appropriate dimensions.">EKFfull::bayes</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>vec<sp/>&amp;dt<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_assert_debug<sp/>(<sp/>dt.length()<sp/>==<sp/>(<sp/>dimy+dimu<sp/>),</highlight><highlight class="stringliteral">&quot;KalmanFull::bayes<sp/>wrong<sp/>size<sp/>of<sp/>dt&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="88"><highlight class="normal"></highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>u<sp/>=<sp/>dt.get<sp/>(<sp/>dimy,dimy+dimu-1<sp/>);</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>y<sp/>=<sp/>dt.get<sp/>(<sp/>0,dimy-1<sp/>);</highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pfxu-&gt;<ref refid="classdiffbifn_16d217a02d4fa13931258d4bebdd0feb4" kindref="member" tooltip="Evaluates  and writes result into A .">dfdx_cond</ref><sp/>(<sp/><ref refid="classKalmanFull_1fb5aec635e2720cc5ac31bc01c18a68a" kindref="member" tooltip="Mean value of the posterior density.">mu</ref>,zeros<sp/>(<sp/>dimu<sp/>),A,</highlight><highlight class="keyword">true</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>phxu-&gt;<ref refid="classdiffbifn_16d217a02d4fa13931258d4bebdd0feb4" kindref="member" tooltip="Evaluates  and writes result into A .">dfdx_cond</ref><sp/>(<sp/><ref refid="classKalmanFull_1fb5aec635e2720cc5ac31bc01c18a68a" kindref="member" tooltip="Mean value of the posterior density.">mu</ref>,zeros<sp/>(<sp/>dimu<sp/>),C,</highlight><highlight class="keyword">true</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="94"><highlight class="normal"></highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Time<sp/>update</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanFull_1fb5aec635e2720cc5ac31bc01c18a68a" kindref="member" tooltip="Mean value of the posterior density.">mu</ref><sp/>=<sp/>pfxu-&gt;<ref refid="classdiffbifn_1ad7673e16aa1a046b131b24c731c4632" kindref="member" tooltip="Evaluates  (VS: Do we really need common eval? ).">eval</ref>(<ref refid="classKalmanFull_1fb5aec635e2720cc5ac31bc01c18a68a" kindref="member" tooltip="Mean value of the posterior density.">mu</ref>,u);</highlight><highlight class="comment">//<sp/>A*mu<sp/>+<sp/>B*u;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanFull_1b75dc059e84fa8ffc076203b30f926cc" kindref="member" tooltip="Variance of the posterior density.">P</ref><sp/><sp/>=<sp/>A*<ref refid="classKalmanFull_1b75dc059e84fa8ffc076203b30f926cc" kindref="member" tooltip="Variance of the posterior density.">P</ref>*A.transpose()<sp/>+<sp/>Q;</highlight></codeline>
<codeline lineno="98"><highlight class="normal"></highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Data<sp/>update</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>_Ry<sp/>=<sp/>C*<ref refid="classKalmanFull_1b75dc059e84fa8ffc076203b30f926cc" kindref="member" tooltip="Variance of the posterior density.">P</ref>*C.transpose()<sp/>+<sp/>R;</highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>_iRy<sp/>=<sp/>inv<sp/>(<sp/>_Ry<sp/>);</highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>_K<sp/>=<sp/><ref refid="classKalmanFull_1b75dc059e84fa8ffc076203b30f926cc" kindref="member" tooltip="Variance of the posterior density.">P</ref>*C.transpose()<sp/>*_iRy;</highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanFull_1b75dc059e84fa8ffc076203b30f926cc" kindref="member" tooltip="Variance of the posterior density.">P</ref><sp/>-=<sp/>_K*C*<ref refid="classKalmanFull_1b75dc059e84fa8ffc076203b30f926cc" kindref="member" tooltip="Variance of the posterior density.">P</ref>;<sp/></highlight><highlight class="comment">//<sp/>P<sp/>=<sp/>P<sp/>-KCP;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>yp<sp/>=<sp/>phxu-&gt;<ref refid="classdiffbifn_1ad7673e16aa1a046b131b24c731c4632" kindref="member" tooltip="Evaluates  (VS: Do we really need common eval? ).">eval</ref>(<ref refid="classKalmanFull_1fb5aec635e2720cc5ac31bc01c18a68a" kindref="member" tooltip="Mean value of the posterior density.">mu</ref>,u);</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanFull_1fb5aec635e2720cc5ac31bc01c18a68a" kindref="member" tooltip="Mean value of the posterior density.">mu</ref><sp/>+=<sp/>_K*<sp/>(<sp/>y-yp<sp/>);</highlight></codeline>
<codeline lineno="106"><highlight class="normal"></highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>E.<ref refid="classenorm_1d892a38f03be12e572ea57d9689cef6b" kindref="member" tooltip="access function">set_mu</ref>(<ref refid="classKalmanFull_1fb5aec635e2720cc5ac31bc01c18a68a" kindref="member" tooltip="Mean value of the posterior density.">mu</ref>);</highlight></codeline>
<codeline lineno="108"><highlight class="normal"></highlight></codeline>
<codeline lineno="109"><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...">BM::evalll</ref><sp/>)<sp/>{</highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//from<sp/>enorm</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>x=y-yp;</highlight></codeline>
<codeline lineno="112"><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.">BM::ll</ref><sp/>=<sp/>-0.5*<sp/>(<sp/>R.cols()<sp/>*<sp/>1.83787706640935<sp/>+log<sp/>(<sp/>det<sp/>(<sp/>_Ry<sp/>)<sp/>)<sp/>+x*<sp/>(<sp/>_iRy*x<sp/>)<sp/>);</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="114"><highlight class="normal">};</highlight></codeline>
<codeline lineno="115"><highlight class="normal"></highlight></codeline>
<codeline lineno="116"><highlight class="normal"></highlight></codeline>
<codeline lineno="117"><highlight class="normal"></highlight></codeline>
<codeline lineno="118" refid="classKalmanCh_192fb227287af05c9f0078d523c7c9793" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classKalmanCh_192fb227287af05c9f0078d523c7c9793" kindref="member" tooltip="Set parameters with check of relevance.">KalmanCh::set_parameters</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>mat<sp/>&amp;A0,</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>mat<sp/>&amp;B0,</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>mat<sp/>&amp;C0,</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>mat<sp/>&amp;D0,</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref><sp/>&amp;R0,</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref><sp/>&amp;Q0<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="119"><highlight class="normal"></highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(<sp/>(<sp/><ref refid="classKalman" kindref="compound" tooltip="Kalman filter with covariance matrices in square root form.">Kalman&lt;chmat&gt;</ref>*<sp/>)<sp/></highlight><highlight class="keyword">this</highlight><highlight class="normal"><sp/>)-&gt;set_parameters<sp/>(<sp/>A0,B0,C0,D0,R0,Q0<sp/>);</highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Cholesky<sp/>special!</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanCh_194ee9da75b0e0f632e4a354988ca3798" kindref="member" tooltip="pre array (triangular matrix)">preA</ref>.clear();</highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanCh_194ee9da75b0e0f632e4a354988ca3798" kindref="member" tooltip="pre array (triangular matrix)">preA</ref>.set_submatrix<sp/>(<sp/>0,0,<ref refid="classKalman_111d171dc0e0ab111c56a70f98b97b3ec" kindref="member" tooltip="Matrix R in square-root form.">R</ref>.<ref refid="classchmat_19c50d31c999d85d8e9d8cf2b69b6ac8c" kindref="member" tooltip="Access function.">_Ch</ref>()<sp/>);</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanCh_194ee9da75b0e0f632e4a354988ca3798" kindref="member" tooltip="pre array (triangular matrix)">preA</ref>.set_submatrix<sp/>(<sp/><ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>+<ref refid="classKalman_139c8c403b46fa3b8c7da77cb2e3729eb" kindref="member" tooltip="cache of rv.count()">dimx</ref>,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>,<ref refid="classKalman_19b69015c800eb93f3ee49da23a6f55d9" kindref="member" tooltip="Matrix Q in square-root form.">Q</ref>.<ref refid="classchmat_19c50d31c999d85d8e9d8cf2b69b6ac8c" kindref="member" tooltip="Access function.">_Ch</ref>()<sp/>);</highlight></codeline>
<codeline lineno="125"><highlight class="normal">}</highlight></codeline>
<codeline lineno="126"><highlight class="normal"></highlight></codeline>
<codeline lineno="127"><highlight class="normal"></highlight></codeline>
<codeline lineno="128" refid="classKalmanCh_1cca758192846940409822b9bd778d4e1" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classKalmanCh_1cca758192846940409822b9bd778d4e1" kindref="member" tooltip="Here dt = [yt;ut] of appropriate dimensions.">KalmanCh::bayes</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>vec<sp/>&amp;dt<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="129"><highlight class="normal"></highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>u<sp/>=<sp/>dt.get<sp/>(<sp/><ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>+<ref refid="classKalman_1b0153795a1444b6968a86409c778d9ce" kindref="member" tooltip="cache of rvu.count()">dimu</ref>-1<sp/>);</highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>y<sp/>=<sp/>dt.get<sp/>(<sp/>0,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>-1<sp/>);</highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>pom(<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>);</highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//TODO<sp/>get<sp/>rid<sp/>of<sp/>Q<sp/>in<sp/>qr()!</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="135"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>Q;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="136"><highlight class="normal"></highlight></codeline>
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//R<sp/>and<sp/>Q<sp/>are<sp/>already<sp/>set<sp/>in<sp/>set_parameters()</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanCh_194ee9da75b0e0f632e4a354988ca3798" kindref="member" tooltip="pre array (triangular matrix)">preA</ref>.set_submatrix<sp/>(<sp/><ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>,0,<sp/>(<sp/><ref refid="classKalman_19fb808cc94a4c2652e1fb93be9bb7dcf" kindref="member" tooltip="cache of est.R">_P</ref>.<ref refid="classchmat_19c50d31c999d85d8e9d8cf2b69b6ac8c" kindref="member" tooltip="Access function.">_Ch</ref>()<sp/>)<sp/>*<ref refid="classKalman_186a805cd6515872d1132ad0d6eb5dc13" kindref="member" tooltip="Matrix C.">C</ref>.T()<sp/>);</highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Fixme<sp/>can<sp/>be<sp/>more<sp/>efficient<sp/>if<sp/>.T()<sp/>is<sp/>not<sp/>used</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanCh_194ee9da75b0e0f632e4a354988ca3798" kindref="member" tooltip="pre array (triangular matrix)">preA</ref>.set_submatrix<sp/>(<sp/><ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>,<sp/>(<sp/><ref refid="classKalman_19fb808cc94a4c2652e1fb93be9bb7dcf" kindref="member" tooltip="cache of est.R">_P</ref>.<ref refid="classchmat_19c50d31c999d85d8e9d8cf2b69b6ac8c" kindref="member" tooltip="Access function.">_Ch</ref>()<sp/>)<sp/>*<ref refid="classKalman_15e02efe86ee91e9c74b93b425fe060b9" kindref="member" tooltip="Matrix A.">A</ref>.T()<sp/>);</highlight></codeline>
<codeline lineno="141"><highlight class="normal"></highlight></codeline>
<codeline lineno="142"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(<sp/>!qr<sp/>(<sp/>preA,Q,postA<sp/>)<sp/>)<sp/>it_warning<sp/>(<sp/>&quot;QR<sp/>in<sp/>kalman<sp/>unstable!&quot;<sp/>);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>!qr<sp/>(<sp/><ref refid="classKalmanCh_194ee9da75b0e0f632e4a354988ca3798" kindref="member" tooltip="pre array (triangular matrix)">preA</ref>,<ref refid="classKalmanCh_10d31a26dc72b5846cfe5af3ccb63ac87" kindref="member" tooltip="post array (triangular matrix)">postA</ref><sp/>)<sp/>)<sp/>{it_warning<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;QR<sp/>in<sp/>kalman<sp/>unstable!&quot;</highlight><highlight class="normal"><sp/>);}</highlight></codeline>
<codeline lineno="144"><highlight class="normal"></highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(<sp/><ref refid="classKalman_145c9f928d2d62e0c884900fb3380f904" kindref="member" tooltip="cache of fy.R">_Ry</ref>.<ref refid="classchmat_19c50d31c999d85d8e9d8cf2b69b6ac8c" kindref="member" tooltip="Access function.">_Ch</ref>()<sp/>)<sp/>=<ref refid="classKalmanCh_10d31a26dc72b5846cfe5af3ccb63ac87" kindref="member" tooltip="post array (triangular matrix)">postA</ref><sp/>(<sp/>0,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>-1,<sp/>0,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>-1<sp/>);</highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalman_1d422f51467c7a06174af2476d2826132" kindref="member" tooltip="placeholder for Kalman gain">_K</ref><sp/>=<sp/>inv(<ref refid="classKalman_15e02efe86ee91e9c74b93b425fe060b9" kindref="member" tooltip="Matrix A.">A</ref>)*(<sp/><ref refid="classKalmanCh_10d31a26dc72b5846cfe5af3ccb63ac87" kindref="member" tooltip="post array (triangular matrix)">postA</ref><sp/>(<sp/>0,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>-1<sp/>,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>+<ref refid="classKalman_139c8c403b46fa3b8c7da77cb2e3729eb" kindref="member" tooltip="cache of rv.count()">dimx</ref>-1<sp/>)<sp/>).T();</highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(<sp/><ref refid="classKalman_19fb808cc94a4c2652e1fb93be9bb7dcf" kindref="member" tooltip="cache of est.R">_P</ref>.<ref refid="classchmat_19c50d31c999d85d8e9d8cf2b69b6ac8c" kindref="member" tooltip="Access function.">_Ch</ref>()<sp/>)<sp/>=<sp/><ref refid="classKalmanCh_10d31a26dc72b5846cfe5af3ccb63ac87" kindref="member" tooltip="post array (triangular matrix)">postA</ref><sp/>(<sp/><ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>+<ref refid="classKalman_139c8c403b46fa3b8c7da77cb2e3729eb" kindref="member" tooltip="cache of rv.count()">dimx</ref>-1,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>+<ref refid="classKalman_139c8c403b46fa3b8c7da77cb2e3729eb" kindref="member" tooltip="cache of rv.count()">dimx</ref>-1<sp/>);</highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalman_1fe803a81d2d847b0b1db3c6b29c18061" kindref="member" tooltip="cache of est.mu">_mu</ref><sp/>=<sp/><ref refid="classKalman_15e02efe86ee91e9c74b93b425fe060b9" kindref="member" tooltip="Matrix A.">A</ref>*<sp/>(<sp/><ref refid="classKalman_1fe803a81d2d847b0b1db3c6b29c18061" kindref="member" tooltip="cache of est.mu">_mu</ref><sp/>)<sp/>+<sp/><ref refid="classKalman_1dc87704284a6c0bca13bf51f4345a50a" kindref="member" tooltip="Matrix B.">B</ref>*u;</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalman_1764bbc95238eda11fc81c5ebd0b1dcfd" kindref="member" tooltip="cache of fy.mu">_yp</ref><sp/>=<sp/><ref refid="classKalman_186a805cd6515872d1132ad0d6eb5dc13" kindref="member" tooltip="Matrix C.">C</ref>*<ref refid="classKalman_1fe803a81d2d847b0b1db3c6b29c18061" kindref="member" tooltip="cache of est.mu">_mu</ref><sp/>-<ref refid="classKalman_1d69f774ba3335c970c1c5b1d182f4dd1" kindref="member" tooltip="Matrix D.">D</ref>*u;</highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>backward_substitution(<ref refid="classKalman_145c9f928d2d62e0c884900fb3380f904" kindref="member" tooltip="cache of fy.R">_Ry</ref>.<ref refid="classchmat_19c50d31c999d85d8e9d8cf2b69b6ac8c" kindref="member" tooltip="Access function.">_Ch</ref>(),(<sp/>y-_yp),pom);</highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalman_1fe803a81d2d847b0b1db3c6b29c18061" kindref="member" tooltip="cache of est.mu">_mu</ref><sp/>+=<sp/><sp/>(<sp/><ref refid="classKalman_1d422f51467c7a06174af2476d2826132" kindref="member" tooltip="placeholder for Kalman gain">_K</ref><sp/>)<sp/>*<sp/>pom;</highlight></codeline>
<codeline lineno="154"><highlight class="normal"></highlight></codeline>
<codeline lineno="155"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;P:&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<ref refid="classKalman_19fb808cc94a4c2652e1fb93be9bb7dcf" kindref="member" tooltip="cache of est.R">_P</ref>.<ref refid="classchmat_1a37e2c726e4fc3ad50b26ac2ca6c1452" kindref="member" tooltip="Conversion to full matrix.">to_mat</ref>()<sp/>&lt;&lt;endl;</highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;Ry:&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<ref refid="classKalman_145c9f928d2d62e0c884900fb3380f904" kindref="member" tooltip="cache of fy.R">_Ry</ref>.<ref refid="classchmat_1a37e2c726e4fc3ad50b26ac2ca6c1452" kindref="member" tooltip="Conversion to full matrix.">to_mat</ref>()<sp/>&lt;&lt;endl;</highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;_K:&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<ref refid="classKalman_1d422f51467c7a06174af2476d2826132" kindref="member" tooltip="placeholder for Kalman gain">_K</ref><sp/>&lt;&lt;endl;</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="159"><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>==</highlight><highlight class="keyword">true</highlight><highlight class="normal"><sp/>)<sp/>{<sp/></highlight><highlight class="comment">//likelihood<sp/>of<sp/>observation<sp/>y</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="160"><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>=<ref refid="classKalman_1e580ab06483952bd03f2e651763e184f" kindref="member" tooltip="preditive density on $y_t$">fy</ref>.<ref refid="classenorm_1609a7c33dbb4fdfab050f3bdd1122401" kindref="member" tooltip="Compute log-probability of argument val.">evalpdflog</ref><sp/>(<sp/>y<sp/>);</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="162"><highlight class="normal">}</highlight></codeline>
<codeline lineno="163"><highlight class="normal"></highlight></codeline>
<codeline lineno="164"><highlight class="normal"></highlight></codeline>
<codeline lineno="165" refid="classEKFCh_1e9e39a9204db3dda88d06e47c1e19064" refkind="member"><highlight class="normal"><ref refid="classEKFCh_1e9e39a9204db3dda88d06e47c1e19064" kindref="member" tooltip="Default constructor.">EKFCh::EKFCh</ref><sp/>(<sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>rvx0,<sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>rvy0,<sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>rvu0<sp/>)<sp/>:<sp/><ref refid="classKalmanCh" kindref="compound" tooltip="Kalman filter in square root form.">KalmanCh</ref><sp/>(<sp/>rvx0,rvy0,rvu0<sp/>)<sp/>{}</highlight></codeline>
<codeline lineno="166"><highlight class="normal"></highlight></codeline>
<codeline lineno="167" refid="classEKFCh_10216bed270df59fe65d0d62d41f8257c" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classEKFCh_10216bed270df59fe65d0d62d41f8257c" kindref="member" tooltip="Set nonlinear functions for mean values and covariance matrices.">EKFCh::set_parameters</ref><sp/>(<sp/><ref refid="classdiffbifn" kindref="compound" tooltip="Class representing a differentiable function of two variables .">diffbifn</ref>*<sp/>pfxu0,<sp/><sp/><ref refid="classdiffbifn" kindref="compound" tooltip="Class representing a differentiable function of two variables .">diffbifn</ref>*<sp/>phxu0,</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref><sp/>Q0,</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classchmat" kindref="compound" tooltip="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</ref><sp/>R0<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pfxu<sp/>=<sp/>pfxu0;</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>phxu<sp/>=<sp/>phxu0;</highlight></codeline>
<codeline lineno="170"><highlight class="normal"></highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//initialize<sp/>matrices<sp/>A<sp/>C,<sp/>later,<sp/>these<sp/>will<sp/>be<sp/>only<sp/>updated!</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pfxu-&gt;<ref refid="classdiffbifn_16d217a02d4fa13931258d4bebdd0feb4" kindref="member" tooltip="Evaluates  and writes result into A .">dfdx_cond</ref><sp/>(<sp/><ref refid="classKalman_1fe803a81d2d847b0b1db3c6b29c18061" kindref="member" tooltip="cache of est.mu">_mu</ref>,zeros<sp/>(<sp/><ref refid="classKalman_1b0153795a1444b6968a86409c778d9ce" kindref="member" tooltip="cache of rvu.count()">dimu</ref><sp/>),<ref refid="classKalman_15e02efe86ee91e9c74b93b425fe060b9" kindref="member" tooltip="Matrix A.">A</ref>,</highlight><highlight class="keyword">true</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="173"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/>pfxu-&gt;dfdu_cond<sp/>(<sp/>*_mu,zeros<sp/>(<sp/>dimu<sp/>),B,true<sp/>);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalman_1dc87704284a6c0bca13bf51f4345a50a" kindref="member" tooltip="Matrix B.">B</ref>.clear();</highlight></codeline>
<codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>phxu-&gt;<ref refid="classdiffbifn_16d217a02d4fa13931258d4bebdd0feb4" kindref="member" tooltip="Evaluates  and writes result into A .">dfdx_cond</ref><sp/>(<sp/><ref refid="classKalman_1fe803a81d2d847b0b1db3c6b29c18061" kindref="member" tooltip="cache of est.mu">_mu</ref>,zeros<sp/>(<sp/><ref refid="classKalman_1b0153795a1444b6968a86409c778d9ce" kindref="member" tooltip="cache of rvu.count()">dimu</ref><sp/>),<ref refid="classKalman_186a805cd6515872d1132ad0d6eb5dc13" kindref="member" tooltip="Matrix C.">C</ref>,</highlight><highlight class="keyword">true</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="176"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/>phxu-&gt;dfdu_cond<sp/>(<sp/>*_mu,zeros<sp/>(<sp/>dimu<sp/>),D,true<sp/>);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalman_1d69f774ba3335c970c1c5b1d182f4dd1" kindref="member" tooltip="Matrix D.">D</ref>.clear();</highlight></codeline>
<codeline lineno="178"><highlight class="normal"></highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalman_111d171dc0e0ab111c56a70f98b97b3ec" kindref="member" tooltip="Matrix R in square-root form.">R</ref><sp/>=<sp/>R0;</highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalman_19b69015c800eb93f3ee49da23a6f55d9" kindref="member" tooltip="Matrix Q in square-root form.">Q</ref><sp/>=<sp/>Q0;</highlight></codeline>
<codeline lineno="181"><highlight class="normal"></highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Cholesky<sp/>special!</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanCh_194ee9da75b0e0f632e4a354988ca3798" kindref="member" tooltip="pre array (triangular matrix)">preA</ref>.clear();</highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanCh_194ee9da75b0e0f632e4a354988ca3798" kindref="member" tooltip="pre array (triangular matrix)">preA</ref>.set_submatrix<sp/>(<sp/>0,0,<ref refid="classKalman_111d171dc0e0ab111c56a70f98b97b3ec" kindref="member" tooltip="Matrix R in square-root form.">R</ref>.<ref refid="classchmat_19c50d31c999d85d8e9d8cf2b69b6ac8c" kindref="member" tooltip="Access function.">_Ch</ref>()<sp/>);</highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanCh_194ee9da75b0e0f632e4a354988ca3798" kindref="member" tooltip="pre array (triangular matrix)">preA</ref>.set_submatrix<sp/>(<sp/><ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>+<ref refid="classKalman_139c8c403b46fa3b8c7da77cb2e3729eb" kindref="member" tooltip="cache of rv.count()">dimx</ref>,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>,<ref refid="classKalman_19b69015c800eb93f3ee49da23a6f55d9" kindref="member" tooltip="Matrix Q in square-root form.">Q</ref>.<ref refid="classchmat_19c50d31c999d85d8e9d8cf2b69b6ac8c" kindref="member" tooltip="Access function.">_Ch</ref>()<sp/>);</highlight></codeline>
<codeline lineno="186"><highlight class="normal">}</highlight></codeline>
<codeline lineno="187"><highlight class="normal"></highlight></codeline>
<codeline lineno="188"><highlight class="normal"></highlight></codeline>
<codeline lineno="189" refid="classEKFCh_196f6edda324a0b7ef8b4e86cc7af60c1" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classEKFCh_196f6edda324a0b7ef8b4e86cc7af60c1" kindref="member" tooltip="Here dt = [yt;ut] of appropriate dimensions.">EKFCh::bayes</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>vec<sp/>&amp;dt<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="190"><highlight class="normal"></highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>pom(<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>);</highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>u<sp/>=<sp/>dt.get<sp/>(<sp/><ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>+<ref refid="classKalman_1b0153795a1444b6968a86409c778d9ce" kindref="member" tooltip="cache of rvu.count()">dimu</ref>-1<sp/>);</highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>y<sp/>=<sp/>dt.get<sp/>(<sp/>0,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>-1<sp/>);</highlight></codeline>
<codeline lineno="194"><highlight class="normal"></highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pfxu-&gt;<ref refid="classdiffbifn_16d217a02d4fa13931258d4bebdd0feb4" kindref="member" tooltip="Evaluates  and writes result into A .">dfdx_cond</ref><sp/>(<sp/><ref refid="classKalman_1fe803a81d2d847b0b1db3c6b29c18061" kindref="member" tooltip="cache of est.mu">_mu</ref>,u,<ref refid="classKalman_15e02efe86ee91e9c74b93b425fe060b9" kindref="member" tooltip="Matrix A.">A</ref>,</highlight><highlight class="keyword">false</highlight><highlight class="normal"><sp/>);<sp/></highlight><highlight class="comment">//update<sp/>A<sp/>by<sp/>a<sp/>derivative<sp/>of<sp/>fx</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="196"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>phxu-&gt;<ref refid="classdiffbifn_16d217a02d4fa13931258d4bebdd0feb4" kindref="member" tooltip="Evaluates  and writes result into A .">dfdx_cond</ref><sp/>(<sp/><ref refid="classKalman_1fe803a81d2d847b0b1db3c6b29c18061" kindref="member" tooltip="cache of est.mu">_mu</ref>,u,<ref refid="classKalman_186a805cd6515872d1132ad0d6eb5dc13" kindref="member" tooltip="Matrix C.">C</ref>,</highlight><highlight class="keyword">false</highlight><highlight class="normal"><sp/>);<sp/></highlight><highlight class="comment">//update<sp/>A<sp/>by<sp/>a<sp/>derivative<sp/>of<sp/>fx</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="197"><highlight class="normal"></highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//R<sp/>and<sp/>Q<sp/>are<sp/>already<sp/>set<sp/>in<sp/>set_parameters()</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanCh_194ee9da75b0e0f632e4a354988ca3798" kindref="member" tooltip="pre array (triangular matrix)">preA</ref>.set_submatrix<sp/>(<sp/><ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>,0,<sp/>(<sp/><ref refid="classKalman_19fb808cc94a4c2652e1fb93be9bb7dcf" kindref="member" tooltip="cache of est.R">_P</ref>.<ref refid="classchmat_19c50d31c999d85d8e9d8cf2b69b6ac8c" kindref="member" tooltip="Access function.">_Ch</ref>()<sp/>)<sp/>*<ref refid="classKalman_186a805cd6515872d1132ad0d6eb5dc13" kindref="member" tooltip="Matrix C.">C</ref>.T()<sp/>);</highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Fixme<sp/>can<sp/>be<sp/>more<sp/>efficient<sp/>if<sp/>.T()<sp/>is<sp/>not<sp/>used</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="201"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalmanCh_194ee9da75b0e0f632e4a354988ca3798" kindref="member" tooltip="pre array (triangular matrix)">preA</ref>.set_submatrix<sp/>(<sp/><ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>,<sp/>(<sp/><ref refid="classKalman_19fb808cc94a4c2652e1fb93be9bb7dcf" kindref="member" tooltip="cache of est.R">_P</ref>.<ref refid="classchmat_19c50d31c999d85d8e9d8cf2b69b6ac8c" kindref="member" tooltip="Access function.">_Ch</ref>()<sp/>)<sp/>*<ref refid="classKalman_15e02efe86ee91e9c74b93b425fe060b9" kindref="member" tooltip="Matrix A.">A</ref>.T()<sp/>);</highlight></codeline>
<codeline lineno="202"><highlight class="normal"></highlight></codeline>
<codeline lineno="203"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>Sttm<sp/>=<sp/>_P-&gt;to_mat();</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="204"><highlight class="normal"></highlight></codeline>
<codeline lineno="205"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(<sp/>!qr<sp/>(<sp/>preA,Q,postA<sp/>)<sp/>)<sp/>it_warning<sp/>(<sp/>&quot;QR<sp/>in<sp/>kalman<sp/>unstable!&quot;<sp/>);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>!qr<sp/>(<sp/><ref refid="classKalmanCh_194ee9da75b0e0f632e4a354988ca3798" kindref="member" tooltip="pre array (triangular matrix)">preA</ref>,<ref refid="classKalmanCh_10d31a26dc72b5846cfe5af3ccb63ac87" kindref="member" tooltip="post array (triangular matrix)">postA</ref><sp/>)<sp/>)<sp/>{it_warning<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;QR<sp/>in<sp/>kalman<sp/>unstable!&quot;</highlight><highlight class="normal"><sp/>);}</highlight></codeline>
<codeline lineno="207"><highlight class="normal"></highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(<sp/><ref refid="classKalman_145c9f928d2d62e0c884900fb3380f904" kindref="member" tooltip="cache of fy.R">_Ry</ref>.<ref refid="classchmat_19c50d31c999d85d8e9d8cf2b69b6ac8c" kindref="member" tooltip="Access function.">_Ch</ref>()<sp/>)<sp/>=<ref refid="classKalmanCh_10d31a26dc72b5846cfe5af3ccb63ac87" kindref="member" tooltip="post array (triangular matrix)">postA</ref><sp/>(<sp/>0,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>-1,<sp/>0,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>-1<sp/>);</highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalman_1d422f51467c7a06174af2476d2826132" kindref="member" tooltip="placeholder for Kalman gain">_K</ref><sp/>=<sp/>inv(<ref refid="classKalman_15e02efe86ee91e9c74b93b425fe060b9" kindref="member" tooltip="Matrix A.">A</ref>)*(<sp/><ref refid="classKalmanCh_10d31a26dc72b5846cfe5af3ccb63ac87" kindref="member" tooltip="post array (triangular matrix)">postA</ref><sp/>(<sp/>0,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>-1<sp/>,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>+<ref refid="classKalman_139c8c403b46fa3b8c7da77cb2e3729eb" kindref="member" tooltip="cache of rv.count()">dimx</ref>-1<sp/>)<sp/>).T();</highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(<sp/><ref refid="classKalman_19fb808cc94a4c2652e1fb93be9bb7dcf" kindref="member" tooltip="cache of est.R">_P</ref>.<ref refid="classchmat_19c50d31c999d85d8e9d8cf2b69b6ac8c" kindref="member" tooltip="Access function.">_Ch</ref>()<sp/>)<sp/>=<sp/><ref refid="classKalmanCh_10d31a26dc72b5846cfe5af3ccb63ac87" kindref="member" tooltip="post array (triangular matrix)">postA</ref><sp/>(<sp/><ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>+<ref refid="classKalman_139c8c403b46fa3b8c7da77cb2e3729eb" kindref="member" tooltip="cache of rv.count()">dimx</ref>-1,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>,<ref refid="classKalman_1ba17b956df1e38b31fbbc299c8213b6a" kindref="member" tooltip="cache of rvy.count()">dimy</ref>+<ref refid="classKalman_139c8c403b46fa3b8c7da77cb2e3729eb" kindref="member" tooltip="cache of rv.count()">dimx</ref>-1<sp/>);</highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="212"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>iRY<sp/>=<sp/>inv(_Ry-&gt;to_mat());</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="213"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>Stt<sp/>=<sp/>Sttm<sp/>-<sp/>Sttm<sp/>*<sp/>C.T()<sp/>*<sp/>iRY<sp/>*<sp/>C<sp/>*<sp/>Sttm;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="214"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>_K2<sp/>=<sp/>Stt*C.T()*inv(R.to_mat());</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="215"><highlight class="normal"></highlight></codeline>
<codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>prediction</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="217"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalman_1fe803a81d2d847b0b1db3c6b29c18061" kindref="member" tooltip="cache of est.mu">_mu</ref><sp/>=<sp/>pfxu-&gt;<ref refid="classdiffbifn_1ad7673e16aa1a046b131b24c731c4632" kindref="member" tooltip="Evaluates  (VS: Do we really need common eval? ).">eval</ref><sp/>(<sp/><ref refid="classKalman_1fe803a81d2d847b0b1db3c6b29c18061" kindref="member" tooltip="cache of est.mu">_mu</ref><sp/>,u<sp/>);</highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalman_1764bbc95238eda11fc81c5ebd0b1dcfd" kindref="member" tooltip="cache of fy.mu">_yp</ref><sp/>=<sp/>phxu-&gt;<ref refid="classdiffbifn_1ad7673e16aa1a046b131b24c731c4632" kindref="member" tooltip="Evaluates  (VS: Do we really need common eval? ).">eval</ref><sp/>(<sp/><ref refid="classKalman_1fe803a81d2d847b0b1db3c6b29c18061" kindref="member" tooltip="cache of est.mu">_mu</ref>,u<sp/>);</highlight></codeline>
<codeline lineno="219"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="220"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>mu2<sp/>=<sp/>*_mu<sp/>+<sp/>(<sp/>_K2<sp/>)<sp/>*<sp/>(<sp/>y-*_yp<sp/>);*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//correction<sp/>//=<sp/>initial<sp/>value<sp/>is<sp/>already<sp/>prediction!</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>backward_substitution(<ref refid="classKalman_145c9f928d2d62e0c884900fb3380f904" kindref="member" tooltip="cache of fy.R">_Ry</ref>.<ref refid="classchmat_19c50d31c999d85d8e9d8cf2b69b6ac8c" kindref="member" tooltip="Access function.">_Ch</ref>(),(<sp/>y-<ref refid="classKalman_1764bbc95238eda11fc81c5ebd0b1dcfd" kindref="member" tooltip="cache of fy.mu">_yp</ref><sp/>),pom);</highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalman_1fe803a81d2d847b0b1db3c6b29c18061" kindref="member" tooltip="cache of est.mu">_mu</ref><sp/>+=<sp/>(<sp/><ref refid="classKalman_1d422f51467c7a06174af2476d2826132" kindref="member" tooltip="placeholder for Kalman gain">_K</ref><sp/>)<sp/>*pom<sp/>;</highlight></codeline>
<codeline lineno="225"><highlight class="normal"></highlight></codeline>
<codeline lineno="226"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/><sp/><sp/><sp/><sp/>_K<sp/>=<sp/>(_P-&gt;to_mat())*C.transpose()<sp/>*<sp/>(<sp/>_iRy-&gt;to_mat()<sp/>);</highlight></codeline>
<codeline lineno="227"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*_mu<sp/>=<sp/>pfxu-&gt;eval<sp/>(<sp/>*_mu<sp/>,u<sp/>)<sp/>+<sp/>(<sp/>_K<sp/>)*<sp/>(<sp/>y-*_yp<sp/>);*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="228"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;P:&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<ref refid="classKalman_19fb808cc94a4c2652e1fb93be9bb7dcf" kindref="member" tooltip="cache of est.R">_P</ref>.<ref refid="classchmat_1a37e2c726e4fc3ad50b26ac2ca6c1452" kindref="member" tooltip="Conversion to full matrix.">to_mat</ref>()<sp/>&lt;&lt;endl;</highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;Ry:&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<ref refid="classKalman_145c9f928d2d62e0c884900fb3380f904" kindref="member" tooltip="cache of fy.R">_Ry</ref>.<ref refid="classchmat_1a37e2c726e4fc3ad50b26ac2ca6c1452" kindref="member" tooltip="Conversion to full matrix.">to_mat</ref>()<sp/>&lt;&lt;endl;</highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;_K:&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<ref refid="classKalman_1d422f51467c7a06174af2476d2826132" kindref="member" tooltip="placeholder for Kalman gain">_K</ref><sp/>&lt;&lt;endl;</highlight></codeline>
<codeline lineno="232"><highlight class="normal"></highlight></codeline>
<codeline lineno="233"><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>==</highlight><highlight class="keyword">true</highlight><highlight class="normal"><sp/>)<sp/>{<sp/></highlight><highlight class="comment">//likelihood<sp/>of<sp/>observation<sp/>y</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="234"><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>=<ref refid="classKalman_1e580ab06483952bd03f2e651763e184f" kindref="member" tooltip="preditive density on $y_t$">fy</ref>.<ref refid="classenorm_1609a7c33dbb4fdfab050f3bdd1122401" kindref="member" tooltip="Compute log-probability of argument val.">evalpdflog</ref><sp/>(<sp/>y<sp/>);</highlight></codeline>
<codeline lineno="235"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="236"><highlight class="normal">}</highlight></codeline>
<codeline lineno="237"><highlight class="normal"></highlight></codeline>
<codeline lineno="238" refid="classKFcondQR_1c9ecf292a85327aa6309c9fd70ceb606" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classKFcondQR_1c9ecf292a85327aa6309c9fd70ceb606" kindref="member" tooltip="Substitute val for rvc.">KFcondQR::condition</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>vec<sp/>&amp;QR<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_assert_debug<sp/>(<sp/>QR.length()<sp/>==<sp/>(<sp/><ref refid="classBMcond_19ba793c8ec453f04d372d17195ed8dec" kindref="member" tooltip="Identificator of the conditioning variable.">rvc</ref>.<ref refid="classRV_1f5c7b8bd589eef09ccdf3329a0addea0" kindref="member" tooltip="Return number of scalars in the RV.">count</ref>()<sp/>),</highlight><highlight class="stringliteral">&quot;KFcondRQ:<sp/>conditioning<sp/>by<sp/>incompatible<sp/>vector&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="240"><highlight class="normal"></highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalman_19b69015c800eb93f3ee49da23a6f55d9" kindref="member" tooltip="Matrix Q in square-root form.">Q</ref>.<ref refid="classldmat_10884a613b94fde61bfc84288e73ce57f" kindref="member" tooltip="Access functions.">setD</ref><sp/>(<sp/>QR<sp/>(<sp/>0,<sp/><ref refid="classKalman_139c8c403b46fa3b8c7da77cb2e3729eb" kindref="member" tooltip="cache of rv.count()">dimx</ref>-1<sp/>)<sp/>);</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalman_111d171dc0e0ab111c56a70f98b97b3ec" kindref="member" tooltip="Matrix R in square-root form.">R</ref>.<ref refid="classldmat_10884a613b94fde61bfc84288e73ce57f" kindref="member" tooltip="Access functions.">setD</ref><sp/>(<sp/>QR<sp/>(<sp/><ref refid="classKalman_139c8c403b46fa3b8c7da77cb2e3729eb" kindref="member" tooltip="cache of rv.count()">dimx</ref>,<sp/>-1<sp/>)<sp/>);</highlight></codeline>
<codeline lineno="243"><highlight class="normal">};</highlight></codeline>
<codeline lineno="244"><highlight class="normal"></highlight></codeline>
<codeline lineno="245" refid="classKFcondR_18c0721e47879bb8840d829db7a174a7f" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classKFcondR_18c0721e47879bb8840d829db7a174a7f" kindref="member" tooltip="Substitute val for rvc.">KFcondR::condition</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>vec<sp/>&amp;R0<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_assert_debug<sp/>(<sp/>R0.length()<sp/>==<sp/>(<sp/><ref refid="classBMcond_19ba793c8ec453f04d372d17195ed8dec" kindref="member" tooltip="Identificator of the conditioning variable.">rvc</ref>.<ref refid="classRV_1f5c7b8bd589eef09ccdf3329a0addea0" kindref="member" tooltip="Return number of scalars in the RV.">count</ref>()<sp/>),</highlight><highlight class="stringliteral">&quot;KFcondR:<sp/>conditioning<sp/>by<sp/>incompatible<sp/>vector&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="247"><highlight class="normal"></highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classKalman_111d171dc0e0ab111c56a70f98b97b3ec" kindref="member" tooltip="Matrix R in square-root form.">R</ref>.<ref refid="classldmat_10884a613b94fde61bfc84288e73ce57f" kindref="member" tooltip="Access functions.">setD</ref><sp/>(<sp/>R0<sp/>);</highlight></codeline>
<codeline lineno="249"><highlight class="normal">};</highlight></codeline>
<codeline lineno="250"><highlight class="normal"></highlight></codeline>
<codeline lineno="251"><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="/home/smidl/work/git/mixpp/bdm/estim/libKF.cpp"/>
  </compounddef>
</doxygen>
