3 ms·
Is there a typo in the code block for the `Process` function near the end of the post? Lines 13-15 have the following loop: while (remapVec[remapStartI
by saghm 1y ago
Is there a typo in the code block for the `Process` function near the end of the post? Lines 13-15 have the following loop:
while (remapVec[remapStartIndex] >= index) { // Follow the 'cycle'
index = remapVec[remapStartIndex];
}
I'm not sure what that loop is supposed to be doing, but as its written it looks like it would either be skipped entirely or never terminate; after single iteration, the the two values would be equal and never change again.
- johnfn 1y agoThe authors probably intended to write: index = remapVec[index]; which would do a better job at following a cycle.