// For each iteration of the loop we have R(n) = Io - sum(E(i))[i in the range 0..n] // R(i) : the remaining point after the segmentation at the stage i // R(n) = R(n-1) - E(n) -> the remaining point ...