resample_multinomial

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

Resample with multinomial resampling.

  • w: Log weights.

Return: the vector of ancestor indices.