Skip to contents

Runs a fixed-n Metropolis–Hastings sampler in the domain bounding box and then clips points to the polygon.

This implementation is heuristic but internally consistent (see C++ header): it targets a saturation potential based on per-point neighbour counts. It is not a drop-in reproduction of the exact spatstat Geyer saturation process likelihood.

The result is thinned to return exactly n_target points. If clipping leaves too few points, we generate additional points (never by duplicating existing ones).

Usage

simulate_points_geyer_fast(
  domain,
  n_target,
  r,
  gamma,
  sat,
  sweeps = 2000,
  burnin = 200,
  thin = 1
)

Arguments

domain

sf polygon/multipolygon defining the window.

n_target

integer, number of points to return.

r

interaction radius.

gamma

interaction parameter (<1 inhibition, >1 clustering).

sat

saturation count (positive integer).

sweeps

MH sweeps (per point).

burnin

burn-in sweeps.

thin

unused (reserved).

Value

sf POINT layer with n_target points.