121 | | <a name="l00092"></a>00092 }; |
122 | | <a name="l00093"></a>00093 |
123 | | <a name="l00101"></a><a class="code" href="classbdm_1_1CsvFileDS.html">00101</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> { |
124 | | <a name="l00102"></a>00102 |
125 | | <a name="l00103"></a>00103 <span class="keyword">public</span>: |
126 | | <a name="l00105"></a>00105 <a class="code" href="classbdm_1_1CsvFileDS.html#8d9d56cdf6b8d0236e32a80e11c238b0" 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> ); |
127 | | <a name="l00106"></a>00106 }; |
128 | | <a name="l00107"></a>00107 |
129 | | <a name="l00108"></a>00108 |
130 | | <a name="l00109"></a>00109 |
131 | | <a name="l00114"></a><a class="code" href="classbdm_1_1ArxDS.html">00114</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> { |
132 | | <a name="l00115"></a>00115 <span class="keyword">protected</span>: |
133 | | <a name="l00117"></a><a class="code" href="classbdm_1_1ArxDS.html#c7b3cc6cd059ff3d7f4462cedff4bdeb">00117</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#c7b3cc6cd059ff3d7f4462cedff4bdeb" title="Rv of the regressor.">Rrv</a>; |
134 | | <a name="l00119"></a><a class="code" href="classbdm_1_1ArxDS.html#a11a3f3fbeea1d17b66b073017964597">00119</a> vec <a class="code" href="classbdm_1_1ArxDS.html#a11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>; |
135 | | <a name="l00121"></a><a class="code" href="classbdm_1_1ArxDS.html#392b87be85675cb3d55fa4953d671bb5">00121</a> vec <a class="code" href="classbdm_1_1ArxDS.html#392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a>; |
136 | | <a name="l00123"></a><a class="code" href="classbdm_1_1ArxDS.html#b2d7530264499b92c3aa32454b960abe">00123</a> vec <a class="code" href="classbdm_1_1ArxDS.html#b2d7530264499b92c3aa32454b960abe" title="temporary variable for regressor">rgr</a>; |
137 | | <a name="l00125"></a><a class="code" href="classbdm_1_1ArxDS.html#fbe7b993ec5f75c195ae1b2ccd96a898">00125</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#fbe7b993ec5f75c195ae1b2ccd96a898" title="data link: H -&gt; rgr">rgrlnk</a>; |
138 | | <a name="l00127"></a><a class="code" href="classbdm_1_1ArxDS.html#0aa9d8d35792159dc9611802f6c190eb">00127</a> <a class="code" href="classbdm_1_1mlnorm.html">mlnorm<chmat></a> <a class="code" href="classbdm_1_1ArxDS.html#0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>; |
139 | | <a name="l00129"></a><a class="code" href="classbdm_1_1ArxDS.html#064e5d3f2dc0b39459c7ca53d05223e1">00129</a> <span class="keywordtype">bool</span> <a class="code" href="classbdm_1_1ArxDS.html#064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a>; |
140 | | <a name="l00131"></a><a class="code" href="classbdm_1_1ArxDS.html#e13e5ffdfe9d896089310b0fc54e0c85">00131</a> <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1ArxDS.html#e13e5ffdfe9d896089310b0fc54e0c85" title="loggers">L_theta</a>; |
141 | | <a name="l00132"></a>00132 <span class="keywordtype">int</span> L_R; |
142 | | <a name="l00133"></a>00133 <span class="keywordtype">int</span> dt_size; |
143 | | <a name="l00134"></a>00134 <span class="keyword">public</span>: |
144 | | <a name="l00135"></a><a class="code" href="classbdm_1_1ArxDS.html#db242e35812c311c8415bb7e31c3f595">00135</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#db242e35812c311c8415bb7e31c3f595" title="Returns full vector of observed data=[output, input].">getdata</a> ( vec &dt ) { |
145 | | <a name="l00136"></a>00136 <span class="comment">//it_assert_debug ( dt.length() ==Drv.count(),"ArxDS" );</span> |
146 | | <a name="l00137"></a>00137 dt=<a class="code" href="classbdm_1_1ArxDS.html#a11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>; |
147 | | <a name="l00138"></a>00138 }; |
148 | | <a name="l00139"></a><a class="code" href="classbdm_1_1ArxDS.html#701151418bc5fc3861acef8359fb0d80">00139</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#701151418bc5fc3861acef8359fb0d80" title="Returns data records at indeces.">getdata</a> ( vec &dt, <span class="keyword">const</span> ivec &indices ) { |
149 | | <a name="l00140"></a>00140 it_assert_debug ( dt.length() ==indices.length(),<span class="stringliteral">"ArxDS"</span> ); |
150 | | <a name="l00141"></a>00141 dt=<a class="code" href="classbdm_1_1ArxDS.html#a11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a> ( indices ); |
151 | | <a name="l00142"></a>00142 }; |
152 | | <a name="l00143"></a><a class="code" href="classbdm_1_1ArxDS.html#8f6da8a00abba70bc58c7a4030bd8940">00143</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#8f6da8a00abba70bc58c7a4030bd8940" title="Accepts action variable and schedule it for application.">write</a> ( vec &ut ) { |
153 | | <a name="l00144"></a>00144 <span class="comment">//it_assert_debug ( ut.length() ==Urv.count(),"ArxDS" );</span> |
154 | | <a name="l00145"></a>00145 <a class="code" href="classbdm_1_1ArxDS.html#392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a>=ut; |
155 | | <a name="l00146"></a>00146 }; |
156 | | <a name="l00147"></a><a class="code" href="classbdm_1_1ArxDS.html#477fd706639535f520e9dbbd19f73318">00147</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#477fd706639535f520e9dbbd19f73318" title="Accepts action variables at specific indeces.">write</a> ( vec &ut, <span class="keyword">const</span> ivec &indices ) { |
157 | | <a name="l00148"></a>00148 it_assert_debug ( ut.length() ==indices.length(),<span class="stringliteral">"ArxDS"</span> ); |
158 | | <a name="l00149"></a>00149 set_subvector ( <a class="code" href="classbdm_1_1ArxDS.html#392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a>, indices,ut ); |
159 | | <a name="l00150"></a>00150 }; |
160 | | <a name="l00151"></a>00151 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#57dfa26b23cc03d53b123fa7e0474b19" title="Moves from to , i.e. perfroms the actions and reads response of the system.">step</a>(); |
161 | | <a name="l00153"></a><a class="code" href="classbdm_1_1ArxDS.html#7c8b418677a48041adacac8e8e9c9849">00153</a> <a class="code" href="classbdm_1_1ArxDS.html#7c8b418677a48041adacac8e8e9c9849" title="Default constructor.">ArxDS</a> ( ) {}; |
162 | | <a name="l00155"></a><a class="code" href="classbdm_1_1ArxDS.html#2d9abc62f1fee862f0e1c60c5c4a3c8a">00155</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#2d9abc62f1fee862f0e1c60c5c4a3c8a" 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="classchmat.html" title="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</a> &sqR0 ) |
163 | | <a name="l00156"></a>00156 { <a class="code" href="classbdm_1_1ArxDS.html#0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>.<a class="code" href="classbdm_1_1mlnorm.html#5d18dec3167584338a4775c1d165d96f" title="Set A and R.">set_parameters</a> ( Th0, mu0, sqR0 );}; |
164 | | <a name="l00158"></a><a class="code" href="classbdm_1_1ArxDS.html#bf9cd9d4043d7e0dc61de56db37ec703">00158</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#bf9cd9d4043d7e0dc61de56db37ec703" title="Set.">set_drv</a> ( <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &yrv, <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &urv, <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &rrv ) { |
165 | | <a name="l00159"></a>00159 <a class="code" href="classbdm_1_1ArxDS.html#c7b3cc6cd059ff3d7f4462cedff4bdeb" title="Rv of the regressor.">Rrv</a> = rrv; |
166 | | <a name="l00160"></a>00160 <a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a> = urv; |
167 | | <a name="l00161"></a>00161 dt_size = yrv.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() +urv.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>(); |
168 | | <a name="l00162"></a>00162 |
169 | | <a name="l00163"></a>00163 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> drv = concat ( yrv,urv ); |
170 | | <a name="l00164"></a>00164 <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a> = drv; |
171 | | <a name="l00165"></a>00165 <span class="keywordtype">int</span> td = rrv.<a class="code" href="classbdm_1_1RV.html#9a5c5aeeaf39299d07763377b05a8241" title="Minimum time-offset.">mint</a>(); |
172 | | <a name="l00166"></a>00166 <a class="code" href="classbdm_1_1ArxDS.html#a11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>.set_size ( drv.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() * ( -td+1 ) ); |
173 | | <a name="l00167"></a>00167 <a class="code" href="classbdm_1_1ArxDS.html#392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a>.set_size ( <a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() ); |
174 | | <a name="l00168"></a>00168 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=-1;i>=td;i-- ) { |
175 | | <a name="l00169"></a>00169 drv.<a class="code" href="classbdm_1_1RV.html#bd77cb0899f7fba1d0e34396137b7f1f" title="Shift time shifted by delta.">t</a> ( -1 ); |
176 | | <a name="l00170"></a>00170 <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>.<a class="code" href="classbdm_1_1RV.html#87841b5ee43997b79789c0c22047e224" title="Add (concat) another variable to the current one,.">add</a> ( drv ); <span class="comment">//shift u1</span> |
177 | | <a name="l00171"></a>00171 } |
178 | | <a name="l00172"></a>00172 <a class="code" href="classbdm_1_1ArxDS.html#fbe7b993ec5f75c195ae1b2ccd96a898" title="data link: H -&gt; rgr">rgrlnk</a>.<a class="code" href="classbdm_1_1datalink.html#fb8337aac8329eb0ca96bfb3ff73ec67" title="set connection, rv must be fully present in rv_up">set_connection</a> ( rrv,<a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a> ); |
179 | | <a name="l00173"></a>00173 |
180 | | <a name="l00174"></a>00174 dtsize = <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>(); |
181 | | <a name="l00175"></a>00175 utsize = <a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>(); |
182 | | <a name="l00176"></a>00176 } |
183 | | <a name="l00178"></a><a class="code" href="classbdm_1_1ArxDS.html#e7438127de87c5a8128edfa12255b436">00178</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#e7438127de87c5a8128edfa12255b436" title="set options from a string">set_options</a> ( <span class="keyword">const</span> <span class="keywordtype">string</span> &s ) { |
184 | | <a name="l00179"></a>00179 <a class="code" href="classbdm_1_1ArxDS.html#064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a>= ( s.find ( <span class="stringliteral">"L_theta"</span> ) !=string::npos ); |
185 | | <a name="l00180"></a>00180 }; |
186 | | <a name="l00181"></a><a class="code" href="classbdm_1_1ArxDS.html#64819633a1191fcaa60d0de26ade2e52">00181</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#64819633a1191fcaa60d0de26ade2e52" 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 ) { |
187 | | <a name="l00182"></a>00182 <span class="comment">//DS::log_add ( L ); too long!!</span> |
188 | | <a name="l00183"></a>00183 <a class="code" href="classbdm_1_1DS.html#b4b7bdb9d98a11ab587aa0ad803bb867" title="Remember its own index in Logger L.">L_dt</a>=L.<a class="code" href="classbdm_1_1logger.html#47aa3b098a81d02a8ffaea2c9fa09ac7">add</a> ( <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a> ( 0,dt_size ),<span class="stringliteral">""</span> ); |
189 | | <a name="l00184"></a>00184 L_ut=L.<a class="code" href="classbdm_1_1logger.html#47aa3b098a81d02a8ffaea2c9fa09ac7">add</a> ( <a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>,<span class="stringliteral">""</span> ); |
190 | | <a name="l00185"></a>00185 |
191 | | <a name="l00186"></a>00186 mat &A =<a class="code" href="classbdm_1_1ArxDS.html#0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>.<a class="code" href="classbdm_1_1mlnorm.html#262a2a486bff585f34bb6a5005b02614" title="access function">_A</a>(); |
192 | | <a name="l00187"></a>00187 mat R =<a class="code" href="classbdm_1_1ArxDS.html#0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>.<a class="code" href="classbdm_1_1mlnorm.html#78120ecd1c2b1d7e80124b4603504604" title="access function">_R</a>(); |
193 | | <a name="l00188"></a>00188 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1ArxDS.html#064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a> ) {<a class="code" href="classbdm_1_1ArxDS.html#e13e5ffdfe9d896089310b0fc54e0c85" title="loggers">L_theta</a>=L.<a class="code" href="classbdm_1_1logger.html#47aa3b098a81d02a8ffaea2c9fa09ac7">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> );} |
194 | | <a name="l00189"></a>00189 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1ArxDS.html#064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a> ) {L_R=L.<a class="code" href="classbdm_1_1logger.html#47aa3b098a81d02a8ffaea2c9fa09ac7">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> );} |
195 | | <a name="l00190"></a>00190 } |
196 | | <a name="l00191"></a><a class="code" href="classbdm_1_1ArxDS.html#4128f5dc3a04063d62fc7e35635aeb90">00191</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#4128f5dc3a04063d62fc7e35635aeb90" 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 ) { |
197 | | <a name="l00192"></a>00192 <span class="comment">//DS::logit ( L );</span> |
198 | | <a name="l00193"></a>00193 L.<a class="code" href="classbdm_1_1logger.html#397c014b0aaf3581516e2a105d26a5c9" title="log this vector">logit</a> ( <a class="code" href="classbdm_1_1DS.html#b4b7bdb9d98a11ab587aa0ad803bb867" title="Remember its own index in Logger L.">L_dt</a>, <a class="code" href="classbdm_1_1ArxDS.html#a11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>.left ( dt_size ) ); |
199 | | <a name="l00194"></a>00194 L.<a class="code" href="classbdm_1_1logger.html#397c014b0aaf3581516e2a105d26a5c9" title="log this vector">logit</a> ( L_ut, <a class="code" href="classbdm_1_1ArxDS.html#392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a> ); |
| 121 | <a name="l00092"></a>00092 |
| 122 | <a name="l00093"></a>00093 <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>() { |
| 123 | <a name="l00094"></a>00094 }; |
| 124 | <a name="l00095"></a>00095 |
| 125 | <a name="l00096"></a>00096 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ITppFileDS.html#a745b66598149bf9d0208f75f7e7de91" title="This method arrange instance properties according the data stored in the Setting...">from_setting</a>( <span class="keyword">const</span> Setting &root ); |
| 126 | <a name="l00097"></a>00097 |
| 127 | <a name="l00098"></a>00098 <span class="comment">// TODO dodelat void to_setting( Setting &root ) const;</span> |
| 128 | <a name="l00099"></a>00099 |
| 129 | <a name="l00100"></a>00100 }; |
| 130 | <a name="l00101"></a>00101 |
| 131 | <a name="l00102"></a>00102 UIREGISTER(<a class="code" href="classbdm_1_1ITppFileDS.html" title="Read Data Matrix from an IT file.">ITppFileDS</a>); |
| 132 | <a name="l00103"></a>00103 |
| 133 | <a name="l00111"></a><a class="code" href="classbdm_1_1CsvFileDS.html">00111</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> { |
| 134 | <a name="l00112"></a>00112 |
| 135 | <a name="l00113"></a>00113 <span class="keyword">public</span>: |
| 136 | <a name="l00115"></a>00115 <a class="code" href="classbdm_1_1CsvFileDS.html#8d9d56cdf6b8d0236e32a80e11c238b0" 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> ); |
| 137 | <a name="l00116"></a>00116 }; |
| 138 | <a name="l00117"></a>00117 |
| 139 | <a name="l00118"></a>00118 |
| 140 | <a name="l00119"></a>00119 |
| 141 | <a name="l00124"></a><a class="code" href="classbdm_1_1ArxDS.html">00124</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> { |
| 142 | <a name="l00125"></a>00125 <span class="keyword">protected</span>: |
| 143 | <a name="l00127"></a><a class="code" href="classbdm_1_1ArxDS.html#c7b3cc6cd059ff3d7f4462cedff4bdeb">00127</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#c7b3cc6cd059ff3d7f4462cedff4bdeb" title="Rv of the regressor.">Rrv</a>; |
| 144 | <a name="l00129"></a><a class="code" href="classbdm_1_1ArxDS.html#a11a3f3fbeea1d17b66b073017964597">00129</a> vec <a class="code" href="classbdm_1_1ArxDS.html#a11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>; |
| 145 | <a name="l00131"></a><a class="code" href="classbdm_1_1ArxDS.html#392b87be85675cb3d55fa4953d671bb5">00131</a> vec <a class="code" href="classbdm_1_1ArxDS.html#392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a>; |
| 146 | <a name="l00133"></a><a class="code" href="classbdm_1_1ArxDS.html#b2d7530264499b92c3aa32454b960abe">00133</a> vec <a class="code" href="classbdm_1_1ArxDS.html#b2d7530264499b92c3aa32454b960abe" title="temporary variable for regressor">rgr</a>; |
| 147 | <a name="l00135"></a><a class="code" href="classbdm_1_1ArxDS.html#fbe7b993ec5f75c195ae1b2ccd96a898">00135</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#fbe7b993ec5f75c195ae1b2ccd96a898" title="data link: H -&gt; rgr">rgrlnk</a>; |
| 148 | <a name="l00137"></a><a class="code" href="classbdm_1_1ArxDS.html#0aa9d8d35792159dc9611802f6c190eb">00137</a> <a class="code" href="classbdm_1_1mlnorm.html">mlnorm<chmat></a> <a class="code" href="classbdm_1_1ArxDS.html#0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>; |
| 149 | <a name="l00139"></a><a class="code" href="classbdm_1_1ArxDS.html#064e5d3f2dc0b39459c7ca53d05223e1">00139</a> <span class="keywordtype">bool</span> <a class="code" href="classbdm_1_1ArxDS.html#064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a>; |
| 150 | <a name="l00141"></a><a class="code" href="classbdm_1_1ArxDS.html#e13e5ffdfe9d896089310b0fc54e0c85">00141</a> <span class="keywordtype">int</span> <a class="code" href="classbdm_1_1ArxDS.html#e13e5ffdfe9d896089310b0fc54e0c85" title="loggers">L_theta</a>; |
| 151 | <a name="l00142"></a>00142 <span class="keywordtype">int</span> L_R; |
| 152 | <a name="l00143"></a>00143 <span class="keywordtype">int</span> dt_size; |
| 153 | <a name="l00144"></a>00144 <span class="keyword">public</span>: |
| 154 | <a name="l00145"></a><a class="code" href="classbdm_1_1ArxDS.html#db242e35812c311c8415bb7e31c3f595">00145</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#db242e35812c311c8415bb7e31c3f595" title="Returns full vector of observed data=[output, input].">getdata</a> ( vec &dt ) { |
| 155 | <a name="l00146"></a>00146 <span class="comment">//it_assert_debug ( dt.length() ==Drv.count(),"ArxDS" );</span> |
| 156 | <a name="l00147"></a>00147 dt=<a class="code" href="classbdm_1_1ArxDS.html#a11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>; |
| 157 | <a name="l00148"></a>00148 }; |
| 158 | <a name="l00149"></a><a class="code" href="classbdm_1_1ArxDS.html#701151418bc5fc3861acef8359fb0d80">00149</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#701151418bc5fc3861acef8359fb0d80" title="Returns data records at indeces.">getdata</a> ( vec &dt, <span class="keyword">const</span> ivec &indices ) { |
| 159 | <a name="l00150"></a>00150 it_assert_debug ( dt.length() ==indices.length(),<span class="stringliteral">"ArxDS"</span> ); |
| 160 | <a name="l00151"></a>00151 dt=<a class="code" href="classbdm_1_1ArxDS.html#a11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a> ( indices ); |
| 161 | <a name="l00152"></a>00152 }; |
| 162 | <a name="l00153"></a><a class="code" href="classbdm_1_1ArxDS.html#8f6da8a00abba70bc58c7a4030bd8940">00153</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#8f6da8a00abba70bc58c7a4030bd8940" title="Accepts action variable and schedule it for application.">write</a> ( vec &ut ) { |
| 163 | <a name="l00154"></a>00154 <span class="comment">//it_assert_debug ( ut.length() ==Urv.count(),"ArxDS" );</span> |
| 164 | <a name="l00155"></a>00155 <a class="code" href="classbdm_1_1ArxDS.html#392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a>=ut; |
| 165 | <a name="l00156"></a>00156 }; |
| 166 | <a name="l00157"></a><a class="code" href="classbdm_1_1ArxDS.html#477fd706639535f520e9dbbd19f73318">00157</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#477fd706639535f520e9dbbd19f73318" title="Accepts action variables at specific indeces.">write</a> ( vec &ut, <span class="keyword">const</span> ivec &indices ) { |
| 167 | <a name="l00158"></a>00158 it_assert_debug ( ut.length() ==indices.length(),<span class="stringliteral">"ArxDS"</span> ); |
| 168 | <a name="l00159"></a>00159 set_subvector ( <a class="code" href="classbdm_1_1ArxDS.html#392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a>, indices,ut ); |
| 169 | <a name="l00160"></a>00160 }; |
| 170 | <a name="l00161"></a>00161 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#57dfa26b23cc03d53b123fa7e0474b19" title="Moves from to , i.e. perfroms the actions and reads response of the system.">step</a>(); |
| 171 | <a name="l00163"></a><a class="code" href="classbdm_1_1ArxDS.html#7c8b418677a48041adacac8e8e9c9849">00163</a> <a class="code" href="classbdm_1_1ArxDS.html#7c8b418677a48041adacac8e8e9c9849" title="Default constructor.">ArxDS</a> ( ) {}; |
| 172 | <a name="l00165"></a><a class="code" href="classbdm_1_1ArxDS.html#2d9abc62f1fee862f0e1c60c5c4a3c8a">00165</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#2d9abc62f1fee862f0e1c60c5c4a3c8a" 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="classchmat.html" title="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</a> &sqR0 ) |
| 173 | <a name="l00166"></a>00166 { <a class="code" href="classbdm_1_1ArxDS.html#0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>.<a class="code" href="classbdm_1_1mlnorm.html#5d18dec3167584338a4775c1d165d96f" title="Set A and R.">set_parameters</a> ( Th0, mu0, sqR0 );}; |
| 174 | <a name="l00168"></a><a class="code" href="classbdm_1_1ArxDS.html#bf9cd9d4043d7e0dc61de56db37ec703">00168</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#bf9cd9d4043d7e0dc61de56db37ec703" title="Set.">set_drv</a> ( <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &yrv, <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &urv, <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &rrv ) { |
| 175 | <a name="l00169"></a>00169 <a class="code" href="classbdm_1_1ArxDS.html#c7b3cc6cd059ff3d7f4462cedff4bdeb" title="Rv of the regressor.">Rrv</a> = rrv; |
| 176 | <a name="l00170"></a>00170 <a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a> = urv; |
| 177 | <a name="l00171"></a>00171 dt_size = yrv.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() +urv.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>(); |
| 178 | <a name="l00172"></a>00172 |
| 179 | <a name="l00173"></a>00173 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> drv = concat ( yrv,urv ); |
| 180 | <a name="l00174"></a>00174 <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a> = drv; |
| 181 | <a name="l00175"></a>00175 <span class="keywordtype">int</span> td = rrv.<a class="code" href="classbdm_1_1RV.html#9a5c5aeeaf39299d07763377b05a8241" title="Minimum time-offset.">mint</a>(); |
| 182 | <a name="l00176"></a>00176 <a class="code" href="classbdm_1_1ArxDS.html#a11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>.set_size ( drv.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() * ( -td+1 ) ); |
| 183 | <a name="l00177"></a>00177 <a class="code" href="classbdm_1_1ArxDS.html#392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a>.set_size ( <a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() ); |
| 184 | <a name="l00178"></a>00178 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=-1;i>=td;i-- ) { |
| 185 | <a name="l00179"></a>00179 drv.<a class="code" href="classbdm_1_1RV.html#bd77cb0899f7fba1d0e34396137b7f1f" title="Shift time shifted by delta.">t</a> ( -1 ); |
| 186 | <a name="l00180"></a>00180 <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>.<a class="code" href="classbdm_1_1RV.html#87841b5ee43997b79789c0c22047e224" title="Add (concat) another variable to the current one,.">add</a> ( drv ); <span class="comment">//shift u1</span> |
| 187 | <a name="l00181"></a>00181 } |
| 188 | <a name="l00182"></a>00182 <a class="code" href="classbdm_1_1ArxDS.html#fbe7b993ec5f75c195ae1b2ccd96a898" title="data link: H -&gt; rgr">rgrlnk</a>.<a class="code" href="classbdm_1_1datalink.html#fb8337aac8329eb0ca96bfb3ff73ec67" title="set connection, rv must be fully present in rv_up">set_connection</a> ( rrv,<a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a> ); |
| 189 | <a name="l00183"></a>00183 |
| 190 | <a name="l00184"></a>00184 dtsize = <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>(); |
| 191 | <a name="l00185"></a>00185 utsize = <a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>(); |
| 192 | <a name="l00186"></a>00186 } |
| 193 | <a name="l00188"></a><a class="code" href="classbdm_1_1ArxDS.html#e7438127de87c5a8128edfa12255b436">00188</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#e7438127de87c5a8128edfa12255b436" title="set options from a string">set_options</a> ( <span class="keyword">const</span> <span class="keywordtype">string</span> &s ) { |
| 194 | <a name="l00189"></a>00189 <a class="code" href="classbdm_1_1ArxDS.html#064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a>= ( s.find ( <span class="stringliteral">"L_theta"</span> ) !=string::npos ); |
| 195 | <a name="l00190"></a>00190 }; |
| 196 | <a name="l00191"></a><a class="code" href="classbdm_1_1ArxDS.html#64819633a1191fcaa60d0de26ade2e52">00191</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#64819633a1191fcaa60d0de26ade2e52" 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 ) { |
| 197 | <a name="l00192"></a>00192 <span class="comment">//DS::log_add ( L ); too long!!</span> |
| 198 | <a name="l00193"></a>00193 <a class="code" href="classbdm_1_1DS.html#b4b7bdb9d98a11ab587aa0ad803bb867" title="Remember its own index in Logger L.">L_dt</a>=L.<a class="code" href="classbdm_1_1logger.html#47aa3b098a81d02a8ffaea2c9fa09ac7">add</a> ( <a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a> ( 0,dt_size ),<span class="stringliteral">""</span> ); |
| 199 | <a name="l00194"></a>00194 L_ut=L.<a class="code" href="classbdm_1_1logger.html#47aa3b098a81d02a8ffaea2c9fa09ac7">add</a> ( <a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>,<span class="stringliteral">""</span> ); |
206 | | <a name="l00201"></a>00201 |
207 | | <a name="l00202"></a>00202 }; |
208 | | <a name="l00203"></a>00203 |
209 | | <a name="l00204"></a>00204 <span class="keyword">class </span>stateDS : <span class="keyword">public</span> DS { |
210 | | <a name="l00205"></a>00205 <span class="keyword">protected</span>: |
211 | | <a name="l00207"></a>00207 mpdf* IM; |
212 | | <a name="l00209"></a>00209 mpdf* OM; |
213 | | <a name="l00211"></a>00211 vec dt; |
214 | | <a name="l00213"></a>00213 vec xt; |
215 | | <a name="l00215"></a>00215 vec ut; |
216 | | <a name="l00217"></a>00217 <span class="keywordtype">int</span> L_xt; |
217 | | <a name="l00218"></a>00218 <span class="keyword">public</span>: |
218 | | <a name="l00219"></a>00219 <span class="keywordtype">void</span> getdata ( vec &dt0 ) {dt0=dt;} |
219 | | <a name="l00220"></a>00220 <span class="keywordtype">void</span> getdata ( vec &dt0, <span class="keyword">const</span> ivec &indeces ) {dt0=dt ( indeces );} |
220 | | <a name="l00221"></a>00221 |
221 | | <a name="l00222"></a>00222 stateDS ( mpdf* IM0, mpdf* OM0, <span class="keywordtype">int</span> usize ) :<a class="code" href="classbdm_1_1DS.html#bedd82e08ae6686b4b1732a122c2201a" title="default constructors">DS</a> ( ),IM ( IM0 ),OM ( OM0 ), |
222 | | <a name="l00223"></a>00223 dt ( OM0->dimension() ), xt ( IM0->dimension() ), ut ( usize ) {} |
223 | | <a name="l00224"></a>00224 ~stateDS() {<span class="keyword">delete</span> IM; <span class="keyword">delete</span> OM;} |
224 | | <a name="l00225"></a>00225 <span class="keyword">virtual</span> <span class="keywordtype">void</span> step() { |
225 | | <a name="l00226"></a>00226 xt=IM->samplecond ( concat ( xt,ut ) ); |
226 | | <a name="l00227"></a>00227 dt=OM->samplecond ( concat ( xt,ut ) ); |
227 | | <a name="l00228"></a>00228 }; |
228 | | <a name="l00229"></a>00229 |
229 | | <a name="l00230"></a>00230 <span class="keyword">virtual</span> <span class="keywordtype">void</span> log_add ( logger &L ) { |
230 | | <a name="l00231"></a>00231 <a class="code" href="classbdm_1_1DS.html#3c9e417d85052396fe74c164857ee67e" title="Register DS for logging into logger L.">DS::log_add</a> ( L ); |
231 | | <a name="l00232"></a>00232 L_xt=L.add ( IM->_rv(),<span class="stringliteral">"true"</span> ); |
232 | | <a name="l00233"></a>00233 } |
233 | | <a name="l00234"></a>00234 <span class="keyword">virtual</span> <span class="keywordtype">void</span> logit ( logger &L ) { |
234 | | <a name="l00235"></a>00235 <a class="code" href="classbdm_1_1DS.html#e03d2c93cddd5c3a03107ddd3ae999cf" title="Register DS for logging into logger L.">DS::logit</a> ( L ); |
235 | | <a name="l00236"></a>00236 L.logit ( L_xt,xt ); |
236 | | <a name="l00237"></a>00237 } |
237 | | <a name="l00238"></a>00238 |
238 | | <a name="l00239"></a>00239 }; |
239 | | <a name="l00240"></a>00240 |
240 | | <a name="l00241"></a>00241 }; <span class="comment">//namespace</span> |
241 | | <a name="l00242"></a>00242 |
242 | | <a name="l00243"></a>00243 <span class="preprocessor">#endif // DS_H</span> |
| 206 | <a name="l00201"></a><a class="code" href="classbdm_1_1ArxDS.html#4128f5dc3a04063d62fc7e35635aeb90">00201</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#4128f5dc3a04063d62fc7e35635aeb90" 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 ) { |
| 207 | <a name="l00202"></a>00202 <span class="comment">//DS::logit ( L );</span> |
| 208 | <a name="l00203"></a>00203 L.<a class="code" href="classbdm_1_1logger.html#397c014b0aaf3581516e2a105d26a5c9" title="log this vector">logit</a> ( <a class="code" href="classbdm_1_1DS.html#b4b7bdb9d98a11ab587aa0ad803bb867" title="Remember its own index in Logger L.">L_dt</a>, <a class="code" href="classbdm_1_1ArxDS.html#a11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>.left ( dt_size ) ); |
| 209 | <a name="l00204"></a>00204 L.<a class="code" href="classbdm_1_1logger.html#397c014b0aaf3581516e2a105d26a5c9" title="log this vector">logit</a> ( L_ut, <a class="code" href="classbdm_1_1ArxDS.html#392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a> ); |
| 210 | <a name="l00205"></a>00205 |
| 211 | <a name="l00206"></a>00206 mat &A =<a class="code" href="classbdm_1_1ArxDS.html#0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>.<a class="code" href="classbdm_1_1mlnorm.html#262a2a486bff585f34bb6a5005b02614" title="access function">_A</a>(); |
| 212 | <a name="l00207"></a>00207 mat R =<a class="code" href="classbdm_1_1ArxDS.html#0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>.<a class="code" href="classbdm_1_1mlnorm.html#78120ecd1c2b1d7e80124b4603504604" title="access function">_R</a>(); |
| 213 | <a name="l00208"></a>00208 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1ArxDS.html#064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a> ) {L.<a class="code" href="classbdm_1_1logger.html#397c014b0aaf3581516e2a105d26a5c9" title="log this vector">logit</a> ( <a class="code" href="classbdm_1_1ArxDS.html#e13e5ffdfe9d896089310b0fc54e0c85" title="loggers">L_theta</a>,vec ( A._data(), A.rows() *A.cols() ) );}; |
| 214 | <a name="l00209"></a>00209 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1ArxDS.html#064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a> ) {L.<a class="code" href="classbdm_1_1logger.html#397c014b0aaf3581516e2a105d26a5c9" title="log this vector">logit</a> ( L_R, vec ( R._data(), R.rows() *R.rows() ) );}; |
| 215 | <a name="l00210"></a>00210 } |
| 216 | <a name="l00211"></a>00211 |
| 217 | <a name="l00212"></a>00212 <span class="comment">// TODO dokumentace - aktualizovat</span> |
| 218 | <a name="l00244"></a>00244 <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#6b8f76d576de14824df0257582cf7a33">from_setting</a>( <span class="keyword">const</span> Setting &root ); |
| 219 | <a name="l00245"></a>00245 |
| 220 | <a name="l00246"></a>00246 <span class="comment">// TODO dodelat void to_setting( Setting &root ) const;</span> |
| 221 | <a name="l00247"></a>00247 }; |
| 222 | <a name="l00248"></a>00248 |
| 223 | <a name="l00249"></a>00249 UIREGISTER( ArxDS ); |
| 224 | <a name="l00250"></a>00250 |
| 225 | <a name="l00251"></a>00251 <span class="keyword">class </span>stateDS : <span class="keyword">public</span> DS { |
| 226 | <a name="l00252"></a>00252 <span class="keyword">protected</span>: |
| 227 | <a name="l00254"></a>00254 mpdf* IM; |
| 228 | <a name="l00256"></a>00256 mpdf* OM; |
| 229 | <a name="l00258"></a>00258 vec dt; |
| 230 | <a name="l00260"></a>00260 vec xt; |
| 231 | <a name="l00262"></a>00262 vec ut; |
| 232 | <a name="l00264"></a>00264 <span class="keywordtype">int</span> L_xt; |
| 233 | <a name="l00265"></a>00265 <span class="keyword">public</span>: |
| 234 | <a name="l00266"></a>00266 <span class="keywordtype">void</span> getdata ( vec &dt0 ) {dt0=dt;} |
| 235 | <a name="l00267"></a>00267 <span class="keywordtype">void</span> getdata ( vec &dt0, <span class="keyword">const</span> ivec &indeces ) {dt0=dt ( indeces );} |
| 236 | <a name="l00268"></a>00268 |
| 237 | <a name="l00269"></a>00269 stateDS ( mpdf* IM0, mpdf* OM0, <span class="keywordtype">int</span> usize ) :<a class="code" href="classbdm_1_1DS.html#bedd82e08ae6686b4b1732a122c2201a" title="default constructors">DS</a> ( ),IM ( IM0 ),OM ( OM0 ), |
| 238 | <a name="l00270"></a>00270 dt ( OM0->dimension() ), xt ( IM0->dimension() ), ut ( usize ) {} |
| 239 | <a name="l00271"></a>00271 |
| 240 | <a name="l00272"></a>00272 stateDS(){} |
| 241 | <a name="l00273"></a>00273 |
| 242 | <a name="l00274"></a>00274 ~stateDS() {<span class="keyword">delete</span> IM; <span class="keyword">delete</span> OM;} |
| 243 | <a name="l00275"></a>00275 <span class="keyword">virtual</span> <span class="keywordtype">void</span> step() { |
| 244 | <a name="l00276"></a>00276 xt=IM->samplecond ( concat ( xt,ut ) ); |
| 245 | <a name="l00277"></a>00277 dt=OM->samplecond ( concat ( xt,ut ) ); |
| 246 | <a name="l00278"></a>00278 }; |
| 247 | <a name="l00279"></a>00279 |
| 248 | <a name="l00280"></a>00280 <span class="keyword">virtual</span> <span class="keywordtype">void</span> log_add ( logger &L ) { |
| 249 | <a name="l00281"></a>00281 <a class="code" href="classbdm_1_1DS.html#3c9e417d85052396fe74c164857ee67e" title="Register DS for logging into logger L.">DS::log_add</a> ( L ); |
| 250 | <a name="l00282"></a>00282 L_xt=L.add ( IM->_rv(),<span class="stringliteral">"true"</span> ); |
| 251 | <a name="l00283"></a>00283 } |
| 252 | <a name="l00284"></a>00284 <span class="keyword">virtual</span> <span class="keywordtype">void</span> logit ( logger &L ) { |
| 253 | <a name="l00285"></a>00285 <a class="code" href="classbdm_1_1DS.html#e03d2c93cddd5c3a03107ddd3ae999cf" title="Register DS for logging into logger L.">DS::logit</a> ( L ); |
| 254 | <a name="l00286"></a>00286 L.logit ( L_xt,xt ); |
| 255 | <a name="l00287"></a>00287 } |
| 256 | <a name="l00288"></a>00288 |
| 257 | <a name="l00318"></a>00318 <span class="keywordtype">void</span> from_setting( <span class="keyword">const</span> Setting &root ); |
| 258 | <a name="l00319"></a>00319 |
| 259 | <a name="l00320"></a>00320 <span class="comment">// TODO dodelat void to_setting( Setting &root ) const;</span> |
| 260 | <a name="l00321"></a>00321 |
| 261 | <a name="l00322"></a>00322 }; |
| 262 | <a name="l00323"></a>00323 |
| 263 | <a name="l00324"></a>00324 UIREGISTER(stateDS); |
| 264 | <a name="l00325"></a>00325 |
| 265 | <a name="l00326"></a>00326 }; <span class="comment">//namespace</span> |
| 266 | <a name="l00327"></a>00327 |
| 267 | <a name="l00328"></a>00328 <span class="preprocessor">#endif // DS_H</span> |