root/doc/xml/testPF_8cpp.xml @ 266

Revision 187, 11.1 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="testPF_8cpp" kind="file">
4    <compoundname>testPF.cpp</compoundname>
5    <includes local="no">itpp/itbase.h</includes>
6    <includes refid="libPF_8h" local="no">estim/libPF.h</includes>
7    <includes refid="libDC_8h" local="no">math/libDC.h</includes>
8    <includes refid="libEF_8h" local="no">stat/libEF.h</includes>
9    <incdepgraph>
10      <node id="905">
11        <label>libBM.h</label>
12        <link refid="libBM_8h"/>
13        <childnode refid="901" relation="include">
14        </childnode>
15      </node>
16      <node id="906">
17        <label>../itpp_ext.h</label>
18        <link refid="itpp__ext_8h-source"/>
19        <childnode refid="901" relation="include">
20        </childnode>
21      </node>
22      <node id="903">
23        <label>../stat/libEF.h</label>
24        <link refid="libEF_8h"/>
25        <childnode refid="901" relation="include">
26        </childnode>
27        <childnode refid="904" relation="include">
28        </childnode>
29        <childnode refid="905" relation="include">
30        </childnode>
31        <childnode refid="906" relation="include">
32        </childnode>
33      </node>
34      <node id="902">
35        <label>estim/libPF.h</label>
36        <link refid="libPF_8h"/>
37        <childnode refid="901" relation="include">
38        </childnode>
39        <childnode refid="903" relation="include">
40        </childnode>
41        <childnode refid="904" relation="include">
42        </childnode>
43      </node>
44      <node id="901">
45        <label>itpp/itbase.h</label>
46      </node>
47      <node id="904">
48        <label>../math/libDC.h</label>
49        <link refid="libDC_8h"/>
50        <childnode refid="901" relation="include">
51        </childnode>
52      </node>
53      <node id="900">
54        <label>work/git/mixpp/tests/testPF.cpp</label>
55        <link refid="testPF.cpp"/>
56        <childnode refid="901" relation="include">
57        </childnode>
58        <childnode refid="902" relation="include">
59        </childnode>
60        <childnode refid="904" relation="include">
61        </childnode>
62        <childnode refid="903" relation="include">
63        </childnode>
64      </node>
65    </incdepgraph>
66      <sectiondef kind="func">
67      <memberdef kind="function" id="testPF_8cpp_1e66f6b31b5ad750f1fe042a706a4e3d4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
68        <type>int</type>
69        <definition>int main</definition>
70        <argsstring>()</argsstring>
71        <name>main</name>
72        <briefdescription>
73        </briefdescription>
74        <detaileddescription>
75        </detaileddescription>
76        <inbodydescription>
77        </inbodydescription>
78        <location file="/home/smidl/work/git/mixpp/tests/testPF.cpp" line="12" bodyfile="/home/smidl/work/git/mixpp/tests/testPF.cpp" bodystart="12" bodyend="42"/>
79      </memberdef>
80      </sectiondef>
81    <briefdescription>
82    </briefdescription>
83    <detaileddescription>
84    </detaileddescription>
85    <programlisting>
86<codeline lineno="1"><highlight class="preprocessor">#include<sp/>&lt;itpp/itbase.h&gt;</highlight><highlight class="normal"></highlight></codeline>
87<codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="libPF_8h" kindref="compound" tooltip="Bayesian Filtering using stochastic sampling (Particle Filters).">estim/libPF.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
88<codeline lineno="3"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="libDC_8h" kindref="compound" tooltip="Matrices in decomposed forms (LDL&amp;#39;, LU, UDU&amp;#39;, etc).">math/libDC.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
89<codeline lineno="4"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="libEF_8h" kindref="compound" tooltip="Probability distributions for Exponential Family models.">stat/libEF.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
90<codeline lineno="5"><highlight class="normal"></highlight></codeline>
91<codeline lineno="6"><highlight class="normal"></highlight><highlight class="keyword">using<sp/>namespace<sp/></highlight><highlight class="normal">itpp;</highlight></codeline>
92<codeline lineno="7"><highlight class="normal"></highlight></codeline>
93<codeline lineno="8"><highlight class="normal"></highlight><highlight class="comment">//These<sp/>lines<sp/>are<sp/>needed<sp/>for<sp/>use<sp/>of<sp/>cout<sp/>and<sp/>endl</highlight><highlight class="normal"></highlight></codeline>
94<codeline lineno="9"><highlight class="normal"></highlight><highlight class="keyword">using</highlight><highlight class="normal"><sp/>std::cout;</highlight></codeline>
95<codeline lineno="10"><highlight class="normal"></highlight><highlight class="keyword">using</highlight><highlight class="normal"><sp/>std::endl;</highlight></codeline>
96<codeline lineno="11"><highlight class="normal"></highlight></codeline>
97<codeline lineno="12"><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>
98<codeline lineno="13"><highlight class="normal"></highlight></codeline>
99<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/>x(</highlight><highlight class="stringliteral">&quot;1&quot;</highlight><highlight class="normal">);</highlight></codeline>
100<codeline lineno="15"><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/>xm=x;<sp/>xm.<ref refid="classRV_1e0a158d53ab9430627241f844f4c9a60" kindref="member" tooltip="Shift time shifted by delta.">t</ref>(-1);</highlight><highlight class="keyword">const</highlight><highlight class="normal"></highlight></codeline>
101<codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>y(</highlight><highlight class="stringliteral">&quot;2&quot;</highlight><highlight class="normal">);</highlight></codeline>
102<codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
103<codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>A<sp/>=<sp/></highlight><highlight class="stringliteral">&quot;1&quot;</highlight><highlight class="normal">;</highlight></codeline>
104<codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>vR<sp/>=<sp/></highlight><highlight class="stringliteral">&quot;1&quot;</highlight><highlight class="normal">;</highlight></codeline>
105<codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classldmat" kindref="compound" tooltip="Matrix stored in LD form, (typically known as UD).">ldmat</ref><sp/>R(vR);</highlight></codeline>
106<codeline lineno="21"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
107<codeline lineno="22"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classeEmp" kindref="compound" tooltip="Weighted empirical density.">eEmp</ref><sp/>emp(x,10);</highlight></codeline>
108<codeline lineno="23"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classeuni" kindref="compound" tooltip="Uniform distributed density on a rectangular support.">euni</ref><sp/>eun(x);</highlight></codeline>
109<codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>eun.set_parameters(</highlight><highlight class="stringliteral">&quot;0&quot;</highlight><highlight class="normal">,</highlight><highlight class="stringliteral">&quot;1&quot;</highlight><highlight class="normal">);</highlight></codeline>
110<codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>emp.set_parameters(ones(10),&amp;eun);</highlight></codeline>
111<codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>&amp;v=emp._w();</highlight></codeline>
112<codeline lineno="27"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Array&lt;vec&gt;<sp/>&amp;S=emp._samples();</highlight></codeline>
113<codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
114<codeline lineno="29"><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;10;i++){<sp/>v(i)<sp/>=<sp/>exp(-0.5*sum(pow(S(i)-1,2.0))*10);}</highlight></codeline>
115<codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>v/=sum(v);</highlight></codeline>
116<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
117<codeline lineno="32"><highlight class="normal"><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;<sp/>S<sp/>&lt;&lt;<sp/>endl;</highlight></codeline>
118<codeline lineno="33"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;w:&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>v<sp/>&lt;&lt;<sp/>endl;</highlight></codeline>
119<codeline lineno="34"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
120<codeline lineno="35"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ivec<sp/>ind<sp/>=<sp/>emp.resample();</highlight></codeline>
121<codeline lineno="36"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
122<codeline lineno="37"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cout<sp/>&lt;&lt;<sp/>ind<sp/>&lt;&lt;<sp/>endl;</highlight></codeline>
123<codeline lineno="38"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
124<codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Exit<sp/>program:</highlight><highlight class="normal"></highlight></codeline>
125<codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
126<codeline lineno="41"><highlight class="normal"></highlight></codeline>
127<codeline lineno="42"><highlight class="normal">}</highlight></codeline>
128    </programlisting>
129    <location file="/home/smidl/work/git/mixpp/tests/testPF.cpp"/>
130  </compounddef>
131</doxygen>
Note: See TracBrowser for help on using the browser.