File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11export AbstractLikelihood, Likelihood
22
33abstract type AbstractLikelihood end
4+ (lik:: AbstractLikelihood )(p) = exp (ULogarithmic, logdensityof (lik. k (p), lik. x))
5+
6+ DensityInterface. DensityKind (:: AbstractLikelihood ) = IsDensity ()
7+
8+ Base.:∘ (:: typeof (log), lik:: AbstractLikelihood ) = logdensityof (lik)
49
510# @inline function logdensityof(ℓ::AbstractLikelihood, p)
611# t() = dynamic(unsafe_logdensityof(ℓ, p))
@@ -121,10 +126,6 @@ struct Likelihood{K,X} <: AbstractLikelihood
121126 Likelihood (μ, x) = Likelihood (kernel (μ), x)
122127end
123128
124- (lik:: AbstractLikelihood )(p) = exp (ULogarithmic, logdensityof (lik. k (p), lik. x))
125-
126- DensityInterface. DensityKind (:: AbstractLikelihood ) = IsDensity ()
127-
128129function Pretty. quoteof (ℓ:: Likelihood )
129130 k = Pretty. quoteof (ℓ. k)
130131 x = Pretty. quoteof (ℓ. x)
You can’t perform that action at this time.
0 commit comments