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 1
1
export AbstractLikelihood, Likelihood
2
2
3
3
abstract 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)
4
9
5
10
# @inline function logdensityof(ℓ::AbstractLikelihood, p)
6
11
# t() = dynamic(unsafe_logdensityof(ℓ, p))
@@ -121,10 +126,6 @@ struct Likelihood{K,X} <: AbstractLikelihood
121
126
Likelihood (μ, x) = Likelihood (kernel (μ), x)
122
127
end
123
128
124
- (lik:: AbstractLikelihood )(p) = exp (ULogarithmic, logdensityof (lik. k (p), lik. x))
125
-
126
- DensityInterface. DensityKind (:: AbstractLikelihood ) = IsDensity ()
127
-
128
129
function Pretty. quoteof (ℓ:: Likelihood )
129
130
k = Pretty. quoteof (ℓ. k)
130
131
x = Pretty. quoteof (ℓ. x)
You can’t perform that action at this time.
0 commit comments