Skip to content

Commit 697a5d5

Browse files
committed
Fix integer argument for dependency graph in grid PRS
1 parent 43a502f commit 697a5d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/grid_prs.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,10 @@ function weighted_interaction_graph(
240240
)::SWG.SimpleWeightedGraph
241241
window_ = window(spp)
242242
if allequal(window_.w)
243-
nb_cells_x = cld(window_.w[1], spp.r)
243+
nb_cells_x = Int(cld(window_.w[1], spp.r))
244244
return uniform_weighted_graph(rng, king_graph(nb_cells_x))
245245
else
246-
nb_cells_x, nb_cells_y = cld.(Int, window_.w, spp.r)
246+
nb_cells_x, nb_cells_y = Int(cld.(window_.w, spp.r))
247247
return uniform_weighted_graph(rng, king_graph(nb_cells_x, nb_cells_y))
248248
end
249249
end
@@ -264,9 +264,9 @@ function initialize_cells(
264264
window_ = window(spp)
265265
nb_cells_x = nb_cells_y = 1
266266
if allequal(window_.w) # SquareWindow
267-
nb_cells_x = nb_cells_y = cld(window_.w[1], spp.r)
267+
nb_cells_x = nb_cells_y = Int(cld(window_.w[1], spp.r))
268268
else
269-
nb_cells_x, nb_cells_y = cld.(Int, window_.w, spp.r)
269+
nb_cells_x, nb_cells_y = Int(cld.(Int, window_.w, spp.r))
270270
end
271271

272272
cells = Vector{SpatialCellGridPRS{T}}(undef, nb_cells_x * nb_cells_y)

0 commit comments

Comments
 (0)