@@ -17,35 +17,46 @@ Tells whether or not the spatial point process `p` is homogeneous.
1717ishomogeneous (p:: PointProcess ) = false
1818
1919"""
20- rand(p, g, n=1; [algo])
20+ rand([rng], p, g, n=1; [algo])
2121
2222Generate `n` realizations of spatial point process `p`
2323inside geometry `g`. Optionally specify sampling
24- algorithm `algo`.
24+ algorithm `algo` and random number generator `rng` .
2525"""
26- Base. rand (p:: PointProcess , g:: Geometry , n:: Int ;
26+ Base. rand (rng:: Random.AbstractRNG ,
27+ p:: PointProcess , g:: Geometry , n:: Int ;
2728 algo= default_sampling_algorithm (p)) =
28- [rand_single (p, g, algo) for i in 1 : n]
29+ [rand_single (rng, p, g, algo) for i in 1 : n]
2930
30- Base. rand (p:: PointProcess , g:: Geometry ;
31+ Base. rand (rng:: Random.AbstractRNG ,
32+ p:: PointProcess , g:: Geometry ;
3133 algo= default_sampling_algorithm (p)) =
32- rand_single (p, g, algo)
34+ rand_single (rng, p, g, algo)
35+
36+ Base. rand (p:: PointProcess , g:: Geometry , n:: Int ;
37+ algo= default_sampling_algorithm (p)) =
38+ rand (Random. GLOBAL_RNG, p, g, n; algo= algo)
39+
40+ Base. rand (p:: PointProcess , g:: Geometry ;
41+ algo= default_sampling_algorithm (p)) =
42+ rand (Random. GLOBAL_RNG, p, g; algo= algo)
3343
3444"""
3545 rand_single(p, g, algo)
3646
3747Generate a single realization of spatial point process
3848`p` inside geometry `g` with sampling `algo`.
3949"""
40- rand_single (:: PointProcess , :: Geometry , algo) =
41- @error " not implemented"
50+ rand_single (:: Random.AbstractRNG , :: PointProcess , :: Geometry , algo) =
51+ throw ( ErrorException ( " not implemented" ))
4252
4353"""
4454 default_sampling_algorithm(p)
4555
4656Default sampling algorithm for spatial point process `p`.
4757"""
48- default_sampling_algorithm (:: PointProcess ) = @error " not implemented"
58+ default_sampling_algorithm (:: PointProcess ) =
59+ throw (ErrorException (" not implemented" ))
4960
5061"""
5162 p₁ ∪ p₂
0 commit comments