313 | | // fill window |
314 | | Y.append_col(val); |
315 | | Cond.append_col(cond); |
316 | | if (Y.cols()>win_length){ |
317 | | // shift the buffer |
318 | | Y=Y.get_cols(1,Y.cols()-1); |
319 | | Cond=Cond.get_cols(1,Cond.cols()-1); |
| 313 | |
| 314 | if(cond.size()>0) |
| 315 | { |
| 316 | // fill window |
| 317 | Y.append_col(val); |
| 318 | Cond.append_col(cond); |
| 319 | if (Y.cols()>win_length){ |
| 320 | // shift the buffer |
| 321 | Y=Y.get_cols(1,Y.cols()-1); |
| 322 | Cond=Cond.get_cols(1,Cond.cols()-1); |
| 323 | } |
| 324 | |
| 325 | est._V()=V0; |
| 326 | est._nu()=nu0; |
| 327 | for ( int t = 0; t < Y.cols(); t++ ) { |
| 328 | ARX::bayes ( Y.get_col ( t ), Cond.get_col ( t ) ); |
| 329 | } |
| 330 | } |
| 331 | else |
| 332 | { |
| 333 | Y.append_col(val); |
| 334 | |
| 335 | if (Y.cols()>win_length){ |
| 336 | // shift the buffer |
| 337 | Y=Y.get_cols(1,Y.cols()-1); |
| 338 | } |
| 339 | |
| 340 | est._V()=V0; |
| 341 | est._nu()=nu0; |
| 342 | |
| 343 | for ( int t = 0; t < Y.cols(); t++ ) { |
| 344 | ARX::bayes (Y.get_col ( t )); |
| 345 | } |