root/doc/xml/arx__c_8cpp.xml @ 218

Revision 187, 9.3 kB (checked in by smidl, 16 years ago)

doc

Line 
1<?xml version='1.0' encoding='UTF-8' standalone='no'?>
2<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.5.6">
3  <compounddef id="arx__c_8cpp" kind="file">
4    <compoundname>arx_c.cpp</compoundname>
5    <includes refid="arx_8h" local="yes">../../bdm/estim/arx.h</includes>
6    <incdepgraph>
7      <node id="504">
8        <label>work/git/mixpp/matlab/mex/arx_c.cpp</label>
9        <link refid="arx_c.cpp"/>
10        <childnode refid="505" relation="include">
11        </childnode>
12      </node>
13      <node id="508">
14        <label>libBM.h</label>
15        <link refid="libBM_8h"/>
16        <childnode refid="506" relation="include">
17        </childnode>
18      </node>
19      <node id="511">
20        <label>../itpp_ext.h</label>
21        <link refid="itpp__ext_8h-source"/>
22        <childnode refid="506" relation="include">
23        </childnode>
24      </node>
25      <node id="509">
26        <label>../stat/libEF.h</label>
27        <link refid="libEF_8h"/>
28        <childnode refid="506" relation="include">
29        </childnode>
30        <childnode refid="510" relation="include">
31        </childnode>
32        <childnode refid="508" relation="include">
33        </childnode>
34        <childnode refid="511" relation="include">
35        </childnode>
36      </node>
37      <node id="505">
38        <label>../../bdm/estim/arx.h</label>
39        <link refid="arx_8h"/>
40        <childnode refid="506" relation="include">
41        </childnode>
42        <childnode refid="507" relation="include">
43        </childnode>
44        <childnode refid="509" relation="include">
45        </childnode>
46      </node>
47      <node id="507">
48        <label>../stat/libFN.h</label>
49        <link refid="libFN_8h-source"/>
50        <childnode refid="506" relation="include">
51        </childnode>
52        <childnode refid="508" relation="include">
53        </childnode>
54      </node>
55      <node id="506">
56        <label>itpp/itbase.h</label>
57      </node>
58      <node id="510">
59        <label>../math/libDC.h</label>
60        <link refid="libDC_8h"/>
61        <childnode refid="506" relation="include">
62        </childnode>
63      </node>
64    </incdepgraph>
65      <sectiondef kind="func">
66      <memberdef kind="function" id="arx__c_8cpp_1e66f6b31b5ad750f1fe042a706a4e3d4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
67        <type>int</type>
68        <definition>int main</definition>
69        <argsstring>()</argsstring>
70        <name>main</name>
71        <briefdescription>
72        </briefdescription>
73        <detaileddescription>
74        </detaileddescription>
75        <inbodydescription>
76        </inbodydescription>
77        <location file="/home/smidl/work/git/mixpp/matlab/mex/arx_c.cpp" line="5" bodyfile="/home/smidl/work/git/mixpp/matlab/mex/arx_c.cpp" bodystart="5" bodyend="33"/>
78      </memberdef>
79      </sectiondef>
80    <briefdescription>
81    </briefdescription>
82    <detaileddescription>
83    </detaileddescription>
84    <programlisting>
85<codeline lineno="1"><highlight class="preprocessor">#include<sp/>&quot;../../bdm/estim/arx.h&quot;</highlight><highlight class="normal"></highlight></codeline>
86<codeline lineno="2"><highlight class="normal"></highlight></codeline>
87<codeline lineno="3"><highlight class="normal"></highlight><highlight class="keyword">using<sp/>namespace<sp/></highlight><highlight class="normal">itpp;</highlight></codeline>
88<codeline lineno="4"><highlight class="normal"></highlight></codeline>
89<codeline lineno="5"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="sim__var_8cpp_1e66f6b31b5ad750f1fe042a706a4e3d4" kindref="member" tooltip="Extended Kalman filter with unknown Q.">main</ref>()<sp/>{</highlight></codeline>
90<codeline lineno="6"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_file<sp/>itf(</highlight><highlight class="stringliteral">&quot;DD&quot;</highlight><highlight class="normal">);</highlight></codeline>
91<codeline lineno="7"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Convert<sp/>input<sp/>variables<sp/>to<sp/>IT++<sp/>format</highlight><highlight class="normal"></highlight></codeline>
92<codeline lineno="8"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>Data;</highlight></codeline>
93<codeline lineno="9"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>itf<sp/>&gt;&gt;<sp/>Name(</highlight><highlight class="stringliteral">&quot;DD&quot;</highlight><highlight class="normal">)<sp/>&gt;&gt;<sp/>Data;</highlight></codeline>
94<codeline lineno="10"><highlight class="normal"></highlight></codeline>
95<codeline lineno="11"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>------------------<sp/>Start<sp/>of<sp/>routine<sp/>---------------------------</highlight><highlight class="normal"></highlight></codeline>
96<codeline lineno="12"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ndat=Data.cols();</highlight></codeline>
97<codeline lineno="13"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>npsi=Data.rows();</highlight></codeline>
98<codeline lineno="14"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>thr<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;1&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;{<sp/>theta_r<sp/>}&quot;</highlight><highlight class="normal">,vec_1<sp/>(<sp/>npsi<sp/>),vec_1<sp/>(<sp/>0<sp/>)<sp/>);</highlight></codeline>
99<codeline lineno="15"><highlight class="normal"></highlight></codeline>
100<codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>V0=1e-8*eye<sp/>(<sp/>npsi<sp/>);<sp/></highlight><highlight class="comment">//V0<sp/>(<sp/>0,0<sp/>)<sp/>*=1.0;</highlight><highlight class="normal"></highlight></codeline>
101<codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>nu0=3;</highlight></codeline>
102<codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classARX" kindref="compound" tooltip="Linear Autoregressive model with Gaussian noise.">ARX</ref><sp/>Ar<sp/>(<sp/>thr,V0,nu0<sp/>);</highlight></codeline>
103<codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>estimate</highlight><highlight class="normal"></highlight></codeline>
104<codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i=0;i&lt;ndat;i++<sp/>)<sp/>{Ar.bayes<sp/>(<sp/>Data.get_col<sp/>(<sp/>i<sp/>)<sp/>);<sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
105<codeline lineno="21"><highlight class="normal"></highlight></codeline>
106<codeline lineno="22"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>th<sp/>=<sp/>Ar._epdf().mean();</highlight></codeline>
107<codeline lineno="23"><highlight class="normal"></highlight></codeline>
108<codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>------------------<sp/>End<sp/>of<sp/>routine<sp/>-----------------------------</highlight><highlight class="normal"></highlight></codeline>
109<codeline lineno="25"><highlight class="normal"></highlight></codeline>
110<codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/>th<sp/>&lt;&lt;endl;</highlight></codeline>
111<codeline lineno="27"><highlight class="normal"></highlight></codeline>
112<codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>ll=Ar._ll();</highlight></codeline>
113<codeline lineno="29"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/>ll<sp/>&lt;&lt;endl;</highlight></codeline>
114<codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
115<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ivec<sp/><ref refid="classstr" kindref="compound" tooltip="Structure of RV (used internally).">str</ref><sp/>=<sp/>Ar.structure_est<sp/>(<sp/><ref refid="classegiw" kindref="compound" tooltip="Gauss-inverse-Wishart density stored in LD form.">egiw</ref><sp/>(<sp/>thr,V0,nu0<sp/>)<sp/>);</highlight></codeline>
116<codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/>str<sp/>&lt;&lt;endl;</highlight></codeline>
117<codeline lineno="33"><highlight class="normal">}</highlight></codeline>
118    </programlisting>
119    <location file="/home/smidl/work/git/mixpp/matlab/mex/arx_c.cpp"/>
120  </compounddef>
121</doxygen>
Note: See TracBrowser for help on using the browser.