multinomial_resample

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

Resample with multinomial resampling.

  • w: Log weights.

Return: the vector of ancestor indices.