diff --git a/src/MarkovChainMonteCarlo.jl b/src/MarkovChainMonteCarlo.jl index 6faa986d0..e7a862c28 100644 --- a/src/MarkovChainMonteCarlo.jl +++ b/src/MarkovChainMonteCarlo.jl @@ -211,7 +211,12 @@ AdvancedMH.logdensity(model::AdvancedMH.DensityModel, t::MCMCState) = t.log_dens # AdvancedMH.transition() is only called to create a new proposal, so create a MCMCState # with accepted = true since that object will only be used if proposal is accepted. -function AdvancedMH.transition(sampler::AdvancedMH.MHSampler, model::AdvancedMH.DensityModel, params, log_density::Real) +function AdvancedMH.transition( + sampler::MHS, + model::AdvancedMH.DensityModel, + params, + log_density::Real, +) where {MHS <: Union{pCNMetropolisHastings, RWMetropolisHastings}} return MCMCState(params, log_density, true) end