resample

function resample(w:Real[_]) -> Integer[_]

Resample with systematic resampling.

  • w: Log weights.

Return: the vector of ancestor indices.