Skip to content

Commit

Permalink
Try #223:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Jul 12, 2023
2 parents 12cf8de + 0128c00 commit d7bd83b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/MarkovChainMonteCarlo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d7bd83b

Please sign in to comment.