ESS is defined from the weights. Let the user set a threshold below which resampling should be done. See, e.g., p. 417 in del Moral, Doucet, and Jasra (2006).
Note that adding this option requires modification of code in various places, since we currently implicitly assume that all the weights are equal after the resampling step.
ESS is defined from the weights. Let the user set a threshold below which resampling should be done. See, e.g., p. 417 in del Moral, Doucet, and Jasra (2006).