Skip to content

Commit

Permalink
fix SafePoisson to be Discrete dist
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelBrand1 committed Aug 20, 2024
1 parent 8c383d2 commit 8ed5a8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion EpiAware/src/EpiAwareUtils/SafePoisson.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var(d)
7.016735912097631e20
```
"
struct SafePoisson{T <: Real} <: ContinuousUnivariateDistribution
struct SafePoisson{T <: Real} <: DiscreteUnivariateDistribution
λ::T

SafePoisson{T}::Real) where {T <: Real} = new{T}(λ)
Expand Down
3 changes: 3 additions & 0 deletions EpiAware/test/EpiAwareUtils/SafePoisson.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
λ = 10.0
dist = SafePoisson(λ)
@test typeof(dist) <: SafePoisson
@test rand(dist) isa Int
@test rand(dist, 10) isa Vector{Int}
@test rand(dist, 10, 10) isa Array{Int}
end

@testitem "Check distribution properties of SafePoisson" begin
Expand Down

0 comments on commit 8ed5a8d

Please sign in to comment.