102 | | <a name="l00062"></a><a class="code" href="classbdm_1_1FileDS.html">00062</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1FileDS.html">FileDS</a>: <span class="keyword">public</span> <a class="code" href="classbdm_1_1MemDS.html" title="Memory storage of off-line data column-wise.">MemDS</a> { |
103 | | <a name="l00063"></a>00063 |
104 | | <a name="l00064"></a>00064 <span class="keyword">public</span>: |
105 | | <a name="l00065"></a><a class="code" href="classbdm_1_1FileDS.html#a0bf36650e9d1af2d0743ffe8a3fcff14">00065</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1FileDS.html#a0bf36650e9d1af2d0743ffe8a3fcff14" title="Returns full vector of observed data=[output, input].">getdata</a> ( vec &dt ) { |
106 | | <a name="l00066"></a>00066 dt = <a class="code" href="classbdm_1_1MemDS.html#aa724f4cbfc32e79bacc044253234e260" title="internal matrix of data">Data</a>.get_col ( <a class="code" href="classbdm_1_1MemDS.html#a681ee3831f68f4f20ed54e04e8b3f107" title="active column in the Data matrix">time</a> ); |
107 | | <a name="l00067"></a>00067 } |
108 | | <a name="l00068"></a>00068 |
109 | | <a name="l00069"></a><a class="code" href="classbdm_1_1FileDS.html#a3c546e8d9eb71e079e046e3d2f69c6c4">00069</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1FileDS.html#a3c546e8d9eb71e079e046e3d2f69c6c4" title="Returns data records at indeces.">getdata</a> ( vec &dt, <span class="keyword">const</span> ivec &indices ) { |
110 | | <a name="l00070"></a>00070 vec tmp = <a class="code" href="classbdm_1_1MemDS.html#aa724f4cbfc32e79bacc044253234e260" title="internal matrix of data">Data</a>.get_col ( <a class="code" href="classbdm_1_1MemDS.html#a681ee3831f68f4f20ed54e04e8b3f107" title="active column in the Data matrix">time</a> ); |
111 | | <a name="l00071"></a>00071 dt = tmp ( indices ); |
112 | | <a name="l00072"></a>00072 } |
113 | | <a name="l00073"></a>00073 |
114 | | <a name="l00075"></a><a class="code" href="classbdm_1_1FileDS.html#aa6af63065097147b390e684a7842a26a">00075</a> <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1FileDS.html#aa6af63065097147b390e684a7842a26a" title="returns number of data in the file;">ndat</a>() { |
115 | | <a name="l00076"></a>00076 <span class="keywordflow">return</span> <a class="code" href="classbdm_1_1MemDS.html#aa724f4cbfc32e79bacc044253234e260" title="internal matrix of data">Data</a>.cols(); |
116 | | <a name="l00077"></a>00077 } |
117 | | <a name="l00079"></a><a class="code" href="classbdm_1_1FileDS.html#a998f590eeddee97ae6918671e40756b8">00079</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1FileDS.html#a998f590eeddee97ae6918671e40756b8" title="no sense to log this type">log_add</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &L ) {}; |
118 | | <a name="l00081"></a><a class="code" href="classbdm_1_1FileDS.html#a59d44ef34a523127dd79c076461c43b6">00081</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1FileDS.html#a59d44ef34a523127dd79c076461c43b6" title="no sense to log this type">logit</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &L ) {}; |
119 | | <a name="l00082"></a>00082 }; |
120 | | <a name="l00083"></a>00083 |
121 | | <a name="l00090"></a><a class="code" href="classbdm_1_1ITppFileDS.html">00090</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1ITppFileDS.html" title="Read Data Matrix from an IT file.">ITppFileDS</a>: <span class="keyword">public</span> <a class="code" href="classbdm_1_1FileDS.html">FileDS</a> { |
122 | | <a name="l00091"></a>00091 |
123 | | <a name="l00092"></a>00092 <span class="keyword">public</span>: |
124 | | <a name="l00093"></a>00093 <a class="code" href="classbdm_1_1ITppFileDS.html" title="Read Data Matrix from an IT file.">ITppFileDS</a> ( <span class="keyword">const</span> <span class="keywordtype">string</span> &fname, <span class="keyword">const</span> <span class="keywordtype">string</span> &varname ) : <a class="code" href="classbdm_1_1FileDS.html">FileDS</a>() { |
125 | | <a name="l00094"></a>00094 it_file it ( fname ); |
126 | | <a name="l00095"></a>00095 it << Name ( varname ); |
127 | | <a name="l00096"></a>00096 it >> <a class="code" href="classbdm_1_1MemDS.html#aa724f4cbfc32e79bacc044253234e260" title="internal matrix of data">Data</a>; |
128 | | <a name="l00097"></a>00097 <a class="code" href="classbdm_1_1MemDS.html#a681ee3831f68f4f20ed54e04e8b3f107" title="active column in the Data matrix">time</a> = 0; |
129 | | <a name="l00098"></a>00098 <span class="comment">//rowid and delays are ignored</span> |
130 | | <a name="l00099"></a>00099 }; |
131 | | <a name="l00100"></a>00100 |
132 | | <a name="l00101"></a>00101 <a class="code" href="classbdm_1_1ITppFileDS.html" title="Read Data Matrix from an IT file.">ITppFileDS</a> () : <a class="code" href="classbdm_1_1FileDS.html">FileDS</a>() { |
133 | | <a name="l00102"></a>00102 }; |
134 | | <a name="l00103"></a>00103 |
135 | | <a name="l00104"></a>00104 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ITppFileDS.html#afd192da176625a909fa853458b604566" title="This method arrange instance properties according the data stored in the Setting...">from_setting</a> ( <span class="keyword">const</span> Setting &<span class="keyword">set</span> ); |
136 | | <a name="l00105"></a>00105 |
137 | | <a name="l00106"></a>00106 <span class="comment">// TODO dodelat void to_setting( Setting &set ) const;</span> |
138 | | <a name="l00107"></a>00107 |
139 | | <a name="l00108"></a>00108 }; |
140 | | <a name="l00109"></a>00109 |
141 | | <a name="l00110"></a>00110 <a class="code" href="user__info_8h.html#a4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a> ( <a class="code" href="classbdm_1_1ITppFileDS.html" title="Read Data Matrix from an IT file.">ITppFileDS</a> ); |
142 | | <a name="l00111"></a>00111 SHAREDPTR ( <a class="code" href="classbdm_1_1ITppFileDS.html" title="Read Data Matrix from an IT file.">ITppFileDS</a> ); |
143 | | <a name="l00112"></a>00112 |
144 | | <a name="l00120"></a><a class="code" href="classbdm_1_1CsvFileDS.html">00120</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1CsvFileDS.html" title="CSV file data storage The constructor creates Data matrix from the records in a CSV...">CsvFileDS</a>: <span class="keyword">public</span> <a class="code" href="classbdm_1_1FileDS.html">FileDS</a> { |
145 | | <a name="l00121"></a>00121 |
146 | | <a name="l00122"></a>00122 <span class="keyword">public</span>: |
147 | | <a name="l00124"></a>00124 <a class="code" href="classbdm_1_1CsvFileDS.html#a8d9d56cdf6b8d0236e32a80e11c238b0" title="Constructor - create DS from a CSV file.">CsvFileDS</a> ( <span class="keyword">const</span> <span class="keywordtype">string</span>& fname, <span class="keyword">const</span> <span class="keywordtype">string</span>& orientation = <span class="stringliteral">"BY_COL"</span> ); |
148 | | <a name="l00125"></a>00125 }; |
149 | | <a name="l00126"></a>00126 |
150 | | <a name="l00127"></a>00127 |
151 | | <a name="l00128"></a>00128 |
152 | | <a name="l00133"></a><a class="code" href="classbdm_1_1ArxDS.html">00133</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1ArxDS.html" title="Generator of ARX data.">ArxDS</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1DS.html" title="Abstract class for discrete-time sources of data.">DS</a> { |
153 | | <a name="l00134"></a>00134 <span class="keyword">protected</span>: |
154 | | <a name="l00136"></a><a class="code" href="classbdm_1_1ArxDS.html#ac7b3cc6cd059ff3d7f4462cedff4bdeb">00136</a> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1ArxDS.html#ac7b3cc6cd059ff3d7f4462cedff4bdeb" title="Rv of the regressor.">Rrv</a>; |
155 | | <a name="l00138"></a><a class="code" href="classbdm_1_1ArxDS.html#aa11a3f3fbeea1d17b66b073017964597">00138</a> vec <a class="code" href="classbdm_1_1ArxDS.html#aa11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>; |
156 | | <a name="l00140"></a><a class="code" href="classbdm_1_1ArxDS.html#a392b87be85675cb3d55fa4953d671bb5">00140</a> vec <a class="code" href="classbdm_1_1ArxDS.html#a392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a>; |
157 | | <a name="l00142"></a><a class="code" href="classbdm_1_1ArxDS.html#ab2d7530264499b92c3aa32454b960abe">00142</a> vec <a class="code" href="classbdm_1_1ArxDS.html#ab2d7530264499b92c3aa32454b960abe" title="temporary variable for regressor">rgr</a>; |
158 | | <a name="l00144"></a><a class="code" href="classbdm_1_1ArxDS.html#afbe7b993ec5f75c195ae1b2ccd96a898">00144</a> <a class="code" href="classbdm_1_1datalink.html" title="DataLink is a connection between two data vectors Up and Down.">datalink</a> <a class="code" href="classbdm_1_1ArxDS.html#afbe7b993ec5f75c195ae1b2ccd96a898" title="data link: H -&gt; rgr">rgrlnk</a>; |
159 | | <a name="l00146"></a><a class="code" href="classbdm_1_1ArxDS.html#a0aa9d8d35792159dc9611802f6c190eb">00146</a> <a class="code" href="classbdm_1_1mlnorm.html">mlnorm<chmat></a> <a class="code" href="classbdm_1_1ArxDS.html#a0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>; |
160 | | <a name="l00148"></a><a class="code" href="classbdm_1_1ArxDS.html#a064e5d3f2dc0b39459c7ca53d05223e1">00148</a> <span class="keywordtype">bool</span> <a class="code" href="classbdm_1_1ArxDS.html#a064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a>; |
161 | | <a name="l00150"></a><a class="code" href="classbdm_1_1ArxDS.html#ae13e5ffdfe9d896089310b0fc54e0c85">00150</a> <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1ArxDS.html#ae13e5ffdfe9d896089310b0fc54e0c85" title="loggers">L_theta</a>; |
162 | | <a name="l00151"></a>00151 <span class="keywordtype">int</span> L_R; |
163 | | <a name="l00152"></a>00152 <span class="keywordtype">int</span> dt_size; |
164 | | <a name="l00153"></a>00153 <span class="keyword">public</span>: |
165 | | <a name="l00154"></a><a class="code" href="classbdm_1_1ArxDS.html#adb242e35812c311c8415bb7e31c3f595">00154</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#adb242e35812c311c8415bb7e31c3f595" title="Returns full vector of observed data=[output, input].">getdata</a> ( vec &dt ) { |
166 | | <a name="l00155"></a>00155 dt = <a class="code" href="classbdm_1_1ArxDS.html#aa11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>; |
167 | | <a name="l00156"></a>00156 } |
168 | | <a name="l00157"></a>00157 |
169 | | <a name="l00158"></a><a class="code" href="classbdm_1_1ArxDS.html#a701151418bc5fc3861acef8359fb0d80">00158</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#a701151418bc5fc3861acef8359fb0d80" title="Returns data records at indeces.">getdata</a> ( vec &dt, <span class="keyword">const</span> ivec &indices ) { |
170 | | <a name="l00159"></a>00159 dt = <a class="code" href="classbdm_1_1ArxDS.html#aa11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a> ( indices ); |
171 | | <a name="l00160"></a>00160 } |
172 | | <a name="l00161"></a>00161 |
173 | | <a name="l00162"></a><a class="code" href="classbdm_1_1ArxDS.html#a8f6da8a00abba70bc58c7a4030bd8940">00162</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#a8f6da8a00abba70bc58c7a4030bd8940" title="Accepts action variable and schedule it for application.">write</a> ( vec &ut ) { |
174 | | <a name="l00163"></a>00163 <a class="code" href="classbdm_1_1ArxDS.html#a392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a> = ut; |
175 | | <a name="l00164"></a>00164 } |
| 102 | <a name="l00063"></a><a class="code" href="classbdm_1_1EpdfDS.html">00063</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1EpdfDS.html" title="Simulate data from a static pdf Trivial example of a data source, could be used for...">EpdfDS</a>: <span class="keyword">public</span> <a class="code" href="classbdm_1_1DS.html" title="Abstract class for discrete-time sources of data.">DS</a> { |
| 103 | <a name="l00064"></a>00064 <span class="keyword">protected</span>: |
| 104 | <a name="l00066"></a><a class="code" href="classbdm_1_1EpdfDS.html#a83784c6ca9d311a38ff768cb0718c5b5">00066</a> <a class="code" href="classbdm_1_1shared__ptr.html">shared_ptr<epdf></a> <a class="code" href="classbdm_1_1EpdfDS.html#a83784c6ca9d311a38ff768cb0718c5b5" title="internal pointer to epdf from which we samplecond">iepdf</a>; |
| 105 | <a name="l00068"></a><a class="code" href="classbdm_1_1EpdfDS.html#a67637d64bcabf6ecb4a80284dc60dc3f">00068</a> vec <a class="code" href="classbdm_1_1EpdfDS.html#a67637d64bcabf6ecb4a80284dc60dc3f" title="internal storage of data sample">dt</a>; |
| 106 | <a name="l00069"></a>00069 <span class="keyword">public</span>: |
| 107 | <a name="l00070"></a><a class="code" href="classbdm_1_1EpdfDS.html#aa1bd25d052dd50da9854d78e2f2096d0">00070</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1EpdfDS.html#aa1bd25d052dd50da9854d78e2f2096d0" title="Moves from to , i.e. perfroms the actions and reads response of the system.">step</a>() { |
| 108 | <a name="l00071"></a>00071 <a class="code" href="classbdm_1_1EpdfDS.html#a67637d64bcabf6ecb4a80284dc60dc3f" title="internal storage of data sample">dt</a>=<a class="code" href="classbdm_1_1EpdfDS.html#a83784c6ca9d311a38ff768cb0718c5b5" title="internal pointer to epdf from which we samplecond">iepdf</a>->sample(); |
| 109 | <a name="l00072"></a>00072 } |
| 110 | <a name="l00073"></a><a class="code" href="classbdm_1_1EpdfDS.html#a62c4a9d343dd773c4e75b5f2338b9ba7">00073</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1EpdfDS.html#a62c4a9d343dd773c4e75b5f2338b9ba7" title="Returns full vector of observed data=[output, input].">getdata</a> ( vec &dt_out ) { |
| 111 | <a name="l00074"></a>00074 dt_out = <a class="code" href="classbdm_1_1EpdfDS.html#a67637d64bcabf6ecb4a80284dc60dc3f" title="internal storage of data sample">dt</a>; |
| 112 | <a name="l00075"></a>00075 } |
| 113 | <a name="l00076"></a><a class="code" href="classbdm_1_1EpdfDS.html#a5b3d9370351ca393d4df6f6da6ac5f99">00076</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1EpdfDS.html#a5b3d9370351ca393d4df6f6da6ac5f99" title="Returns data records at indeces.">getdata</a> ( vec &dt_out, <span class="keyword">const</span> ivec &ids ) { |
| 114 | <a name="l00077"></a>00077 dt_out = <a class="code" href="classbdm_1_1EpdfDS.html#a67637d64bcabf6ecb4a80284dc60dc3f" title="internal storage of data sample">dt</a> ( ids ); |
| 115 | <a name="l00078"></a>00078 } |
| 116 | <a name="l00079"></a>00079 <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>& _drv() { |
| 117 | <a name="l00080"></a>00080 <span class="keywordflow">return</span> <a class="code" href="classbdm_1_1EpdfDS.html#a83784c6ca9d311a38ff768cb0718c5b5" title="internal pointer to epdf from which we samplecond">iepdf</a>->_rv(); |
| 118 | <a name="l00081"></a>00081 } |
| 119 | <a name="l00082"></a>00082 |
| 120 | <a name="l00090"></a><a class="code" href="classbdm_1_1EpdfDS.html#a3fdfb570b5d12332b2ba5662d17badac">00090</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1EpdfDS.html#a3fdfb570b5d12332b2ba5662d17badac">from_setting</a> ( <span class="keyword">const</span> Setting &<span class="keyword">set</span> ) { |
| 121 | <a name="l00091"></a>00091 <a class="code" href="classbdm_1_1EpdfDS.html#a83784c6ca9d311a38ff768cb0718c5b5" title="internal pointer to epdf from which we samplecond">iepdf</a>=UI::build<epdf> ( <span class="keyword">set</span>,<span class="stringliteral">"epdf"</span>,UI::compulsory ); |
| 122 | <a name="l00092"></a>00092 <a class="code" href="classbdm_1_1EpdfDS.html#a67637d64bcabf6ecb4a80284dc60dc3f" title="internal storage of data sample">dt</a> = zeros ( <a class="code" href="classbdm_1_1EpdfDS.html#a83784c6ca9d311a38ff768cb0718c5b5" title="internal pointer to epdf from which we samplecond">iepdf</a>->dimension() ); |
| 123 | <a name="l00093"></a>00093 } |
| 124 | <a name="l00094"></a>00094 }; |
| 125 | <a name="l00095"></a>00095 <a class="code" href="user__info_8h.html#a4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a> ( EpdfDS ); |
| 126 | <a name="l00096"></a>00096 |
| 127 | <a name="l00100"></a><a class="code" href="classbdm_1_1MpdfDS.html">00100</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1MpdfDS.html" title="Simulate data from conditional density Still having only one density but allowing...">MpdfDS</a> :<span class="keyword">public</span> <a class="code" href="classbdm_1_1DS.html" title="Abstract class for discrete-time sources of data.">DS</a> { |
| 128 | <a name="l00101"></a>00101 <span class="keyword">protected</span>: |
| 129 | <a name="l00103"></a><a class="code" href="classbdm_1_1MpdfDS.html#a7b91950fa4c2c323df69a6bc9a6a04ac">00103</a> <a class="code" href="classbdm_1_1shared__ptr.html">shared_ptr<mpdf></a> <a class="code" href="classbdm_1_1MpdfDS.html#a7b91950fa4c2c323df69a6bc9a6a04ac" title="internal pointer to epdf from which we samplecond">impdf</a>; |
| 130 | <a name="l00105"></a><a class="code" href="classbdm_1_1MpdfDS.html#a959cfe345bf0f165ff80f687826e1082">00105</a> vec <a class="code" href="classbdm_1_1MpdfDS.html#a959cfe345bf0f165ff80f687826e1082" title="internal storage of data sample">yt</a>; |
| 131 | <a name="l00107"></a><a class="code" href="classbdm_1_1MpdfDS.html#a27751c04183acab85bdaf3598f47a417">00107</a> vec <a class="code" href="classbdm_1_1MpdfDS.html#a27751c04183acab85bdaf3598f47a417" title="input vector">ut</a>; |
| 132 | <a name="l00109"></a><a class="code" href="classbdm_1_1MpdfDS.html#a54e70167144e692877e7b49633219d5a">00109</a> <a class="code" href="classbdm_1_1datalink__buffered.html" title="Datalink that buffers delayed values - do not forget to call step().">datalink_buffered</a> <a class="code" href="classbdm_1_1MpdfDS.html#a54e70167144e692877e7b49633219d5a" title="datalink between ut and regressor">ut2rgr</a>; |
| 133 | <a name="l00111"></a><a class="code" href="classbdm_1_1MpdfDS.html#a6ccbcf01b1cd5bd3500aefc3091d9a2b">00111</a> <a class="code" href="classbdm_1_1datalink__buffered.html" title="Datalink that buffers delayed values - do not forget to call step().">datalink_buffered</a> <a class="code" href="classbdm_1_1MpdfDS.html#a6ccbcf01b1cd5bd3500aefc3091d9a2b" title="datalink between yt and regressor">yt2rgr</a>; |
| 134 | <a name="l00113"></a><a class="code" href="classbdm_1_1MpdfDS.html#a1fffeda455aa454c4509ff69fa9ccb3e">00113</a> vec <a class="code" href="classbdm_1_1MpdfDS.html#a1fffeda455aa454c4509ff69fa9ccb3e" title="numeric values of regressor">rgr</a>; |
| 135 | <a name="l00114"></a>00114 |
| 136 | <a name="l00115"></a>00115 <span class="keyword">public</span>: |
| 137 | <a name="l00116"></a><a class="code" href="classbdm_1_1MpdfDS.html#a9dfd98688d14f647c613bf63a95a19b6">00116</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1MpdfDS.html#a9dfd98688d14f647c613bf63a95a19b6" title="Moves from to , i.e. perfroms the actions and reads response of the system.">step</a>() { |
| 138 | <a name="l00117"></a>00117 <a class="code" href="classbdm_1_1MpdfDS.html#a6ccbcf01b1cd5bd3500aefc3091d9a2b" title="datalink between yt and regressor">yt2rgr</a>.<a class="code" href="classbdm_1_1datalink__buffered.html#af137706c55891ba8a8aecc52ea96865f" title="push current data to history">step</a>(<a class="code" href="classbdm_1_1MpdfDS.html#a959cfe345bf0f165ff80f687826e1082" title="internal storage of data sample">yt</a>); <span class="comment">// y is now history</span> |
| 139 | <a name="l00118"></a>00118 <a class="code" href="classbdm_1_1MpdfDS.html#a54e70167144e692877e7b49633219d5a" title="datalink between ut and regressor">ut2rgr</a>.<a class="code" href="classbdm_1_1datalink__buffered.html#a681745a319728a416486df38aacd579f" title="Get val for vector val_down from val of &quot;Up&quot;.">filldown</a> ( <a class="code" href="classbdm_1_1MpdfDS.html#a27751c04183acab85bdaf3598f47a417" title="input vector">ut</a>,<a class="code" href="classbdm_1_1MpdfDS.html#a1fffeda455aa454c4509ff69fa9ccb3e" title="numeric values of regressor">rgr</a> ); |
| 140 | <a name="l00119"></a>00119 <a class="code" href="classbdm_1_1MpdfDS.html#a6ccbcf01b1cd5bd3500aefc3091d9a2b" title="datalink between yt and regressor">yt2rgr</a>.<a class="code" href="classbdm_1_1datalink__buffered.html#a681745a319728a416486df38aacd579f" title="Get val for vector val_down from val of &quot;Up&quot;.">filldown</a> ( <a class="code" href="classbdm_1_1MpdfDS.html#a959cfe345bf0f165ff80f687826e1082" title="internal storage of data sample">yt</a>,<a class="code" href="classbdm_1_1MpdfDS.html#a1fffeda455aa454c4509ff69fa9ccb3e" title="numeric values of regressor">rgr</a> ); |
| 141 | <a name="l00120"></a>00120 <a class="code" href="classbdm_1_1MpdfDS.html#a959cfe345bf0f165ff80f687826e1082" title="internal storage of data sample">yt</a>=<a class="code" href="classbdm_1_1MpdfDS.html#a7b91950fa4c2c323df69a6bc9a6a04ac" title="internal pointer to epdf from which we samplecond">impdf</a>->samplecond ( <a class="code" href="classbdm_1_1MpdfDS.html#a1fffeda455aa454c4509ff69fa9ccb3e" title="numeric values of regressor">rgr</a> ); |
| 142 | <a name="l00121"></a>00121 <a class="code" href="classbdm_1_1MpdfDS.html#a54e70167144e692877e7b49633219d5a" title="datalink between ut and regressor">ut2rgr</a>.<a class="code" href="classbdm_1_1datalink__buffered.html#af137706c55891ba8a8aecc52ea96865f" title="push current data to history">step</a>(<a class="code" href="classbdm_1_1MpdfDS.html#a27751c04183acab85bdaf3598f47a417" title="input vector">ut</a>); <span class="comment">//u is now history</span> |
| 143 | <a name="l00122"></a>00122 } |
| 144 | <a name="l00123"></a><a class="code" href="classbdm_1_1MpdfDS.html#a8752dbb56c269353cd5135349b4f8408">00123</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1MpdfDS.html#a8752dbb56c269353cd5135349b4f8408" title="Returns full vector of observed data=[output, input].">getdata</a> ( vec &dt_out ) { |
| 145 | <a name="l00124"></a>00124 <a class="code" href="bdmerror_8h.html#a89a0f906b242b79c5d3d342291b2cab4" title="Throw std::runtime_exception if t is not true and NDEBUG is not defined.">bdm_assert_debug</a>(dt_out.length()>=<a class="code" href="classbdm_1_1DS.html#ad7467046a0bd05bc992cc5e1bdedb983" title="size of data">utsize</a>+<a class="code" href="classbdm_1_1DS.html#a22a4b29aa6e9f3bf17bcc4b28567e8bd" title="size of output">ytsize</a>,<span class="stringliteral">"Short output vector"</span>); |
| 146 | <a name="l00125"></a>00125 dt_out.set_subvector(0, <a class="code" href="classbdm_1_1MpdfDS.html#a959cfe345bf0f165ff80f687826e1082" title="internal storage of data sample">yt</a>); |
| 147 | <a name="l00126"></a>00126 dt_out.set_subvector(ytsize, <a class="code" href="classbdm_1_1MpdfDS.html#a27751c04183acab85bdaf3598f47a417" title="input vector">ut</a>); |
| 148 | <a name="l00127"></a>00127 } |
| 149 | <a name="l00128"></a>00128 <span class="keywordtype">void</span> write(<span class="keyword">const</span> vec &ut0){<a class="code" href="classbdm_1_1MpdfDS.html#a27751c04183acab85bdaf3598f47a417" title="input vector">ut</a>=ut0;} |
| 150 | <a name="l00129"></a>00129 |
| 151 | <a name="l00137"></a><a class="code" href="classbdm_1_1MpdfDS.html#a39ef55fb36da354c93c544129e03f558">00137</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1MpdfDS.html#a39ef55fb36da354c93c544129e03f558">from_setting</a> ( <span class="keyword">const</span> Setting &<span class="keyword">set</span> ) { |
| 152 | <a name="l00138"></a>00138 <a class="code" href="classbdm_1_1MpdfDS.html#a7b91950fa4c2c323df69a6bc9a6a04ac" title="internal pointer to epdf from which we samplecond">impdf</a>=UI::build<mpdf> ( <span class="keyword">set</span>,<span class="stringliteral">"mpdf"</span>,UI::compulsory ); |
| 153 | <a name="l00139"></a>00139 |
| 154 | <a name="l00140"></a>00140 <a class="code" href="classbdm_1_1DS.html#aeb9de2a85f0d8257d79d9b68c05c4995" title="Description of output data.">Yrv</a> = <a class="code" href="classbdm_1_1MpdfDS.html#a7b91950fa4c2c323df69a6bc9a6a04ac" title="internal pointer to epdf from which we samplecond">impdf</a>->_rv(); |
| 155 | <a name="l00141"></a>00141 <span class="comment">// get unique rvs form rvc</span> |
| 156 | <a name="l00142"></a>00142 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> rgrv0=<a class="code" href="classbdm_1_1MpdfDS.html#a7b91950fa4c2c323df69a6bc9a6a04ac" title="internal pointer to epdf from which we samplecond">impdf</a>->_rvc().remove_time(); |
| 157 | <a name="l00143"></a>00143 <span class="comment">// input is what in not in Yrv</span> |
| 158 | <a name="l00144"></a>00144 <a class="code" href="classbdm_1_1DS.html#a9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>=rgrv0.<a class="code" href="classbdm_1_1RV.html#aaec44dabdf0a6d90fbae95e1356eda39" title="Subtract another variable from the current one.">subt</a>(Yrv); |
| 159 | <a name="l00145"></a>00145 <a class="code" href="classbdm_1_1DS.html#a3a92d77fd97fdb6bf1c8edb1e38c6bbc" title="set random variables">set_drv</a>(Yrv, <a class="code" href="classbdm_1_1DS.html#a9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>); |
| 160 | <a name="l00146"></a>00146 <span class="comment">// connect input and output to rvc</span> |
| 161 | <a name="l00147"></a>00147 <a class="code" href="classbdm_1_1MpdfDS.html#a54e70167144e692877e7b49633219d5a" title="datalink between ut and regressor">ut2rgr</a>.<a class="code" href="classbdm_1_1datalink__buffered.html#aadefa427312905425ebab8531da1846a" title="set connection, rv must be fully present in rv_up">set_connection</a>(<a class="code" href="classbdm_1_1MpdfDS.html#a7b91950fa4c2c323df69a6bc9a6a04ac" title="internal pointer to epdf from which we samplecond">impdf</a>->_rvc(), <a class="code" href="classbdm_1_1DS.html#a9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>); |
| 162 | <a name="l00148"></a>00148 <a class="code" href="classbdm_1_1MpdfDS.html#a6ccbcf01b1cd5bd3500aefc3091d9a2b" title="datalink between yt and regressor">yt2rgr</a>.<a class="code" href="classbdm_1_1datalink__buffered.html#aadefa427312905425ebab8531da1846a" title="set connection, rv must be fully present in rv_up">set_connection</a>(<a class="code" href="classbdm_1_1MpdfDS.html#a7b91950fa4c2c323df69a6bc9a6a04ac" title="internal pointer to epdf from which we samplecond">impdf</a>->_rvc(), Yrv); |
| 163 | <a name="l00149"></a>00149 |
| 164 | <a name="l00150"></a>00150 <a class="code" href="classbdm_1_1MpdfDS.html#a959cfe345bf0f165ff80f687826e1082" title="internal storage of data sample">yt</a> = zeros ( <a class="code" href="classbdm_1_1MpdfDS.html#a7b91950fa4c2c323df69a6bc9a6a04ac" title="internal pointer to epdf from which we samplecond">impdf</a>->dimension() ); |
| 165 | <a name="l00151"></a>00151 <a class="code" href="classbdm_1_1MpdfDS.html#a1fffeda455aa454c4509ff69fa9ccb3e" title="numeric values of regressor">rgr</a> = zeros ( <a class="code" href="classbdm_1_1MpdfDS.html#a7b91950fa4c2c323df69a6bc9a6a04ac" title="internal pointer to epdf from which we samplecond">impdf</a>->dimensionc() ); |
| 166 | <a name="l00152"></a>00152 <a class="code" href="classbdm_1_1MpdfDS.html#a27751c04183acab85bdaf3598f47a417" title="input vector">ut</a> = zeros(<a class="code" href="classbdm_1_1DS.html#a9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>.<a class="code" href="classbdm_1_1RV.html#ade30156104f61d86c94f758861418089" title="total size of a random variable">_dsize</a>()); |
| 167 | <a name="l00153"></a>00153 |
| 168 | <a name="l00154"></a>00154 <a class="code" href="classbdm_1_1DS.html#a22a4b29aa6e9f3bf17bcc4b28567e8bd" title="size of output">ytsize</a>=<a class="code" href="classbdm_1_1MpdfDS.html#a959cfe345bf0f165ff80f687826e1082" title="internal storage of data sample">yt</a>.length(); |
| 169 | <a name="l00155"></a>00155 <a class="code" href="classbdm_1_1DS.html#ad7467046a0bd05bc992cc5e1bdedb983" title="size of data">utsize</a>=ut.length(); |
| 170 | <a name="l00156"></a>00156 <a class="code" href="classbdm_1_1DS.html#af96cae44624e79638a91ec4f2c7c81a9" title="size of data returned by getdata() ">dtsize</a> = ytsize+<a class="code" href="classbdm_1_1DS.html#ad7467046a0bd05bc992cc5e1bdedb983" title="size of data">utsize</a>; |
| 171 | <a name="l00157"></a>00157 } |
| 172 | <a name="l00158"></a>00158 }; |
| 173 | <a name="l00159"></a>00159 <a class="code" href="user__info_8h.html#a4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a> ( MpdfDS ); |
| 174 | <a name="l00160"></a>00160 |
| 175 | <a name="l00164"></a><a class="code" href="classbdm_1_1FileDS.html">00164</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1FileDS.html">FileDS</a>: <span class="keyword">public</span> <a class="code" href="classbdm_1_1MemDS.html" title="Memory storage of off-line data column-wise.">MemDS</a> { |
182 | | <a name="l00171"></a>00171 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#a57dfa26b23cc03d53b123fa7e0474b19" title="Moves from to , i.e. perfroms the actions and reads response of the system.">step</a>(); |
183 | | <a name="l00172"></a>00172 |
184 | | <a name="l00174"></a><a class="code" href="classbdm_1_1ArxDS.html#a7c8b418677a48041adacac8e8e9c9849">00174</a> <a class="code" href="classbdm_1_1ArxDS.html#a7c8b418677a48041adacac8e8e9c9849" title="Default constructor.">ArxDS</a> ( ) {}; |
185 | | <a name="l00176"></a><a class="code" href="classbdm_1_1ArxDS.html#a2d9abc62f1fee862f0e1c60c5c4a3c8a">00176</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#a2d9abc62f1fee862f0e1c60c5c4a3c8a" title="Set parameters of the internal model, H is maximum time delay.">set_parameters</a> ( <span class="keyword">const</span> mat &Th0, <span class="keyword">const</span> vec mu0, <span class="keyword">const</span> <a class="code" href="classbdm_1_1chmat.html" title="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</a> &sqR0 ) { |
186 | | <a name="l00177"></a>00177 <a class="code" href="classbdm_1_1ArxDS.html#a0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>.<a class="code" href="classbdm_1_1mlnorm.html#a04f7c6cda7b2f95161dd5fbcf15d1fd5" title="Set A and R.">set_parameters</a> ( Th0, mu0, sqR0 ); |
187 | | <a name="l00178"></a>00178 }; |
188 | | <a name="l00180"></a><a class="code" href="classbdm_1_1ArxDS.html#ad57285965debab8a4bfc340d4477c853">00180</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#ad57285965debab8a4bfc340d4477c853" title="Set.">set_drv</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &yrv, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &urv, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &rrv ) { |
189 | | <a name="l00181"></a>00181 <a class="code" href="classbdm_1_1ArxDS.html#ac7b3cc6cd059ff3d7f4462cedff4bdeb" title="Rv of the regressor.">Rrv</a> = rrv; |
190 | | <a name="l00182"></a>00182 <a class="code" href="classbdm_1_1DS.html#a9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a> = urv; |
191 | | <a name="l00183"></a>00183 dt_size = yrv._dsize() + urv._dsize(); |
192 | | <a name="l00184"></a>00184 |
193 | | <a name="l00185"></a>00185 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> drv = concat ( yrv, urv ); |
194 | | <a name="l00186"></a>00186 <a class="code" href="classbdm_1_1DS.html#ad8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a> = drv; |
195 | | <a name="l00187"></a>00187 <span class="keywordtype">int</span> td = rrv.<a class="code" href="classbdm_1_1RV.html#a9a5c5aeeaf39299d07763377b05a8241" title="Minimum time-offset.">mint</a>(); |
196 | | <a name="l00188"></a>00188 <a class="code" href="classbdm_1_1ArxDS.html#aa11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>.set_size ( drv._dsize() * ( -td + 1 ) ); |
197 | | <a name="l00189"></a>00189 <a class="code" href="classbdm_1_1ArxDS.html#a392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a>.set_size ( <a class="code" href="classbdm_1_1DS.html#a9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>._dsize() ); |
198 | | <a name="l00190"></a>00190 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = -1; i >= td; i-- ) { |
199 | | <a name="l00191"></a>00191 drv.<a class="code" href="classbdm_1_1RV.html#abd77cb0899f7fba1d0e34396137b7f1f" title="Shift time by delta.">t</a> ( -1 ); |
200 | | <a name="l00192"></a>00192 <a class="code" href="classbdm_1_1DS.html#ad8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>.<a class="code" href="classbdm_1_1RV.html#a87841b5ee43997b79789c0c22047e224" title="Add (concat) another variable to the current one,.">add</a> ( drv ); <span class="comment">//shift u1</span> |
201 | | <a name="l00193"></a>00193 } |
202 | | <a name="l00194"></a>00194 <a class="code" href="classbdm_1_1ArxDS.html#afbe7b993ec5f75c195ae1b2ccd96a898" title="data link: H -&gt; rgr">rgrlnk</a>.<a class="code" href="classbdm_1_1datalink.html#afb8337aac8329eb0ca96bfb3ff73ec67" title="set connection, rv must be fully present in rv_up">set_connection</a> ( rrv, <a class="code" href="classbdm_1_1DS.html#ad8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a> ); |
203 | | <a name="l00195"></a>00195 |
204 | | <a name="l00196"></a>00196 dtsize = <a class="code" href="classbdm_1_1DS.html#ad8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>._dsize(); |
205 | | <a name="l00197"></a>00197 utsize = <a class="code" href="classbdm_1_1DS.html#a9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>._dsize(); |
206 | | <a name="l00198"></a>00198 } |
207 | | <a name="l00200"></a><a class="code" href="classbdm_1_1ArxDS.html#ae7438127de87c5a8128edfa12255b436">00200</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#ae7438127de87c5a8128edfa12255b436" title="set options from a string">set_options</a> ( <span class="keyword">const</span> <span class="keywordtype">string</span> &s ) { |
208 | | <a name="l00201"></a>00201 <a class="code" href="classbdm_1_1ArxDS.html#a064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a> = ( s.find ( <span class="stringliteral">"L_theta"</span> ) != string::npos ); |
209 | | <a name="l00202"></a>00202 }; |
210 | | <a name="l00203"></a><a class="code" href="classbdm_1_1ArxDS.html#a64819633a1191fcaa60d0de26ade2e52">00203</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#a64819633a1191fcaa60d0de26ade2e52" title="Register DS for logging into logger L.">log_add</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &L ) { |
211 | | <a name="l00204"></a>00204 <span class="comment">//DS::log_add ( L ); too long!!</span> |
212 | | <a name="l00205"></a>00205 <a class="code" href="classbdm_1_1DS.html#ab4b7bdb9d98a11ab587aa0ad803bb867" title="Remember its own index in Logger L.">L_dt</a> = L.<a class="code" href="classbdm_1_1logger.html#a47aa3b098a81d02a8ffaea2c9fa09ac7">add</a> ( <a class="code" href="classbdm_1_1DS.html#ad8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a> ( 0, dt_size ), <span class="stringliteral">""</span> ); |
213 | | <a name="l00206"></a>00206 L_ut = L.<a class="code" href="classbdm_1_1logger.html#a47aa3b098a81d02a8ffaea2c9fa09ac7">add</a> ( <a class="code" href="classbdm_1_1DS.html#a9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>, <span class="stringliteral">""</span> ); |
| 182 | <a name="l00171"></a><a class="code" href="classbdm_1_1FileDS.html#a3c546e8d9eb71e079e046e3d2f69c6c4">00171</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1FileDS.html#a3c546e8d9eb71e079e046e3d2f69c6c4" title="Returns data records at indeces.">getdata</a> ( vec &dt, <span class="keyword">const</span> ivec &indices ) { |
| 183 | <a name="l00172"></a>00172 vec tmp = <a class="code" href="classbdm_1_1MemDS.html#aa724f4cbfc32e79bacc044253234e260" title="internal matrix of data">Data</a>.get_col ( <a class="code" href="classbdm_1_1MemDS.html#a681ee3831f68f4f20ed54e04e8b3f107" title="active column in the Data matrix">time</a> ); |
| 184 | <a name="l00173"></a>00173 dt = tmp ( indices ); |
| 185 | <a name="l00174"></a>00174 } |
| 186 | <a name="l00175"></a>00175 |
| 187 | <a name="l00177"></a><a class="code" href="classbdm_1_1FileDS.html#aa6af63065097147b390e684a7842a26a">00177</a> <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1FileDS.html#aa6af63065097147b390e684a7842a26a" title="returns number of data in the file;">ndat</a>() { |
| 188 | <a name="l00178"></a>00178 <span class="keywordflow">return</span> <a class="code" href="classbdm_1_1MemDS.html#aa724f4cbfc32e79bacc044253234e260" title="internal matrix of data">Data</a>.cols(); |
| 189 | <a name="l00179"></a>00179 } |
| 190 | <a name="l00181"></a><a class="code" href="classbdm_1_1FileDS.html#a998f590eeddee97ae6918671e40756b8">00181</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1FileDS.html#a998f590eeddee97ae6918671e40756b8" title="no sense to log this type">log_add</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &L ) {}; |
| 191 | <a name="l00183"></a><a class="code" href="classbdm_1_1FileDS.html#a59d44ef34a523127dd79c076461c43b6">00183</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1FileDS.html#a59d44ef34a523127dd79c076461c43b6" title="no sense to log this type">logit</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &L ) {}; |
| 192 | <a name="l00184"></a>00184 }; |
| 193 | <a name="l00185"></a>00185 |
| 194 | <a name="l00192"></a><a class="code" href="classbdm_1_1ITppFileDS.html">00192</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1ITppFileDS.html" title="Read Data Matrix from an IT file.">ITppFileDS</a>: <span class="keyword">public</span> <a class="code" href="classbdm_1_1FileDS.html">FileDS</a> { |
| 195 | <a name="l00193"></a>00193 |
| 196 | <a name="l00194"></a>00194 <span class="keyword">public</span>: |
| 197 | <a name="l00195"></a>00195 <a class="code" href="classbdm_1_1ITppFileDS.html" title="Read Data Matrix from an IT file.">ITppFileDS</a> ( <span class="keyword">const</span> <span class="keywordtype">string</span> &fname, <span class="keyword">const</span> <span class="keywordtype">string</span> &varname ) : <a class="code" href="classbdm_1_1FileDS.html">FileDS</a>() { |
| 198 | <a name="l00196"></a>00196 it_file it ( fname ); |
| 199 | <a name="l00197"></a>00197 it << Name ( varname ); |
| 200 | <a name="l00198"></a>00198 it >> <a class="code" href="classbdm_1_1MemDS.html#aa724f4cbfc32e79bacc044253234e260" title="internal matrix of data">Data</a>; |
| 201 | <a name="l00199"></a>00199 <a class="code" href="classbdm_1_1MemDS.html#a681ee3831f68f4f20ed54e04e8b3f107" title="active column in the Data matrix">time</a> = 0; |
| 202 | <a name="l00200"></a>00200 <span class="comment">//rowid and delays are ignored</span> |
| 203 | <a name="l00201"></a>00201 }; |
| 204 | <a name="l00202"></a>00202 |
| 205 | <a name="l00203"></a>00203 <a class="code" href="classbdm_1_1ITppFileDS.html" title="Read Data Matrix from an IT file.">ITppFileDS</a> () : <a class="code" href="classbdm_1_1FileDS.html">FileDS</a>() { |
| 206 | <a name="l00204"></a>00204 }; |
| 207 | <a name="l00205"></a>00205 |
| 208 | <a name="l00206"></a>00206 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ITppFileDS.html#afd192da176625a909fa853458b604566" title="This method arrange instance properties according the data stored in the Setting...">from_setting</a> ( <span class="keyword">const</span> Setting &<span class="keyword">set</span> ); |
215 | | <a name="l00208"></a>00208 mat &A = <a class="code" href="classbdm_1_1ArxDS.html#a0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>.<a class="code" href="classbdm_1_1mlnorm.html#ab256b547c5156b5898a3a1e5462f9540" title="access function">_A</a>(); |
216 | | <a name="l00209"></a>00209 mat R = <a class="code" href="classbdm_1_1ArxDS.html#a0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>.<a class="code" href="classbdm_1_1mlnorm.html#a564715dea56f7bbff0083aec295ce97e" title="access function">_R</a>(); |
217 | | <a name="l00210"></a>00210 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1ArxDS.html#a064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a> ) { |
218 | | <a name="l00211"></a>00211 <a class="code" href="classbdm_1_1ArxDS.html#ae13e5ffdfe9d896089310b0fc54e0c85" title="loggers">L_theta</a> = L.<a class="code" href="classbdm_1_1logger.html#a47aa3b098a81d02a8ffaea2c9fa09ac7">add</a> ( <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> ( <span class="stringliteral">"{th }"</span>, vec_1 ( A.rows() * A.cols() ) ), <span class="stringliteral">"t"</span> ); |
219 | | <a name="l00212"></a>00212 } |
220 | | <a name="l00213"></a>00213 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1ArxDS.html#a064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a> ) { |
221 | | <a name="l00214"></a>00214 L_R = L.<a class="code" href="classbdm_1_1logger.html#a47aa3b098a81d02a8ffaea2c9fa09ac7">add</a> ( <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> ( <span class="stringliteral">"{R }"</span>, vec_1 ( R.rows() * R.cols() ) ), <span class="stringliteral">"r"</span> ); |
222 | | <a name="l00215"></a>00215 } |
223 | | <a name="l00216"></a>00216 } |
224 | | <a name="l00217"></a><a class="code" href="classbdm_1_1ArxDS.html#a4128f5dc3a04063d62fc7e35635aeb90">00217</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#a4128f5dc3a04063d62fc7e35635aeb90" title="Register DS for logging into logger L.">logit</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &L ) { |
225 | | <a name="l00218"></a>00218 <span class="comment">//DS::logit ( L );</span> |
226 | | <a name="l00219"></a>00219 L.<a class="code" href="classbdm_1_1logger.html#ae30f695619931b3c372ab280e452d309" title="log this vector">logit</a> ( <a class="code" href="classbdm_1_1DS.html#ab4b7bdb9d98a11ab587aa0ad803bb867" title="Remember its own index in Logger L.">L_dt</a>, <a class="code" href="classbdm_1_1ArxDS.html#aa11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>.left ( dt_size ) ); |
227 | | <a name="l00220"></a>00220 L.<a class="code" href="classbdm_1_1logger.html#ae30f695619931b3c372ab280e452d309" title="log this vector">logit</a> ( L_ut, <a class="code" href="classbdm_1_1ArxDS.html#a392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a> ); |
228 | | <a name="l00221"></a>00221 |
229 | | <a name="l00222"></a>00222 mat &A = <a class="code" href="classbdm_1_1ArxDS.html#a0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>.<a class="code" href="classbdm_1_1mlnorm.html#ab256b547c5156b5898a3a1e5462f9540" title="access function">_A</a>(); |
230 | | <a name="l00223"></a>00223 mat R = <a class="code" href="classbdm_1_1ArxDS.html#a0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>.<a class="code" href="classbdm_1_1mlnorm.html#a564715dea56f7bbff0083aec295ce97e" title="access function">_R</a>(); |
231 | | <a name="l00224"></a>00224 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1ArxDS.html#a064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a> ) { |
232 | | <a name="l00225"></a>00225 L.<a class="code" href="classbdm_1_1logger.html#ae30f695619931b3c372ab280e452d309" title="log this vector">logit</a> ( <a class="code" href="classbdm_1_1ArxDS.html#ae13e5ffdfe9d896089310b0fc54e0c85" title="loggers">L_theta</a>, vec ( A._data(), A.rows() *A.cols() ) ); |
233 | | <a name="l00226"></a>00226 }; |
234 | | <a name="l00227"></a>00227 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1ArxDS.html#a064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a> ) { |
235 | | <a name="l00228"></a>00228 L.<a class="code" href="classbdm_1_1logger.html#ae30f695619931b3c372ab280e452d309" title="log this vector">logit</a> ( L_R, vec ( R._data(), R.rows() *R.rows() ) ); |
236 | | <a name="l00229"></a>00229 }; |
237 | | <a name="l00230"></a>00230 } |
238 | | <a name="l00231"></a>00231 |
239 | | <a name="l00232"></a>00232 <span class="comment">// TODO dokumentace - aktualizovat</span> |
240 | | <a name="l00264"></a>00264 <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#a9b109ee7bba9774057b107383b6ecc24">from_setting</a> ( <span class="keyword">const</span> Setting &<span class="keyword">set</span> ); |
241 | | <a name="l00265"></a>00265 |
242 | | <a name="l00266"></a>00266 <span class="comment">// TODO dodelat void to_setting( Setting &set ) const;</span> |
243 | | <a name="l00267"></a>00267 }; |
244 | | <a name="l00268"></a>00268 |
245 | | <a name="l00269"></a>00269 <a class="code" href="user__info_8h.html#a4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a> ( ArxDS ); |
246 | | <a name="l00270"></a>00270 SHAREDPTR ( ArxDS ); |
247 | | <a name="l00271"></a>00271 |
248 | | <a name="l00272"></a><a class="code" href="classbdm_1_1stateDS.html">00272</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1stateDS.html">stateDS</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1DS.html" title="Abstract class for discrete-time sources of data.">DS</a> { |
249 | | <a name="l00273"></a>00273 <span class="keyword">private</span>: |
250 | | <a name="l00275"></a>00275 <a class="code" href="classbdm_1_1shared__ptr.html">shared_ptr<mpdf></a> IM; |
251 | | <a name="l00276"></a>00276 |
252 | | <a name="l00278"></a>00278 <a class="code" href="classbdm_1_1shared__ptr.html">shared_ptr<mpdf></a> OM; |
253 | | <a name="l00279"></a>00279 |
254 | | <a name="l00280"></a>00280 <span class="keyword">protected</span>: |
255 | | <a name="l00282"></a><a class="code" href="classbdm_1_1stateDS.html#a839bd9979c0aa407bc575e536f0a9918">00282</a> vec <a class="code" href="classbdm_1_1stateDS.html#a839bd9979c0aa407bc575e536f0a9918" title="result storage">dt</a>; |
256 | | <a name="l00284"></a><a class="code" href="classbdm_1_1stateDS.html#ac055a609e44f77300aa86e903df4f088">00284</a> vec <a class="code" href="classbdm_1_1stateDS.html#ac055a609e44f77300aa86e903df4f088" title="state storage">xt</a>; |
257 | | <a name="l00286"></a><a class="code" href="classbdm_1_1stateDS.html#aabbdb3dcf67a06f5a9003828819bafbf">00286</a> vec <a class="code" href="classbdm_1_1stateDS.html#aabbdb3dcf67a06f5a9003828819bafbf" title="input storage">ut</a>; |
258 | | <a name="l00288"></a><a class="code" href="classbdm_1_1stateDS.html#a16cdcdd5c878ebeebe7cad71c87f77ca">00288</a> <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1stateDS.html#a16cdcdd5c878ebeebe7cad71c87f77ca" title="Logger.">L_xt</a>; |
259 | | <a name="l00289"></a>00289 |
260 | | <a name="l00290"></a>00290 <span class="keyword">public</span>: |
261 | | <a name="l00291"></a><a class="code" href="classbdm_1_1stateDS.html#a5c9f4a93313f69adfa97375b58c0a6c2">00291</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1stateDS.html#a5c9f4a93313f69adfa97375b58c0a6c2" title="Returns full vector of observed data=[output, input].">getdata</a> ( vec &dt0 ) { |
262 | | <a name="l00292"></a>00292 dt0 = <a class="code" href="classbdm_1_1stateDS.html#a839bd9979c0aa407bc575e536f0a9918" title="result storage">dt</a>; |
263 | | <a name="l00293"></a>00293 } |
264 | | <a name="l00294"></a>00294 |
265 | | <a name="l00295"></a><a class="code" href="classbdm_1_1stateDS.html#ad61e149db7c7b3a1289ac82f37c97700">00295</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1stateDS.html#ad61e149db7c7b3a1289ac82f37c97700" title="Returns data records at indeces.">getdata</a> ( vec &dt0, <span class="keyword">const</span> ivec &indices ) { |
266 | | <a name="l00296"></a>00296 dt0 = <a class="code" href="classbdm_1_1stateDS.html#a839bd9979c0aa407bc575e536f0a9918" title="result storage">dt</a> ( indices ); |
267 | | <a name="l00297"></a>00297 } |
268 | | <a name="l00298"></a>00298 |
269 | | <a name="l00299"></a>00299 <a class="code" href="classbdm_1_1stateDS.html">stateDS</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1shared__ptr.html">shared_ptr<mpdf></a> &IM0, <span class="keyword">const</span> <a class="code" href="classbdm_1_1shared__ptr.html">shared_ptr<mpdf></a> &OM0, <span class="keywordtype">int</span> usize ) : IM ( IM0 ), OM ( OM0 ), |
270 | | <a name="l00300"></a>00300 <a class="code" href="classbdm_1_1stateDS.html#a839bd9979c0aa407bc575e536f0a9918" title="result storage">dt</a> ( OM0->dimension() ), <a class="code" href="classbdm_1_1stateDS.html#ac055a609e44f77300aa86e903df4f088" title="state storage">xt</a> ( IM0->dimension() ), |
271 | | <a name="l00301"></a>00301 <a class="code" href="classbdm_1_1stateDS.html#aabbdb3dcf67a06f5a9003828819bafbf" title="input storage">ut</a> ( usize ), <a class="code" href="classbdm_1_1stateDS.html#a16cdcdd5c878ebeebe7cad71c87f77ca" title="Logger.">L_xt</a>(0) { } |
272 | | <a name="l00302"></a>00302 |
273 | | <a name="l00303"></a>00303 stateDS() : <a class="code" href="classbdm_1_1stateDS.html#a16cdcdd5c878ebeebe7cad71c87f77ca" title="Logger.">L_xt</a>(0) { } |
274 | | <a name="l00304"></a>00304 |
275 | | <a name="l00305"></a><a class="code" href="classbdm_1_1stateDS.html#a1e98f3e362e35245d565c2508527ae14">00305</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1stateDS.html#a1e98f3e362e35245d565c2508527ae14" title="Moves from to , i.e. perfroms the actions and reads response of the system.">step</a>() { |
276 | | <a name="l00306"></a>00306 <a class="code" href="classbdm_1_1stateDS.html#ac055a609e44f77300aa86e903df4f088" title="state storage">xt</a> = IM->samplecond ( concat ( <a class="code" href="classbdm_1_1stateDS.html#ac055a609e44f77300aa86e903df4f088" title="state storage">xt</a>, <a class="code" href="classbdm_1_1stateDS.html#aabbdb3dcf67a06f5a9003828819bafbf" title="input storage">ut</a> ) ); |
277 | | <a name="l00307"></a>00307 <a class="code" href="classbdm_1_1stateDS.html#a839bd9979c0aa407bc575e536f0a9918" title="result storage">dt</a> = OM->samplecond ( concat ( <a class="code" href="classbdm_1_1stateDS.html#ac055a609e44f77300aa86e903df4f088" title="state storage">xt</a>, <a class="code" href="classbdm_1_1stateDS.html#aabbdb3dcf67a06f5a9003828819bafbf" title="input storage">ut</a> ) ); |
278 | | <a name="l00308"></a>00308 } |
| 210 | <a name="l00208"></a>00208 <span class="comment">// TODO dodelat void to_setting( Setting &set ) const;</span> |
| 211 | <a name="l00209"></a>00209 |
| 212 | <a name="l00210"></a>00210 }; |
| 213 | <a name="l00211"></a>00211 |
| 214 | <a name="l00212"></a>00212 <a class="code" href="user__info_8h.html#a4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a> ( <a class="code" href="classbdm_1_1ITppFileDS.html" title="Read Data Matrix from an IT file.">ITppFileDS</a> ); |
| 215 | <a name="l00213"></a>00213 SHAREDPTR ( <a class="code" href="classbdm_1_1ITppFileDS.html" title="Read Data Matrix from an IT file.">ITppFileDS</a> ); |
| 216 | <a name="l00214"></a>00214 |
| 217 | <a name="l00222"></a><a class="code" href="classbdm_1_1CsvFileDS.html">00222</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1CsvFileDS.html" title="CSV file data storage The constructor creates Data matrix from the records in a CSV...">CsvFileDS</a>: <span class="keyword">public</span> <a class="code" href="classbdm_1_1FileDS.html">FileDS</a> { |
| 218 | <a name="l00223"></a>00223 |
| 219 | <a name="l00224"></a>00224 <span class="keyword">public</span>: |
| 220 | <a name="l00226"></a>00226 <a class="code" href="classbdm_1_1CsvFileDS.html#a8d9d56cdf6b8d0236e32a80e11c238b0" title="Constructor - create DS from a CSV file.">CsvFileDS</a> ( <span class="keyword">const</span> <span class="keywordtype">string</span>& fname, <span class="keyword">const</span> <span class="keywordtype">string</span>& orientation = <span class="stringliteral">"BY_COL"</span> ); |
| 221 | <a name="l00227"></a>00227 }; |
| 222 | <a name="l00228"></a>00228 |
| 223 | <a name="l00229"></a>00229 |
| 224 | <a name="l00230"></a>00230 |
| 225 | <a name="l00235"></a><a class="code" href="classbdm_1_1ArxDS.html">00235</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1ArxDS.html" title="Generator of ARX data.">ArxDS</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1DS.html" title="Abstract class for discrete-time sources of data.">DS</a> { |
| 226 | <a name="l00236"></a>00236 <span class="keyword">protected</span>: |
| 227 | <a name="l00238"></a><a class="code" href="classbdm_1_1ArxDS.html#ac7b3cc6cd059ff3d7f4462cedff4bdeb">00238</a> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1ArxDS.html#ac7b3cc6cd059ff3d7f4462cedff4bdeb" title="Rv of the regressor.">Rrv</a>; |
| 228 | <a name="l00240"></a><a class="code" href="classbdm_1_1ArxDS.html#aa11a3f3fbeea1d17b66b073017964597">00240</a> vec <a class="code" href="classbdm_1_1ArxDS.html#aa11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>; |
| 229 | <a name="l00242"></a><a class="code" href="classbdm_1_1ArxDS.html#a392b87be85675cb3d55fa4953d671bb5">00242</a> vec <a class="code" href="classbdm_1_1ArxDS.html#a392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a>; |
| 230 | <a name="l00244"></a><a class="code" href="classbdm_1_1ArxDS.html#ab2d7530264499b92c3aa32454b960abe">00244</a> vec <a class="code" href="classbdm_1_1ArxDS.html#ab2d7530264499b92c3aa32454b960abe" title="temporary variable for regressor">rgr</a>; |
| 231 | <a name="l00246"></a><a class="code" href="classbdm_1_1ArxDS.html#afbe7b993ec5f75c195ae1b2ccd96a898">00246</a> <a class="code" href="classbdm_1_1datalink.html" title="DataLink is a connection between two data vectors Up and Down.">datalink</a> <a class="code" href="classbdm_1_1ArxDS.html#afbe7b993ec5f75c195ae1b2ccd96a898" title="data link: H -&gt; rgr">rgrlnk</a>; |
| 232 | <a name="l00248"></a><a class="code" href="classbdm_1_1ArxDS.html#a0aa9d8d35792159dc9611802f6c190eb">00248</a> <a class="code" href="classbdm_1_1mlnorm.html">mlnorm<chmat></a> <a class="code" href="classbdm_1_1ArxDS.html#a0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>; |
| 233 | <a name="l00250"></a><a class="code" href="classbdm_1_1ArxDS.html#a064e5d3f2dc0b39459c7ca53d05223e1">00250</a> <span class="keywordtype">bool</span> <a class="code" href="classbdm_1_1ArxDS.html#a064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a>; |
| 234 | <a name="l00252"></a><a class="code" href="classbdm_1_1ArxDS.html#ae13e5ffdfe9d896089310b0fc54e0c85">00252</a> <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1ArxDS.html#ae13e5ffdfe9d896089310b0fc54e0c85" title="loggers">L_theta</a>; |
| 235 | <a name="l00253"></a>00253 <span class="keywordtype">int</span> L_R; |
| 236 | <a name="l00254"></a>00254 <span class="keywordtype">int</span> dt_size; |
| 237 | <a name="l00255"></a>00255 <span class="keyword">public</span>: |
| 238 | <a name="l00256"></a><a class="code" href="classbdm_1_1ArxDS.html#adb242e35812c311c8415bb7e31c3f595">00256</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#adb242e35812c311c8415bb7e31c3f595" title="Returns full vector of observed data=[output, input].">getdata</a> ( vec &dt ) { |
| 239 | <a name="l00257"></a>00257 dt = <a class="code" href="classbdm_1_1ArxDS.html#aa11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>; |
| 240 | <a name="l00258"></a>00258 } |
| 241 | <a name="l00259"></a>00259 |
| 242 | <a name="l00260"></a><a class="code" href="classbdm_1_1ArxDS.html#a701151418bc5fc3861acef8359fb0d80">00260</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#a701151418bc5fc3861acef8359fb0d80" title="Returns data records at indeces.">getdata</a> ( vec &dt, <span class="keyword">const</span> ivec &indices ) { |
| 243 | <a name="l00261"></a>00261 dt = <a class="code" href="classbdm_1_1ArxDS.html#aa11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a> ( indices ); |
| 244 | <a name="l00262"></a>00262 } |
| 245 | <a name="l00263"></a>00263 |
| 246 | <a name="l00264"></a><a class="code" href="classbdm_1_1ArxDS.html#a8f6da8a00abba70bc58c7a4030bd8940">00264</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#a8f6da8a00abba70bc58c7a4030bd8940" title="Accepts action variable and schedule it for application.">write</a> ( vec &ut ) { |
| 247 | <a name="l00265"></a>00265 <a class="code" href="classbdm_1_1ArxDS.html#a392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a> = ut; |
| 248 | <a name="l00266"></a>00266 } |
| 249 | <a name="l00267"></a>00267 |
| 250 | <a name="l00268"></a><a class="code" href="classbdm_1_1ArxDS.html#a477fd706639535f520e9dbbd19f73318">00268</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#a477fd706639535f520e9dbbd19f73318" title="Accepts action variables at specific indeces.">write</a> ( vec &ut, <span class="keyword">const</span> ivec &indices ) { |
| 251 | <a name="l00269"></a>00269 <a class="code" href="bdmerror_8h.html#a89a0f906b242b79c5d3d342291b2cab4" title="Throw std::runtime_exception if t is not true and NDEBUG is not defined.">bdm_assert_debug</a> ( ut.length() == indices.length(), <span class="stringliteral">"ArxDS"</span> ); |
| 252 | <a name="l00270"></a>00270 set_subvector ( <a class="code" href="classbdm_1_1ArxDS.html#a392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a>, indices, ut ); |
| 253 | <a name="l00271"></a>00271 } |
| 254 | <a name="l00272"></a>00272 |
| 255 | <a name="l00273"></a>00273 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#a57dfa26b23cc03d53b123fa7e0474b19" title="Moves from to , i.e. perfroms the actions and reads response of the system.">step</a>(); |
| 256 | <a name="l00274"></a>00274 |
| 257 | <a name="l00276"></a><a class="code" href="classbdm_1_1ArxDS.html#a7c8b418677a48041adacac8e8e9c9849">00276</a> <a class="code" href="classbdm_1_1ArxDS.html#a7c8b418677a48041adacac8e8e9c9849" title="Default constructor.">ArxDS</a> ( ) {}; |
| 258 | <a name="l00278"></a><a class="code" href="classbdm_1_1ArxDS.html#a2d9abc62f1fee862f0e1c60c5c4a3c8a">00278</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#a2d9abc62f1fee862f0e1c60c5c4a3c8a" title="Set parameters of the internal model, H is maximum time delay.">set_parameters</a> ( <span class="keyword">const</span> mat &Th0, <span class="keyword">const</span> vec mu0, <span class="keyword">const</span> <a class="code" href="classbdm_1_1chmat.html" title="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</a> &sqR0 ) { |
| 259 | <a name="l00279"></a>00279 <a class="code" href="classbdm_1_1ArxDS.html#a0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>.<a class="code" href="classbdm_1_1mlnorm.html#a04f7c6cda7b2f95161dd5fbcf15d1fd5" title="Set A and R.">set_parameters</a> ( Th0, mu0, sqR0 ); |
| 260 | <a name="l00280"></a>00280 }; |
| 261 | <a name="l00282"></a><a class="code" href="classbdm_1_1ArxDS.html#ad57285965debab8a4bfc340d4477c853">00282</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#ad57285965debab8a4bfc340d4477c853" title="Set.">set_drv</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &yrv, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &urv, <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &rrv ) { |
| 262 | <a name="l00283"></a>00283 <a class="code" href="classbdm_1_1ArxDS.html#ac7b3cc6cd059ff3d7f4462cedff4bdeb" title="Rv of the regressor.">Rrv</a> = rrv; |
| 263 | <a name="l00284"></a>00284 <a class="code" href="classbdm_1_1DS.html#a9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a> = urv; |
| 264 | <a name="l00285"></a>00285 dt_size = yrv.<a class="code" href="classbdm_1_1RV.html#ade30156104f61d86c94f758861418089" title="total size of a random variable">_dsize</a>() + urv.<a class="code" href="classbdm_1_1RV.html#ade30156104f61d86c94f758861418089" title="total size of a random variable">_dsize</a>(); |
| 265 | <a name="l00286"></a>00286 |
| 266 | <a name="l00287"></a>00287 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> drv = concat ( yrv, urv ); |
| 267 | <a name="l00288"></a>00288 <a class="code" href="classbdm_1_1DS.html#ad8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a> = drv; |
| 268 | <a name="l00289"></a>00289 <span class="keywordtype">int</span> td = rrv.<a class="code" href="classbdm_1_1RV.html#a9a5c5aeeaf39299d07763377b05a8241" title="Minimum time-offset.">mint</a>(); |
| 269 | <a name="l00290"></a>00290 <a class="code" href="classbdm_1_1ArxDS.html#aa11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>.set_size ( drv.<a class="code" href="classbdm_1_1RV.html#ade30156104f61d86c94f758861418089" title="total size of a random variable">_dsize</a>() * ( -td + 1 ) ); |
| 270 | <a name="l00291"></a>00291 <a class="code" href="classbdm_1_1ArxDS.html#a392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a>.set_size ( <a class="code" href="classbdm_1_1DS.html#a9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>.<a class="code" href="classbdm_1_1RV.html#ade30156104f61d86c94f758861418089" title="total size of a random variable">_dsize</a>() ); |
| 271 | <a name="l00292"></a>00292 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = -1; i >= td; i-- ) { |
| 272 | <a name="l00293"></a>00293 drv.<a class="code" href="classbdm_1_1RV.html#a449c2b692957528976c189d27236e1ba" title="Shift time by delta.">t_plus</a> ( -1 ); |
| 273 | <a name="l00294"></a>00294 <a class="code" href="classbdm_1_1DS.html#ad8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>.<a class="code" href="classbdm_1_1RV.html#a87841b5ee43997b79789c0c22047e224" title="Add (concat) another variable to the current one,.">add</a> ( drv ); <span class="comment">//shift u1</span> |
| 274 | <a name="l00295"></a>00295 } |
| 275 | <a name="l00296"></a>00296 <a class="code" href="classbdm_1_1ArxDS.html#afbe7b993ec5f75c195ae1b2ccd96a898" title="data link: H -&gt; rgr">rgrlnk</a>.<a class="code" href="classbdm_1_1datalink.html#afb8337aac8329eb0ca96bfb3ff73ec67" title="set connection, rv must be fully present in rv_up">set_connection</a> ( rrv, <a class="code" href="classbdm_1_1DS.html#ad8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a> ); |
| 276 | <a name="l00297"></a>00297 |
| 277 | <a name="l00298"></a>00298 <a class="code" href="classbdm_1_1DS.html#af96cae44624e79638a91ec4f2c7c81a9" title="size of data returned by getdata() ">dtsize</a> = <a class="code" href="classbdm_1_1DS.html#ad8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>.<a class="code" href="classbdm_1_1RV.html#ade30156104f61d86c94f758861418089" title="total size of a random variable">_dsize</a>(); |
| 278 | <a name="l00299"></a>00299 <a class="code" href="classbdm_1_1DS.html#ad7467046a0bd05bc992cc5e1bdedb983" title="size of data">utsize</a> = <a class="code" href="classbdm_1_1DS.html#a9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>.<a class="code" href="classbdm_1_1RV.html#ade30156104f61d86c94f758861418089" title="total size of a random variable">_dsize</a>(); |
| 279 | <a name="l00300"></a>00300 } |
| 280 | <a name="l00302"></a><a class="code" href="classbdm_1_1ArxDS.html#ae7438127de87c5a8128edfa12255b436">00302</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#ae7438127de87c5a8128edfa12255b436" title="set options from a string">set_options</a> ( <span class="keyword">const</span> <span class="keywordtype">string</span> &s ) { |
| 281 | <a name="l00303"></a>00303 <a class="code" href="classbdm_1_1ArxDS.html#a064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a> = ( s.find ( <span class="stringliteral">"L_theta"</span> ) != string::npos ); |
| 282 | <a name="l00304"></a>00304 }; |
| 283 | <a name="l00305"></a><a class="code" href="classbdm_1_1ArxDS.html#a64819633a1191fcaa60d0de26ade2e52">00305</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#a64819633a1191fcaa60d0de26ade2e52" title="Register DS for logging into logger L.">log_add</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &L ) { |
| 284 | <a name="l00306"></a>00306 <span class="comment">//DS::log_add ( L ); too long!!</span> |
| 285 | <a name="l00307"></a>00307 <a class="code" href="classbdm_1_1DS.html#ab4b7bdb9d98a11ab587aa0ad803bb867" title="Remember its own index in Logger L.">L_dt</a> = L.<a class="code" href="classbdm_1_1logger.html#a47aa3b098a81d02a8ffaea2c9fa09ac7" title="returns an identifier which will be later needed for calling the logit() function...">add</a> ( <a class="code" href="classbdm_1_1DS.html#ad8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a> ( 0, dt_size ), <span class="stringliteral">""</span> ); |
| 286 | <a name="l00308"></a>00308 L_ut = L.<a class="code" href="classbdm_1_1logger.html#a47aa3b098a81d02a8ffaea2c9fa09ac7" title="returns an identifier which will be later needed for calling the logit() function...">add</a> ( <a class="code" href="classbdm_1_1DS.html#a9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>, <span class="stringliteral">""</span> ); |
280 | | <a name="l00310"></a><a class="code" href="classbdm_1_1stateDS.html#ac78f44b484128e73fe31ab6d118b5440">00310</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1stateDS.html#ac78f44b484128e73fe31ab6d118b5440" title="Register DS for logging into logger L.">log_add</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &L ) { |
281 | | <a name="l00311"></a>00311 <a class="code" href="classbdm_1_1stateDS.html#ac78f44b484128e73fe31ab6d118b5440" title="Register DS for logging into logger L.">DS::log_add</a> ( L ); |
282 | | <a name="l00312"></a>00312 <a class="code" href="classbdm_1_1stateDS.html#a16cdcdd5c878ebeebe7cad71c87f77ca" title="Logger.">L_xt</a> = L.<a class="code" href="classbdm_1_1logger.html#a47aa3b098a81d02a8ffaea2c9fa09ac7">add</a> ( IM->_rv(), <span class="stringliteral">"true"</span> ); |
283 | | <a name="l00313"></a>00313 } |
284 | | <a name="l00314"></a><a class="code" href="classbdm_1_1stateDS.html#a3850341d9584df6b60cb05eeea6b38f4">00314</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1stateDS.html#a3850341d9584df6b60cb05eeea6b38f4" title="Register DS for logging into logger L.">logit</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &L ) { |
285 | | <a name="l00315"></a>00315 <a class="code" href="classbdm_1_1stateDS.html#a3850341d9584df6b60cb05eeea6b38f4" title="Register DS for logging into logger L.">DS::logit</a> ( L ); |
286 | | <a name="l00316"></a>00316 L.<a class="code" href="classbdm_1_1logger.html#ae30f695619931b3c372ab280e452d309" title="log this vector">logit</a> ( <a class="code" href="classbdm_1_1stateDS.html#a16cdcdd5c878ebeebe7cad71c87f77ca" title="Logger.">L_xt</a>, <a class="code" href="classbdm_1_1stateDS.html#ac055a609e44f77300aa86e903df4f088" title="state storage">xt</a> ); |
287 | | <a name="l00317"></a>00317 } |
288 | | <a name="l00318"></a>00318 |
289 | | <a name="l00348"></a>00348 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1stateDS.html#aa3792e751ff4d3f66f8feec16506197b">from_setting</a> ( <span class="keyword">const</span> Setting &<span class="keyword">set</span> ); |
290 | | <a name="l00349"></a>00349 |
291 | | <a name="l00350"></a>00350 <span class="comment">// TODO dodelat void to_setting( Setting &set ) const;</span> |
292 | | <a name="l00351"></a>00351 |
293 | | <a name="l00352"></a>00352 }; |
294 | | <a name="l00353"></a>00353 |
295 | | <a name="l00354"></a>00354 <a class="code" href="user__info_8h.html#a4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a> ( stateDS ); |
296 | | <a name="l00355"></a>00355 SHAREDPTR ( stateDS ); |
297 | | <a name="l00356"></a>00356 |
298 | | <a name="l00357"></a>00357 }; <span class="comment">//namespace</span> |
299 | | <a name="l00358"></a>00358 |
300 | | <a name="l00359"></a>00359 <span class="preprocessor">#endif // DS_H</span> |
| 288 | <a name="l00310"></a>00310 <span class="keyword">const</span> mat &A = <a class="code" href="classbdm_1_1ArxDS.html#a0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>.<a class="code" href="classbdm_1_1mlnorm.html#a55e1bd7fa70b852bd7fe50ce72fb8f23" title="access function">_A</a>(); |
| 289 | <a name="l00311"></a>00311 <span class="keyword">const</span> mat R = <a class="code" href="classbdm_1_1ArxDS.html#a0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>.<a class="code" href="classbdm_1_1mlnorm.html#a9af0714b7b29ab1162ebc3291b7c4a43" title="access function">_R</a>(); |
| 290 | <a name="l00312"></a>00312 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1ArxDS.html#a064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a> ) { |
| 291 | <a name="l00313"></a>00313 <a class="code" href="classbdm_1_1ArxDS.html#ae13e5ffdfe9d896089310b0fc54e0c85" title="loggers">L_theta</a> = L.<a class="code" href="classbdm_1_1logger.html#a47aa3b098a81d02a8ffaea2c9fa09ac7" title="returns an identifier which will be later needed for calling the logit() function...">add</a> ( <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> ( <span class="stringliteral">"{th }"</span>, vec_1 ( A.rows() * A.cols() ) ), <span class="stringliteral">"t"</span> ); |
| 292 | <a name="l00314"></a>00314 } |
| 293 | <a name="l00315"></a>00315 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1ArxDS.html#a064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a> ) { |
| 294 | <a name="l00316"></a>00316 L_R = L.<a class="code" href="classbdm_1_1logger.html#a47aa3b098a81d02a8ffaea2c9fa09ac7" title="returns an identifier which will be later needed for calling the logit() function...">add</a> ( <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> ( <span class="stringliteral">"{R }"</span>, vec_1 ( R.rows() * R.cols() ) ), <span class="stringliteral">"r"</span> ); |
| 295 | <a name="l00317"></a>00317 } |
| 296 | <a name="l00318"></a>00318 } |
| 297 | <a name="l00319"></a><a class="code" href="classbdm_1_1ArxDS.html#a4128f5dc3a04063d62fc7e35635aeb90">00319</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#a4128f5dc3a04063d62fc7e35635aeb90" title="Register DS for logging into logger L.">logit</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &L ) { |
| 298 | <a name="l00320"></a>00320 <span class="comment">//DS::logit ( L );</span> |
| 299 | <a name="l00321"></a>00321 L.<a class="code" href="classbdm_1_1logger.html#ae30f695619931b3c372ab280e452d309" title="log this vector">logit</a> ( <a class="code" href="classbdm_1_1DS.html#ab4b7bdb9d98a11ab587aa0ad803bb867" title="Remember its own index in Logger L.">L_dt</a>, <a class="code" href="classbdm_1_1ArxDS.html#aa11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>.left ( dt_size ) ); |
| 300 | <a name="l00322"></a>00322 L.<a class="code" href="classbdm_1_1logger.html#ae30f695619931b3c372ab280e452d309" title="log this vector">logit</a> ( L_ut, <a class="code" href="classbdm_1_1ArxDS.html#a392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a> ); |
| 301 | <a name="l00323"></a>00323 |
| 302 | <a name="l00324"></a>00324 <span class="keyword">const</span> mat &A = <a class="code" href="classbdm_1_1ArxDS.html#a0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>.<a class="code" href="classbdm_1_1mlnorm.html#a55e1bd7fa70b852bd7fe50ce72fb8f23" title="access function">_A</a>(); |
| 303 | <a name="l00325"></a>00325 <span class="keyword">const</span> mat R = <a class="code" href="classbdm_1_1ArxDS.html#a0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>.<a class="code" href="classbdm_1_1mlnorm.html#a9af0714b7b29ab1162ebc3291b7c4a43" title="access function">_R</a>(); |
| 304 | <a name="l00326"></a>00326 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1ArxDS.html#a064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a> ) { |
| 305 | <a name="l00327"></a>00327 L.<a class="code" href="classbdm_1_1logger.html#ae30f695619931b3c372ab280e452d309" title="log this vector">logit</a> ( <a class="code" href="classbdm_1_1ArxDS.html#ae13e5ffdfe9d896089310b0fc54e0c85" title="loggers">L_theta</a>, vec ( A._data(), A.rows() *A.cols() ) ); |
| 306 | <a name="l00328"></a>00328 }; |
| 307 | <a name="l00329"></a>00329 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1ArxDS.html#a064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a> ) { |
| 308 | <a name="l00330"></a>00330 L.<a class="code" href="classbdm_1_1logger.html#ae30f695619931b3c372ab280e452d309" title="log this vector">logit</a> ( L_R, vec ( R._data(), R.rows() *R.rows() ) ); |
| 309 | <a name="l00331"></a>00331 }; |
| 310 | <a name="l00332"></a>00332 } |
| 311 | <a name="l00333"></a>00333 |
| 312 | <a name="l00334"></a>00334 <span class="comment">// TODO dokumentace - aktualizovat</span> |
| 313 | <a name="l00366"></a>00366 <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#a9b109ee7bba9774057b107383b6ecc24">from_setting</a> ( <span class="keyword">const</span> Setting &<span class="keyword">set</span> ); |
| 314 | <a name="l00367"></a>00367 |
| 315 | <a name="l00368"></a>00368 <span class="comment">// TODO dodelat void to_setting( Setting &set ) const;</span> |
| 316 | <a name="l00369"></a>00369 }; |
| 317 | <a name="l00370"></a>00370 |
| 318 | <a name="l00371"></a>00371 <a class="code" href="user__info_8h.html#a4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a> ( ArxDS ); |
| 319 | <a name="l00372"></a>00372 SHAREDPTR ( ArxDS ); |
| 320 | <a name="l00373"></a>00373 |
| 321 | <a name="l00374"></a><a class="code" href="classbdm_1_1stateDS.html">00374</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1stateDS.html">stateDS</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1DS.html" title="Abstract class for discrete-time sources of data.">DS</a> { |
| 322 | <a name="l00375"></a>00375 <span class="keyword">private</span>: |
| 323 | <a name="l00377"></a>00377 <a class="code" href="classbdm_1_1shared__ptr.html">shared_ptr<mpdf></a> IM; |
| 324 | <a name="l00378"></a>00378 |
| 325 | <a name="l00380"></a>00380 <a class="code" href="classbdm_1_1shared__ptr.html">shared_ptr<mpdf></a> OM; |
| 326 | <a name="l00381"></a>00381 |
| 327 | <a name="l00382"></a>00382 <span class="keyword">protected</span>: |
| 328 | <a name="l00384"></a><a class="code" href="classbdm_1_1stateDS.html#a839bd9979c0aa407bc575e536f0a9918">00384</a> vec <a class="code" href="classbdm_1_1stateDS.html#a839bd9979c0aa407bc575e536f0a9918" title="result storage">dt</a>; |
| 329 | <a name="l00386"></a><a class="code" href="classbdm_1_1stateDS.html#ac055a609e44f77300aa86e903df4f088">00386</a> vec <a class="code" href="classbdm_1_1stateDS.html#ac055a609e44f77300aa86e903df4f088" title="state storage">xt</a>; |
| 330 | <a name="l00388"></a><a class="code" href="classbdm_1_1stateDS.html#aabbdb3dcf67a06f5a9003828819bafbf">00388</a> vec <a class="code" href="classbdm_1_1stateDS.html#aabbdb3dcf67a06f5a9003828819bafbf" title="input storage">ut</a>; |
| 331 | <a name="l00390"></a><a class="code" href="classbdm_1_1stateDS.html#a16cdcdd5c878ebeebe7cad71c87f77ca">00390</a> <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1stateDS.html#a16cdcdd5c878ebeebe7cad71c87f77ca" title="Logger.">L_xt</a>; |
| 332 | <a name="l00391"></a>00391 |
| 333 | <a name="l00392"></a>00392 <span class="keyword">public</span>: |
| 334 | <a name="l00393"></a><a class="code" href="classbdm_1_1stateDS.html#a5c9f4a93313f69adfa97375b58c0a6c2">00393</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1stateDS.html#a5c9f4a93313f69adfa97375b58c0a6c2" title="Returns full vector of observed data=[output, input].">getdata</a> ( vec &dt0 ) { |
| 335 | <a name="l00394"></a>00394 dt0 = <a class="code" href="classbdm_1_1stateDS.html#a839bd9979c0aa407bc575e536f0a9918" title="result storage">dt</a>; |
| 336 | <a name="l00395"></a>00395 } |
| 337 | <a name="l00396"></a>00396 |
| 338 | <a name="l00397"></a><a class="code" href="classbdm_1_1stateDS.html#ad61e149db7c7b3a1289ac82f37c97700">00397</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1stateDS.html#ad61e149db7c7b3a1289ac82f37c97700" title="Returns data records at indeces.">getdata</a> ( vec &dt0, <span class="keyword">const</span> ivec &indices ) { |
| 339 | <a name="l00398"></a>00398 dt0 = <a class="code" href="classbdm_1_1stateDS.html#a839bd9979c0aa407bc575e536f0a9918" title="result storage">dt</a> ( indices ); |
| 340 | <a name="l00399"></a>00399 } |
| 341 | <a name="l00400"></a>00400 |
| 342 | <a name="l00401"></a>00401 <a class="code" href="classbdm_1_1stateDS.html">stateDS</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1shared__ptr.html">shared_ptr<mpdf></a> &IM0, <span class="keyword">const</span> <a class="code" href="classbdm_1_1shared__ptr.html">shared_ptr<mpdf></a> &OM0, <span class="keywordtype">int</span> usize ) : IM ( IM0 ), OM ( OM0 ), |
| 343 | <a name="l00402"></a>00402 <a class="code" href="classbdm_1_1stateDS.html#a839bd9979c0aa407bc575e536f0a9918" title="result storage">dt</a> ( OM0->dimension() ), <a class="code" href="classbdm_1_1stateDS.html#ac055a609e44f77300aa86e903df4f088" title="state storage">xt</a> ( IM0->dimension() ), |
| 344 | <a name="l00403"></a>00403 <a class="code" href="classbdm_1_1stateDS.html#aabbdb3dcf67a06f5a9003828819bafbf" title="input storage">ut</a> ( usize ), <a class="code" href="classbdm_1_1stateDS.html#a16cdcdd5c878ebeebe7cad71c87f77ca" title="Logger.">L_xt</a> ( 0 ) { } |
| 345 | <a name="l00404"></a>00404 |
| 346 | <a name="l00405"></a>00405 stateDS() : <a class="code" href="classbdm_1_1stateDS.html#a16cdcdd5c878ebeebe7cad71c87f77ca" title="Logger.">L_xt</a> ( 0 ) { } |
| 347 | <a name="l00406"></a>00406 |
| 348 | <a name="l00407"></a><a class="code" href="classbdm_1_1stateDS.html#a1e98f3e362e35245d565c2508527ae14">00407</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1stateDS.html#a1e98f3e362e35245d565c2508527ae14" title="Moves from to , i.e. perfroms the actions and reads response of the system.">step</a>() { |
| 349 | <a name="l00408"></a>00408 <a class="code" href="classbdm_1_1stateDS.html#ac055a609e44f77300aa86e903df4f088" title="state storage">xt</a> = IM->samplecond ( concat ( <a class="code" href="classbdm_1_1stateDS.html#ac055a609e44f77300aa86e903df4f088" title="state storage">xt</a>, <a class="code" href="classbdm_1_1stateDS.html#aabbdb3dcf67a06f5a9003828819bafbf" title="input storage">ut</a> ) ); |
| 350 | <a name="l00409"></a>00409 <a class="code" href="classbdm_1_1stateDS.html#a839bd9979c0aa407bc575e536f0a9918" title="result storage">dt</a> = OM->samplecond ( concat ( <a class="code" href="classbdm_1_1stateDS.html#ac055a609e44f77300aa86e903df4f088" title="state storage">xt</a>, <a class="code" href="classbdm_1_1stateDS.html#aabbdb3dcf67a06f5a9003828819bafbf" title="input storage">ut</a> ) ); |
| 351 | <a name="l00410"></a>00410 } |
| 352 | <a name="l00411"></a>00411 |
| 353 | <a name="l00412"></a><a class="code" href="classbdm_1_1stateDS.html#ac78f44b484128e73fe31ab6d118b5440">00412</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1stateDS.html#ac78f44b484128e73fe31ab6d118b5440" title="Register DS for logging into logger L.">log_add</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &L ) { |
| 354 | <a name="l00413"></a>00413 <a class="code" href="classbdm_1_1stateDS.html#ac78f44b484128e73fe31ab6d118b5440" title="Register DS for logging into logger L.">DS::log_add</a> ( L ); |
| 355 | <a name="l00414"></a>00414 <a class="code" href="classbdm_1_1stateDS.html#a16cdcdd5c878ebeebe7cad71c87f77ca" title="Logger.">L_xt</a> = L.<a class="code" href="classbdm_1_1logger.html#a47aa3b098a81d02a8ffaea2c9fa09ac7" title="returns an identifier which will be later needed for calling the logit() function...">add</a> ( IM->_rv(), <span class="stringliteral">"true"</span> ); |
| 356 | <a name="l00415"></a>00415 } |
| 357 | <a name="l00416"></a><a class="code" href="classbdm_1_1stateDS.html#a3850341d9584df6b60cb05eeea6b38f4">00416</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1stateDS.html#a3850341d9584df6b60cb05eeea6b38f4" title="Register DS for logging into logger L.">logit</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &L ) { |
| 358 | <a name="l00417"></a>00417 <a class="code" href="classbdm_1_1stateDS.html#a3850341d9584df6b60cb05eeea6b38f4" title="Register DS for logging into logger L.">DS::logit</a> ( L ); |
| 359 | <a name="l00418"></a>00418 L.<a class="code" href="classbdm_1_1logger.html#ae30f695619931b3c372ab280e452d309" title="log this vector">logit</a> ( <a class="code" href="classbdm_1_1stateDS.html#a16cdcdd5c878ebeebe7cad71c87f77ca" title="Logger.">L_xt</a>, <a class="code" href="classbdm_1_1stateDS.html#ac055a609e44f77300aa86e903df4f088" title="state storage">xt</a> ); |
| 360 | <a name="l00419"></a>00419 } |
| 361 | <a name="l00420"></a>00420 |
| 362 | <a name="l00450"></a>00450 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1stateDS.html#aa3792e751ff4d3f66f8feec16506197b">from_setting</a> ( <span class="keyword">const</span> Setting &<span class="keyword">set</span> ); |
| 363 | <a name="l00451"></a>00451 |
| 364 | <a name="l00452"></a>00452 <span class="comment">// TODO dodelat void to_setting( Setting &set ) const;</span> |
| 365 | <a name="l00453"></a>00453 |
| 366 | <a name="l00454"></a>00454 }; |
| 367 | <a name="l00455"></a>00455 |
| 368 | <a name="l00456"></a>00456 <a class="code" href="user__info_8h.html#a4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a> ( stateDS ); |
| 369 | <a name="l00457"></a>00457 SHAREDPTR ( stateDS ); |
| 370 | <a name="l00458"></a>00458 |
| 371 | <a name="l00459"></a>00459 }; <span class="comment">//namespace</span> |
| 372 | <a name="l00460"></a>00460 |
| 373 | <a name="l00461"></a>00461 <span class="preprocessor">#endif // DS_H</span> |