Even I had a doubt regarding this. Since then it would increase the parameter for all the subsequent values. However, I wanted to keep the implementation as close to what they have stated in the pseudo code. http://graphics.cs.cmu.edu/people/efros/research/NPS/alg.html Should I remove it ?