@@ -330,11 +330,16 @@ The resampling steps use the given `resampler`.
330
330
Del Moral, P., Doucet, A., & Jasra, A. (2006). Sequential monte carlo samplers.
331
331
Journal of the Royal Statistical Society: Series B (Statistical Methodology), 68(3), 411-436.
332
332
"""
333
- function sweep! (rng:: Random.AbstractRNG , pc:: ParticleContainer , resampler)
333
+ function sweep! (
334
+ rng:: Random.AbstractRNG ,
335
+ pc:: ParticleContainer ,
336
+ resampler,
337
+ ref:: Union{Particle,Nothing} = nothing ,
338
+ )
334
339
# Initial step:
335
340
336
341
# Resample and propagate particles.
337
- resample_propagate! (rng, pc, resampler)
342
+ resample_propagate! (rng, pc, resampler, ref )
338
343
339
344
# Compute the current normalizing constant ``Z₀`` of the unnormalized logarithmic
340
345
# weights.
@@ -355,7 +360,7 @@ function sweep!(rng::Random.AbstractRNG, pc::ParticleContainer, resampler)
355
360
# For observations ``y₂, …, yₜ``:
356
361
while ! isdone
357
362
# Resample and propagate particles.
358
- resample_propagate! (rng, pc, resampler)
363
+ resample_propagate! (rng, pc, resampler, ref )
359
364
360
365
# Compute the current normalizing constant ``Z₀`` of the unnormalized logarithmic
361
366
# weights.
0 commit comments