chickadee » probdist » sampled-pdf:find-sample

sampled-pdf:find-sample:procedure

Given a number u in [0,1], returns the sample x(i) such that \sum_{j=1}^{i-1} w_j < Wu <= \sum_{j=1}^{i} w_j, where W is the total weight of the sample set.