Skip to content

Commit 83fc0c0

Browse files
committed
Make JET happy
1 parent 313b21a commit 83fc0c0

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/combinators/power.jl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ function Base.:^(μ::M, dims::NTuple{N,I}) where {M<:AbstractMeasure,N,I<:Intege
3939
ProductMeasure(identity, Fill(μ, dims))
4040
end
4141

42-
function Base.show(io::IO, d::PowerMeasure)
42+
# Same as PowerMeasure
43+
function Base.show(io::IO, d::ProductMeasure{F,<:Fill}) where {F}
4344
io = IOContext(io, :compact => true)
4445
print(io, d.f(first(d.pars)), " ^ ", size(d.pars))
4546
end
4647

47-
function Base.show(io::IO, d::PowerMeasure{F,T,1}) where {F,T}
48+
# Same as PowerMeasure{F,T,1} where {F,T}
49+
function Base.show(io::IO, d::ProductMeasure{F,Fill{T,1,A}}) where {F,T,A}
4850
io = IOContext(io, :compact => true)
4951
print(io, d.f(first(d.pars)), " ^ ", size(d.pars)[1])
5052
end
@@ -56,7 +58,8 @@ function Base.:^(μ::WeightedMeasure, dims::NTuple{N,I}) where {N,I<:Integer}
5658
return WeightedMeasure(k, μ.base^dims)
5759
end
5860

59-
params(d::PowerMeasure{D}) where {D} = params(first(marginals(d)))
60-
params(::Type{PowerMeasure{D}}) where {D} = params(D)
61+
params(d::ProductMeasure{F,<:Fill}) where {F} = params(first(marginals(d)))
62+
63+
params(::Type{P}) where {F,P<:ProductMeasure{F,<:Fill}} = params(D)
6164

6265
# basemeasure(μ::PowerMeasure) = @inbounds basemeasure(first(μ.data))^size(μ.data)

src/kernel.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function kernelfactor(::P) where {N, P <: ParameterizedMeasure{N}}
8989
(constructorof(P), N)
9090
end
9191

92-
function kernelfactor::PowerMeasure)
92+
function kernelfactor::ProductMeasure{F,<:Fill}) where {F}
9393
k = kernel(first(marginals(μ)))
9494
(p -> k.f(p)^size(μ), k.ops)
9595
end

0 commit comments

Comments
 (0)