@@ -314,11 +314,16 @@ The resampling steps use the given `resampler`.
314
314
Del Moral, P., Doucet, A., & Jasra, A. (2006). Sequential monte carlo samplers.
315
315
Journal of the Royal Statistical Society: Series B (Statistical Methodology), 68(3), 411-436.
316
316
"""
317
- function sweep! (rng:: Random.AbstractRNG , pc:: ParticleContainer , resampler)
317
+ function sweep! (
318
+ rng:: Random.AbstractRNG ,
319
+ pc:: ParticleContainer ,
320
+ resampler,
321
+ ref:: Union{Particle,Nothing} = nothing ,
322
+ )
318
323
# Initial step:
319
324
320
325
# Resample and propagate particles.
321
- resample_propagate! (rng, pc, resampler)
326
+ resample_propagate! (rng, pc, resampler, ref )
322
327
323
328
# Compute the current normalizing constant ``Z₀`` of the unnormalized logarithmic
324
329
# weights.
@@ -339,7 +344,7 @@ function sweep!(rng::Random.AbstractRNG, pc::ParticleContainer, resampler)
339
344
# For observations ``y₂, …, yₜ``:
340
345
while ! isdone
341
346
# Resample and propagate particles.
342
- resample_propagate! (rng, pc, resampler)
347
+ resample_propagate! (rng, pc, resampler, ref )
343
348
344
349
# Compute the current normalizing constant ``Z₀`` of the unnormalized logarithmic
345
350
# weights.
0 commit comments