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

Commit f8e3416

Browse files
committed
Updates for latest GeoStatsBase.jl
1 parent b65392d commit f8e3416

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/processes/binomial.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ default_sampling_algorithm(::BinomialProcess) = BinomialSampling()
2020
function rand_single(p::BinomialProcess, r::Rectangle{T,N},
2121
algo::BinomialSampling) where {N,T}
2222
# region configuration
23-
lo = origin(r)
24-
up = lo + sides(r)
23+
lo, up = extrema(r)
2524

2625
# product of uniform distributions
2726
U = product_distribution([Uniform(lo[i], up[i]) for i in 1:N])

src/processes/poisson.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ default_sampling_algorithm(::PoissonProcess{<:Function}) = DiscretizedSampling()
2727
function rand_single(p::PoissonProcess{<:Real}, r::Rectangle{T,N},
2828
algo::ProductSampling) where {N,T}
2929
# region configuration
30-
lo = origin(r)
31-
up = lo + sides(r)
30+
lo, up = extrema(r)
3231

3332
# simulate number of points
3433
λ = p.λ; V = volume(r)

test/processes.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@testset "Processes" begin
22
@testset "Basic" begin
33
for p in [BinomialProcess(100), PoissonProcess(100.)]
4-
r = Rectangle((0.,1.), (1.,1.))
4+
r = Rectangle((0.,1.), (1.,2.))
55
P = rand(p, r)
66
X = coordinates(P)
77
@test all(0 .≤ X[1,:] .≤ 1)

0 commit comments

Comments
 (0)