Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
yebai and github-actions[bot] authored Jul 26, 2023
1 parent 0857774 commit f27f5a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/abstractmcmc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,9 @@ make_integrator(i::AbstractIntegrator, ϵ::Real) = i
make_integrator(i::Symbol, ϵ::Real) = make_integrator(Val(i), ϵ)
make_integrator(@nospecialize(i), ::Real) = error("Integrator $i not supported.")
make_integrator(i::Val{:leapfrog}, ϵ::Real) = Leapfrog(ϵ)
make_integrator(i::Val{:jitteredleapfrog}, ϵ::T) where T<:Real = JitteredLeapfrog(ϵ, T(0.1ϵ))
make_integrator(i::Val{:temperedleapfrog}, ϵ::T) where T<:Real = TemperedLeapfrog(ϵ, T(1))
make_integrator(i::Val{:jitteredleapfrog}, ϵ::T) where {T<:Real} =
JitteredLeapfrog(ϵ, T(0.1ϵ))
make_integrator(i::Val{:temperedleapfrog}, ϵ::T) where {T<:Real} = TemperedLeapfrog(ϵ, T(1))

#########

Expand Down
4 changes: 2 additions & 2 deletions test/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ include("common.jl")
(
adaptor_type = StanHMCAdaptor,
metric_type = DiagEuclideanMetric{T},
integrator_type = JitteredLeapfrog{T, T},
integrator_type = JitteredLeapfrog{T,T},
),
),
(
NUTS(T(0.8); integrator = :temperedleapfrog),
(
adaptor_type = StanHMCAdaptor,
metric_type = DiagEuclideanMetric{T},
integrator_type = TemperedLeapfrog{T, T},
integrator_type = TemperedLeapfrog{T,T},
),
),
]
Expand Down

0 comments on commit f27f5a7

Please sign in to comment.