Skip to content

Commit 3f5f4e5

Browse files
committed
check remaining modules
1 parent 8229711 commit 3f5f4e5

File tree

7 files changed

+27
-128
lines changed

7 files changed

+27
-128
lines changed

EpiAware/src/EpiAwareUtils/EpiAwareUtils.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@ export HalfNormal, DirectSample, SafePoisson, SafeNegativeBinomial, SafeIntValue
1919
SafeDiscreteUnivariateDistribution
2020

2121
#Export functions
22-
export scan, spread_draws, censored_cdf, censored_pmf, get_param_array, prefix_submodel, ∫F
22+
export spread_draws, censored_cdf, censored_pmf, get_param_array, prefix_submodel, ∫F
2323

2424
# Export accumulate tools
2525
export get_state, accumulate_scan
2626

2727
include("docstrings.jl")
2828
include("censored_pmf.jl")
2929
include("HalfNormal.jl")
30-
include("scan.jl")
3130
include("accumulate_scan.jl")
3231
include("prefix_submodel.jl")
3332
include("turing-methods.jl")

EpiAware/src/EpiAwareUtils/SafeNegativeBinomial.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ struct SafeNegativeBinomial{T <: Real} <: SafeDiscreteUnivariateDistribution
8484
end
8585
end
8686

87-
#Outer constructors make AD work
8887
function SafeNegativeBinomial(r::T, p::T) where {T <: Real}
8988
return SafeNegativeBinomial{T}(r, p)
9089
end

EpiAware/src/EpiAwareUtils/scan.jl

Lines changed: 0 additions & 47 deletions
This file was deleted.

EpiAware/src/EpiInfModels/EpiData.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ struct EpiData{T <: Real, F <: Function}
5050
length(gen_int),
5151
transformation)
5252
end
53+
end
5354

54-
function EpiData(; gen_distribution::ContinuousDistribution,
55-
D_gen = nothing,
56-
Δd = 1.0,
57-
transformation::Function = exp)
58-
gen_int = censored_pmf(gen_distribution, Δd = Δd, D = D_gen) |>
59-
p -> p[2:end] ./ sum(p[2:end])
55+
function EpiData(; gen_distribution::ContinuousDistribution,
56+
D_gen = nothing,
57+
Δd = 1.0,
58+
transformation::Function = exp)
59+
gen_int = censored_pmf(gen_distribution, Δd = Δd, D = D_gen) |>
60+
p -> p[2:end] ./ sum(p[2:end])
6061

61-
return EpiData(gen_int, transformation)
62-
end
62+
return EpiData(gen_int, transformation)
6363
end
6464

6565
@doc raw"

EpiAware/src/EpiInfModels/Renewal.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,6 @@ struct Renewal{E, S <: Sampleable, A} <:
8686
initialisation_prior::S
8787
recurrent_step::A
8888

89-
function Renewal(data::EpiData; initialisation_prior = Normal())
90-
rev_gen_int = reverse(data.gen_int)
91-
recurrent_step = ConstantRenewalStep(rev_gen_int)
92-
return Renewal(data, initialisation_prior, recurrent_step)
93-
end
94-
95-
function Renewal(; data::EpiData, initialisation_prior = Normal())
96-
rev_gen_int = reverse(data.gen_int)
97-
recurrent_step = ConstantRenewalStep(rev_gen_int)
98-
return Renewal(data, initialisation_prior, recurrent_step)
99-
end
100-
10189
function Renewal(data::E,
10290
initialisation_prior::S,
10391
recurrent_step::A) where {
@@ -106,6 +94,18 @@ struct Renewal{E, S <: Sampleable, A} <:
10694
end
10795
end
10896

97+
function Renewal(data::EpiData; initialisation_prior = Normal())
98+
rev_gen_int = reverse(data.gen_int)
99+
recurrent_step = ConstantRenewalStep(rev_gen_int)
100+
return Renewal(data, initialisation_prior, recurrent_step)
101+
end
102+
103+
function Renewal(; data::EpiData, initialisation_prior = Normal())
104+
rev_gen_int = reverse(data.gen_int)
105+
recurrent_step = ConstantRenewalStep(rev_gen_int)
106+
return Renewal(data, initialisation_prior, recurrent_step)
107+
end
108+
109109
"""
110110
Create the initial state of the `Renewal` model.
111111

EpiAware/src/EpiLatentModels/manipulators/broadcast/LatentModel.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ struct BroadcastLatentModel{
2727
"The broadcast rule to be applied."
2828
broadcast_rule::B
2929

30-
function BroadcastLatentModel(model::M; period::Integer,
31-
broadcast_rule::B) where {
32-
M <: AbstractTuringLatentModel, B <: AbstractBroadcastRule}
33-
BroadcastLatentModel(model, period, broadcast_rule)
34-
end
35-
3630
function BroadcastLatentModel(model::M, period::Integer,
3731
broadcast_rule::B) where {
3832
M <: AbstractTuringLatentModel, B <: AbstractBroadcastRule}
@@ -42,6 +36,12 @@ struct BroadcastLatentModel{
4236
end
4337
end
4438

39+
function BroadcastLatentModel(model::M; period::Integer,
40+
broadcast_rule::B) where {
41+
M <: AbstractTuringLatentModel, B <: AbstractBroadcastRule}
42+
BroadcastLatentModel(model, period, broadcast_rule)
43+
end
44+
4545
@doc raw"
4646
Generates latent periods using the specified `model` and `n` number of samples.
4747

EpiAware/test/EpiAwareUtils/scan.jl

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)