Skip to content

Commit fc63162

Browse files
committed
Removed type piracy
1 parent 009f027 commit fc63162

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/model.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ mutable struct TracedSSM{SSM} <: SSMProblems.AbstractStateSpaceModel
2121
end
2222
end
2323

24-
(model::SSMProblems.StateSpaceModel)(Y::AbstractVector) = TracedSSM(model, Y)
2524
prior(ssm::TracedSSM) = ssm.model.prior
2625
dynamics(ssm::TracedSSM, step::Int) = ssm.model.dyn
2726
observation(ssm::TracedSSM, step::Int) = ssm.model.obs

test/container.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
end
99

1010
SSMProblems.logdensity(proc::LogPObservation, ::Int, state, observation) = proc.logp
11-
SSMProblems.distribution(proc::LogPDynamics, ::Int, state) = Uniform()
11+
SSMProblems.distribution(::LogPDynamics, ::Int, state) = Uniform()
1212
SSMProblems.distribution(::LogPPrior) = Uniform()
1313

1414
function LogPModel(logp::T) where {T<:Real}
1515
ssm = StateSpaceModel(LogPPrior(), LogPDynamics(), LogPObservation(logp))
1616
# pick some arbitrarily large observables
17-
return ssm(ones(T, 10))
17+
return AdvancedPS.TracedSSM(ssm, ones(T, 10))
1818
end
1919

2020
@testset "copy particle container" begin

test/linear-gaussian.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ end
9494
end
9595

9696
lgssm = LinearGaussianStateSpaceModel(X0, P0, A, B, Q, H, R)
97-
model = lgssm(ys)
97+
model = AdvancedPS.TracedSSM(lgssm, ys)
9898

9999
@testset "PGAS" begin
100100
pgas = AdvancedPS.PGAS(N_PARTICLES)

test/pgas.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
dyn = BaseModelDynamics.a, θ.q)
3737
obs = BaseModelObservation.r)
3838
ssm = StateSpaceModel(prior, dyn, obs)
39-
return ssm(zeros(T, 3))
39+
return AdvancedPS.TracedSSM(ssm, zeros(T, 3))
4040
end
4141

4242
@testset "fork reference" begin

0 commit comments

Comments
 (0)