| 304 | } |
| 305 | |
| 306 | void |
| 307 | SIR_scheme::observe_likelihood (const Vec& lw) |
| 308 | /* Observation fusion directly from likelihood weights |
| 309 | * lw may be smaller then the number of particles. Weights for additional particles are assumed to be 1 |
| 310 | * Pre : wir previous particle likelihood weights |
| 311 | * Post: wir fused (multiplicative) particle likelihood weights |
| 312 | */ |
| 313 | { |
| 314 | // Weight Particles. Fused with previous weight |
| 315 | Vec::const_iterator lw_end = lw.end(); |
| 316 | for (Vec::const_iterator lw_i = lw.begin(); lw_i != lw_end; ++lw_i) { |
| 317 | wir[lw_i.index()] *= *lw_i; |
| 318 | } |
| 319 | wir_update = true; |
| 320 | } |
| 321 | |
| 322 | |
| 323 | void SIR_scheme::copy_resamples (ColMatrix& P, const Importance_resampler::Resamples_t& presamples) |