Skip to content

Commit

Permalink
Update smc.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
yebai authored Oct 23, 2023
1 parent 6bacdaf commit 76c82ac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/smc.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
struct SMC{R} <: AbstractMCMC.AbstractSampler
abstract type ParticleSampler <: AbstractMCMC.AbstractSampler end

struct SMC{R} <: ParticleSampler
nparticles::Int
resampler::R
end
Expand Down Expand Up @@ -51,7 +53,7 @@ function AbstractMCMC.sample(
return SMCSample(collect(particles), getweights(particles), logevidence)
end

struct PG{R} <: AbstractMCMC.AbstractSampler
struct PG{R} <: ParticleSampler
"""Number of particles."""
nparticles::Int
"""Resampling algorithm."""
Expand Down

0 comments on commit 76c82ac

Please sign in to comment.