Skip to contents

Points are proposed uniformly in the window, one at a time, and a proposal is kept only if it lies at least r from every point kept so far (Diggle, Besag and Gleaves 1976). The process stops when n points are kept or, if n is NULL, after max_failures consecutive rejections (an approximation to the jammed state; the jamming coverage of random sequential adsorption of discs is about 0.547, Feder 1980). Proposal k uses Philox uniforms 2k and 2k + 1 of stream 2k %/% 4096, as in the Python arm.

Usage

SequentialInhibition(r, window, n = NULL, max_failures = 1000L, seed = 0)

Arguments

r

Inhibition distance.

window

Rectangle c(xmin, xmax, ymin, ymax).

n

Target number of points (NULL to saturate).

max_failures

Consecutive rejections allowed.

seed

Philox key.

Value

List with points, proposals, n, saturated, coverage.

References

Diggle, P. J., Besag, J. E. and Gleaves, J. T. (1976). Statistical analysis of spatial point patterns by means of distance methods. Biometrics 32, 659-667.

Feder, J. (1980). Random sequential adsorption. Journal of Theoretical Biology 87, 237-254.

Examples

SequentialInhibition(0.2, c(0, 1, 0, 1), n = 5, seed = 1)$points
#>           [,1]       [,2]
#> [1,] 0.8902592 0.89468472
#> [2,] 0.5857259 0.71126808
#> [3,] 0.2474015 0.55650023
#> [4,] 0.7576265 0.03654381
#> [5,] 0.1433727 0.05385850