@@ -5,20 +5,19 @@ using Plots
55
66# Pedagogy
77function pedagogy_generate_sample_prs (
8- pp:: PRS.HardCorePointProcess{T} ;
9- win:: Union{Nothing,PRS.AbstractWindow} = nothing ,
10- rng= - 1
8+ pp:: PRS.HardCorePointProcess{T} ;
9+ win:: Union{Nothing,PRS.AbstractWindow} = nothing ,
10+ rng= - 1
1111):: Vector{T} where {T}
1212
1313 path (i) = joinpath (" docs/plots/output/hard_core_spatial" , join ([lpad (i, 3 , " 0" ), " .pdf" ]))
1414
15- rng = PRS. getRNG (rng)
1615 window_ = win === nothing ? PRS. window (pp) : win
1716
1817 n = rand (rng, Distributions. Poisson (pp. β * PRS. volume (window_)))
1918 points = Matrix {Float64} (undef, PRS. dimension (pp), n)
2019 for x in eachcol (points)
21- x .= rand (window_; rng= rng )
20+ x .= rand (rng, window_ )
2221 end
2322
2423 i = 0
@@ -44,7 +43,7 @@ function pedagogy_generate_sample_prs(
4443 i+= 1
4544 Plots. savefig (p, path (i))
4645
47- resampled = PRS. generate_sample_poisson_union_balls (pp. β, points[:, bad], pp. r; win = window_, rng = rng )
46+ resampled = PRS. generate_sample_poisson_union_balls (rng, pp. β, points[:, bad], pp. r, window_ )
4847 pedagogy_plot! (p, resampled, true , 0 , " blue" , pp. window)
4948 i+= 1
5049 Plots. savefig (p, path (i))
@@ -61,12 +60,12 @@ function pedagogy_generate_sample_prs(
6160end
6261
6362function pedagogy_plot! (
64- p,
65- points,
66- show_center= true ,
67- radius= 0 ,
68- color= " white" ,
69- window= SquareWindow (zeros (2 ), 1 )
63+ p,
64+ points,
65+ show_center= true ,
66+ radius= 0 ,
67+ color= " white" ,
68+ window= SquareWindow (zeros (2 ), 1 )
7069)
7170 for x in (points isa Matrix ? eachcol (points) : points)
7271 if radius > 0
@@ -114,9 +113,9 @@ function plot_disk!(p, center, radius, color=:white)
114113end
115114
116115function plot (
117- pp:: PRS.AbstractSpatialPointProcess ,
118- points;
119- title= " "
116+ pp:: PRS.AbstractSpatialPointProcess ,
117+ points;
118+ title= " "
120119)
121120 p = Plots. plot ([0 ], [0 ],
122121 label= " " , legend= false ,
0 commit comments