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="merg__pred_8cpp" kind="file"> |
---|
4 | <compoundname>merg_pred.cpp</compoundname> |
---|
5 | <includes refid="arx_8h" local="no">estim/arx.h</includes> |
---|
6 | <includes refid="libEF_8h" local="no">stat/libEF.h</includes> |
---|
7 | <includes refid="loggers_8h" local="no">stat/loggers.h</includes> |
---|
8 | <includes refid="merger_8h" local="no">stat/merger.h</includes> |
---|
9 | <incdepgraph> |
---|
10 | <node id="556"> |
---|
11 | <label>stat/loggers.h</label> |
---|
12 | <link refid="loggers_8h"/> |
---|
13 | <childnode refid="550" relation="include"> |
---|
14 | </childnode> |
---|
15 | <childnode refid="552" relation="include"> |
---|
16 | </childnode> |
---|
17 | <childnode refid="555" relation="include"> |
---|
18 | </childnode> |
---|
19 | </node> |
---|
20 | <node id="552"> |
---|
21 | <label>libBM.h</label> |
---|
22 | <link refid="libBM_8h"/> |
---|
23 | <childnode refid="550" relation="include"> |
---|
24 | </childnode> |
---|
25 | </node> |
---|
26 | <node id="557"> |
---|
27 | <label>stat/merger.h</label> |
---|
28 | <link refid="merger_8h"/> |
---|
29 | <childnode refid="550" relation="include"> |
---|
30 | </childnode> |
---|
31 | <childnode refid="552" relation="include"> |
---|
32 | </childnode> |
---|
33 | <childnode refid="553" relation="include"> |
---|
34 | </childnode> |
---|
35 | <childnode refid="558" relation="include"> |
---|
36 | </childnode> |
---|
37 | </node> |
---|
38 | <node id="558"> |
---|
39 | <label>emix.h</label> |
---|
40 | <link refid="emix_8h"/> |
---|
41 | <childnode refid="552" relation="include"> |
---|
42 | </childnode> |
---|
43 | <childnode refid="553" relation="include"> |
---|
44 | </childnode> |
---|
45 | </node> |
---|
46 | <node id="555"> |
---|
47 | <label>../itpp_ext.h</label> |
---|
48 | <link refid="itpp__ext_8h-source"/> |
---|
49 | <childnode refid="550" relation="include"> |
---|
50 | </childnode> |
---|
51 | </node> |
---|
52 | <node id="548"> |
---|
53 | <label>work/git/mixpp/mpdm/merg_pred.cpp</label> |
---|
54 | <link refid="merg_pred.cpp"/> |
---|
55 | <childnode refid="549" relation="include"> |
---|
56 | </childnode> |
---|
57 | <childnode refid="553" relation="include"> |
---|
58 | </childnode> |
---|
59 | <childnode refid="556" relation="include"> |
---|
60 | </childnode> |
---|
61 | <childnode refid="557" relation="include"> |
---|
62 | </childnode> |
---|
63 | </node> |
---|
64 | <node id="553"> |
---|
65 | <label>../stat/libEF.h</label> |
---|
66 | <link refid="libEF_8h"/> |
---|
67 | <childnode refid="550" relation="include"> |
---|
68 | </childnode> |
---|
69 | <childnode refid="554" relation="include"> |
---|
70 | </childnode> |
---|
71 | <childnode refid="552" relation="include"> |
---|
72 | </childnode> |
---|
73 | <childnode refid="555" relation="include"> |
---|
74 | </childnode> |
---|
75 | </node> |
---|
76 | <node id="549"> |
---|
77 | <label>estim/arx.h</label> |
---|
78 | <link refid="arx_8h"/> |
---|
79 | <childnode refid="550" relation="include"> |
---|
80 | </childnode> |
---|
81 | <childnode refid="551" relation="include"> |
---|
82 | </childnode> |
---|
83 | <childnode refid="553" relation="include"> |
---|
84 | </childnode> |
---|
85 | </node> |
---|
86 | <node id="551"> |
---|
87 | <label>../stat/libFN.h</label> |
---|
88 | <link refid="libFN_8h-source"/> |
---|
89 | <childnode refid="550" relation="include"> |
---|
90 | </childnode> |
---|
91 | <childnode refid="552" relation="include"> |
---|
92 | </childnode> |
---|
93 | </node> |
---|
94 | <node id="550"> |
---|
95 | <label>itpp/itbase.h</label> |
---|
96 | </node> |
---|
97 | <node id="554"> |
---|
98 | <label>../math/libDC.h</label> |
---|
99 | <link refid="libDC_8h"/> |
---|
100 | <childnode refid="550" relation="include"> |
---|
101 | </childnode> |
---|
102 | </node> |
---|
103 | </incdepgraph> |
---|
104 | <sectiondef kind="func"> |
---|
105 | <memberdef kind="function" id="merg__pred_8cpp_1e66f6b31b5ad750f1fe042a706a4e3d4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
106 | <type>int</type> |
---|
107 | <definition>int main</definition> |
---|
108 | <argsstring>()</argsstring> |
---|
109 | <name>main</name> |
---|
110 | <briefdescription> |
---|
111 | </briefdescription> |
---|
112 | <detaileddescription> |
---|
113 | </detaileddescription> |
---|
114 | <inbodydescription> |
---|
115 | </inbodydescription> |
---|
116 | <location file="/home/smidl/work/git/mixpp/mpdm/merg_pred.cpp" line="11" bodyfile="/home/smidl/work/git/mixpp/mpdm/merg_pred.cpp" bodystart="11" bodyend="90"/> |
---|
117 | </memberdef> |
---|
118 | </sectiondef> |
---|
119 | <briefdescription> |
---|
120 | </briefdescription> |
---|
121 | <detaileddescription> |
---|
122 | </detaileddescription> |
---|
123 | <programlisting> |
---|
124 | <codeline lineno="1"><highlight class="preprocessor">#include<sp/><<ref refid="arx_8h" kindref="compound" tooltip="Bayesian Filtering for generalized autoregressive (ARX) model.">estim/arx.h</ref>></highlight><highlight class="normal"></highlight></codeline> |
---|
125 | <codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="libEF_8h" kindref="compound" tooltip="Probability distributions for Exponential Family models.">stat/libEF.h</ref>></highlight><highlight class="normal"></highlight></codeline> |
---|
126 | <codeline lineno="3"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="loggers_8h" kindref="compound" tooltip="Loggers for storing results of experiments.">stat/loggers.h</ref>></highlight><highlight class="normal"></highlight></codeline> |
---|
127 | <codeline lineno="4"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="merger_8h" kindref="compound" tooltip="Mergers for combination of pdfs.">stat/merger.h</ref>></highlight><highlight class="normal"></highlight></codeline> |
---|
128 | <codeline lineno="5"><highlight class="normal"></highlight><highlight class="keyword">using<sp/>namespace<sp/></highlight><highlight class="normal">itpp;</highlight></codeline> |
---|
129 | <codeline lineno="6"><highlight class="normal"></highlight></codeline> |
---|
130 | <codeline lineno="7"><highlight class="normal"></highlight><highlight class="comment">//These<sp/>lines<sp/>are<sp/>needed<sp/>for<sp/>use<sp/>of<sp/>cout<sp/>and<sp/>endl</highlight><highlight class="normal"></highlight></codeline> |
---|
131 | <codeline lineno="8"><highlight class="normal"></highlight><highlight class="keyword">using</highlight><highlight class="normal"><sp/>std::cout;</highlight></codeline> |
---|
132 | <codeline lineno="9"><highlight class="normal"></highlight><highlight class="keyword">using</highlight><highlight class="normal"><sp/>std::endl;</highlight></codeline> |
---|
133 | <codeline lineno="10"><highlight class="normal"></highlight></codeline> |
---|
134 | <codeline lineno="11"><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> |
---|
135 | <codeline lineno="12"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Setup<sp/>model</highlight><highlight class="normal"></highlight></codeline> |
---|
136 | <codeline lineno="13"><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<sp/>(<sp/></highlight><highlight class="stringliteral">"{y<sp/>}"</highlight><highlight class="normal"><sp/>);</highlight></codeline> |
---|
137 | <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/>u1<sp/>(<sp/></highlight><highlight class="stringliteral">"{u1<sp/>}"</highlight><highlight class="normal"><sp/>);</highlight></codeline> |
---|
138 | <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/>u2<sp/>(<sp/></highlight><highlight class="stringliteral">"{u2<sp/>}"</highlight><highlight class="normal"><sp/>);</highlight></codeline> |
---|
139 | <codeline lineno="16"><highlight class="normal"></highlight></codeline> |
---|
140 | <codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Full<sp/>system</highlight><highlight class="normal"></highlight></codeline> |
---|
141 | <codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>thg<sp/>(<sp/></highlight><highlight class="stringliteral">"0.7<sp/>1<sp/>1"</highlight><highlight class="normal"><sp/>);<sp/></highlight><highlight class="comment">//Simulated<sp/>system</highlight><highlight class="normal"></highlight></codeline> |
---|
142 | <codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//y=a<sp/>y_t-1<sp/>+<sp/>u1<sp/>+<sp/>u2</highlight><highlight class="normal"></highlight></codeline> |
---|
143 | <codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>sqr=0.1;</highlight></codeline> |
---|
144 | <codeline lineno="21"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ord<sp/>=<sp/>1;</highlight></codeline> |
---|
145 | <codeline lineno="22"><highlight class="normal"></highlight></codeline> |
---|
146 | <codeline lineno="23"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Estimated<sp/>systems<sp/>ARX(2)</highlight><highlight class="normal"></highlight></codeline> |
---|
147 | <codeline lineno="24"><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/>thri<sp/>(<sp/></highlight><highlight class="stringliteral">"{thr_i<sp/>}"</highlight><highlight class="normal">,vec_1<sp/>(<sp/>2+1<sp/>)<sp/>);</highlight></codeline> |
---|
148 | <codeline lineno="25"><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/>thrg<sp/>(<sp/></highlight><highlight class="stringliteral">"{thr_g<sp/>}"</highlight><highlight class="normal">,vec_1<sp/>(<sp/>3+1<sp/>)<sp/>);</highlight></codeline> |
---|
149 | <codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Setup<sp/>values</highlight><highlight class="normal"></highlight></codeline> |
---|
150 | <codeline lineno="27"><highlight class="normal"></highlight></codeline> |
---|
151 | <codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//ARX<sp/>constructor</highlight><highlight class="normal"></highlight></codeline> |
---|
152 | <codeline lineno="29"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>V0<sp/>=<sp/>0.001*eye<sp/>(<sp/>thri.count()<sp/>);<sp/>V0<sp/>(<sp/>0,0<sp/>)<sp/>*=<sp/>10;<sp/></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline> |
---|
153 | <codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>V0g<sp/>=<sp/>0.001*eye<sp/>(<sp/>thrg.count()<sp/>);<sp/>V0g<sp/>(<sp/>0,0<sp/>)<sp/>*=<sp/>10;<sp/></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline> |
---|
154 | <codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>nu0<sp/>=<sp/>ord+1;</highlight></codeline> |
---|
155 | <codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>frg<sp/>=<sp/>0.99;</highlight></codeline> |
---|
156 | <codeline lineno="33"><highlight class="normal"></highlight></codeline> |
---|
157 | <codeline lineno="34"><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/>P1<sp/>(<sp/>thri,<sp/>V0,<sp/>nu0,<sp/>frg<sp/>);</highlight></codeline> |
---|
158 | <codeline lineno="35"><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/>P2<sp/>(<sp/>thri,<sp/>V0,<sp/>nu0,<sp/>frg<sp/>);</highlight></codeline> |
---|
159 | <codeline lineno="36"><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/>PG<sp/>(<sp/>thrg,<sp/>V0g,<sp/>nu0,<sp/>frg<sp/>);</highlight></codeline> |
---|
160 | <codeline lineno="37"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Test<sp/>estimation</highlight><highlight class="normal"></highlight></codeline> |
---|
161 | <codeline lineno="38"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ndat<sp/>=<sp/>10000;</highlight></codeline> |
---|
162 | <codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>t;</highlight></codeline> |
---|
163 | <codeline lineno="40"><highlight class="normal"></highlight></codeline> |
---|
164 | <codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Logging</highlight><highlight class="normal"></highlight></codeline> |
---|
165 | <codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classdirfilelog" kindref="compound" tooltip="Logging into dirfile with buffer in memory.">dirfilelog</ref><sp/>L<sp/>(<sp/></highlight><highlight class="stringliteral">"exp/merg"</highlight><highlight class="normal">,ndat<sp/>);</highlight></codeline> |
---|
166 | <codeline lineno="43"><highlight class="normal"></highlight></codeline> |
---|
167 | <codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>Eth1_log<sp/>=<sp/>L.add<sp/>(<sp/>thri,</highlight><highlight class="stringliteral">"P1"</highlight><highlight class="normal"><sp/>);</highlight></codeline> |
---|
168 | <codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>Eth2_log<sp/>=<sp/>L.add<sp/>(<sp/>thri,</highlight><highlight class="stringliteral">"P2"</highlight><highlight class="normal"><sp/>);</highlight></codeline> |
---|
169 | <codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>Ethg_log<sp/>=<sp/>L.add<sp/>(<sp/>thrg,</highlight><highlight class="stringliteral">"PG"</highlight><highlight class="normal"><sp/>);</highlight></codeline> |
---|
170 | <codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>Data_log<sp/>=<sp/>L.add<sp/>(<sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>(<sp/></highlight><highlight class="stringliteral">"{Y<sp/>U1<sp/>U2<sp/>}"</highlight><highlight class="normal"><sp/>),<sp/></highlight><highlight class="stringliteral">""</highlight><highlight class="normal"><sp/>);</highlight></codeline> |
---|
171 | <codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>LL_log<sp/><sp/><sp/>=<sp/>L.add<sp/>(<sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>(<sp/></highlight><highlight class="stringliteral">"{1<sp/>2<sp/>G<sp/>}"</highlight><highlight class="normal"><sp/>),<sp/></highlight><highlight class="stringliteral">"LL"</highlight><highlight class="normal"><sp/>);</highlight></codeline> |
---|
172 | <codeline lineno="49"><highlight class="normal"></highlight></codeline> |
---|
173 | <codeline lineno="50"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>L.init();</highlight></codeline> |
---|
174 | <codeline lineno="51"><highlight class="normal"></highlight></codeline> |
---|
175 | <codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>Yt<sp/>(<sp/>ndat<sp/>);</highlight></codeline> |
---|
176 | <codeline lineno="53"><highlight class="normal"></highlight></codeline> |
---|
177 | <codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Yt.set_subvector<sp/>(<sp/>0,randn<sp/>(<sp/>ord<sp/>)<sp/>);<sp/></highlight><highlight class="comment">//initial<sp/>values</highlight><highlight class="normal"></highlight></codeline> |
---|
178 | <codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>rgrg<sp/>(<sp/>thg.length()<sp/>);</highlight></codeline> |
---|
179 | <codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>rgri<sp/>(<sp/>thri.count()<sp/>);</highlight></codeline> |
---|
180 | <codeline lineno="57"><highlight class="normal"></highlight></codeline> |
---|
181 | <codeline lineno="58"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/>t=0;<sp/>t<ndat;<sp/>t++<sp/>)<sp/>{</highlight></codeline> |
---|
182 | <codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>True<sp/>system</highlight><highlight class="normal"></highlight></codeline> |
---|
183 | <codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>t>0<sp/>)<sp/>{</highlight></codeline> |
---|
184 | <codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rgrg<sp/>(<sp/>0<sp/>)<sp/>=Yt<sp/>(<sp/>t-1<sp/>);</highlight></codeline> |
---|
185 | <codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rgrg<sp/>(<sp/>1<sp/>)<sp/>=<sp/>pow(sin<sp/>(<sp/>(<sp/>t/40.0<sp/>)<sp/>*pi<sp/>),3);</highlight></codeline> |
---|
186 | <codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rgrg<sp/>(<sp/>2<sp/>)<sp/>=<sp/>pow(cos<sp/>(<sp/>(<sp/>t/40.0<sp/>)<sp/>*pi<sp/>),3);</highlight></codeline> |
---|
187 | <codeline lineno="64"><highlight class="normal"></highlight></codeline> |
---|
188 | <codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Yt<sp/>(<sp/>t<sp/>)<sp/>=<sp/>thg*rgrg<sp/>+<sp/>sqr<sp/>*<sp/>NorRNG();</highlight></codeline> |
---|
189 | <codeline lineno="66"><highlight class="normal"></highlight></codeline> |
---|
190 | <codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>1st</highlight><highlight class="normal"></highlight></codeline> |
---|
191 | <codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rgri<sp/>(<sp/>0<sp/>)<sp/>=Yt<sp/>(<sp/>t<sp/>);</highlight></codeline> |
---|
192 | <codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rgri<sp/>(<sp/>1<sp/>)<sp/>=Yt<sp/>(<sp/>t-1<sp/>);</highlight></codeline> |
---|
193 | <codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rgri<sp/>(<sp/>2<sp/>)<sp/>=rgrg<sp/>(<sp/>1<sp/>);</highlight></codeline> |
---|
194 | <codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>P1.bayes<sp/>(<sp/>rgri<sp/>);</highlight></codeline> |
---|
195 | <codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>2nd</highlight><highlight class="normal"></highlight></codeline> |
---|
196 | <codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rgri<sp/>(<sp/>2<sp/>)<sp/>=rgrg<sp/>(<sp/>2<sp/>);</highlight></codeline> |
---|
197 | <codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>P2.bayes<sp/>(<sp/>rgri<sp/>);</highlight></codeline> |
---|
198 | <codeline lineno="75"><highlight class="normal"></highlight></codeline> |
---|
199 | <codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Global</highlight><highlight class="normal"></highlight></codeline> |
---|
200 | <codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>PG.bayes<sp/>(<sp/>concat<sp/>(<sp/>Yt<sp/>(<sp/>t<sp/>),rgrg<sp/>)<sp/>);</highlight></codeline> |
---|
201 | <codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
202 | <codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Merger</highlight><highlight class="normal"></highlight></codeline> |
---|
203 | <codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> |
---|
204 | <codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>L.logit<sp/>(<sp/>Eth1_log,<sp/>P1._epdf().mean()<sp/>);</highlight></codeline> |
---|
205 | <codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>L.logit<sp/>(<sp/>Eth2_log,<sp/>P2._epdf().mean()<sp/>);</highlight></codeline> |
---|
206 | <codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>L.logit<sp/>(<sp/>Ethg_log,<sp/>PG._epdf().mean()<sp/>);</highlight></codeline> |
---|
207 | <codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>L.logit<sp/>(<sp/>Data_log,<sp/>vec_3<sp/>(<sp/>Yt<sp/>(<sp/>t<sp/>),<sp/>rgrg<sp/>(<sp/>1<sp/>),<sp/>rgrg<sp/>(<sp/>2<sp/>)<sp/>)<sp/>);</highlight></codeline> |
---|
208 | <codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>L.logit<sp/>(<sp/>LL_log,<sp/>vec_3<sp/>(<sp/>P1._ll(),<sp/>P2._ll(),<sp/>PG._ll()<sp/>)<sp/>);</highlight></codeline> |
---|
209 | <codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>L.step<sp/>(<sp/><sp/>);</highlight></codeline> |
---|
210 | <codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> |
---|
211 | <codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>L.finalize(<sp/>);</highlight></codeline> |
---|
212 | <codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>L.itsave<sp/>(<sp/></highlight><highlight class="stringliteral">"merg.it"</highlight><highlight class="normal"><sp/>);</highlight></codeline> |
---|
213 | <codeline lineno="90"><highlight class="normal">}</highlight></codeline> |
---|
214 | </programlisting> |
---|
215 | <location file="/home/smidl/work/git/mixpp/mpdm/merg_pred.cpp"/> |
---|
216 | </compounddef> |
---|
217 | </doxygen> |
---|