C++ code for dispersal

disperse(a, Rdispersal, grid)

Arguments

a

IntegerVector. Final dispesal positions

Rdispersal

int. Dispersal radius in cells

grid

int. Number of cell per side of the matrix

Examples

disperse(c(10, 10), 2, 20)
#> [1] 8 10