Skip to content

Commit 75c1384

Browse files
committed
Improve type stability for likelihoods with type ctors
1 parent 670d0ba commit 75c1384

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/combinators/likelihood.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ struct Likelihood{K,X} <: AbstractLikelihood
123123
x::X
124124

125125
Likelihood(k::K, x::X) where {K<:AbstractTransitionKernel,X} = new{K,X}(k, x)
126+
Likelihood(::Type{K}, x::X) where {K,X} = new{Type{K},X}(K, x)
126127
Likelihood(k::K, x::X) where {K<:Function,X} = new{K,X}(k, x)
127128
Likelihood(μ, x) = Likelihood(kernel(μ), x)
128129
end

0 commit comments

Comments
 (0)