Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Commit e5e136c

Browse files
committed
Rename default_lambda_max -> maxintensity
1 parent 2c9fb76 commit e5e136c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/processes/poisson.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ ishomogeneous(p::PoissonProcess{<:AbstractVector}) = false
2323

2424
defaultalgo(::PoissonProcess, ::Any) = ConstantIntensity()
2525

26-
defaultalgo(p::PoissonProcess{<:Function}, g) = LewisShedler(default_lambda_max(p, g))
26+
defaultalgo(p::PoissonProcess{<:Function}, g) = LewisShedler(maxintensity(p, g))
2727

28-
function default_lambda_max(p::PoissonProcess{<:Function}, g)
28+
function maxintensity(p::PoissonProcess{<:Function}, g)
2929
points = sample(g, HomogeneousSampling(10000))
30-
λvec = p.λ.(points)
31-
maximum(λvec) + 0.05 * (maximum(λvec) - minimum(λvec))
30+
λmin, λmax = extrema(p.λ, points)
31+
λmax + 0.05 * (λmax - λmin)
3232
end
3333

3434
#------------------

0 commit comments

Comments
 (0)