Ask questionsStep 4 questions

Hi, I have a problem in understanding the implementation in step 4. The bucket is the prefix sum of the weights, but how is this equivalent to the second bucket in Figure 1? Since bucket is the prefix sum, then bucket[i+1] has always larger size that bucket[i] but that doesn't mean that weight i+1 is larger than weight i. So I don't understand why prefix sum scales proportionally to the particles' weights. Also about the low-variance sampling. Let's say i=2 and r=1. then we will draw from bucket r+i/N=1.02. Does this mean that we draw from bucket[1]? Finally in the method Array.lowerBound(x), why do we need to return the lowest element x?

Thank you


Answer questions grasstr8

That was really helpful, thank you!


Related questions

No questions were found.
Github User Rank List