Hello,
Not an issue per se but the explanation of a comment.
I was reading your implementation and saw this comment here. The implementation of this part of the algorithm is quite convoluted in the reference implementation (available here which I believe this is a mirror on github). I haven't fully wrapped my head around yet…
The reference implementation uses indices 2 and 1 here. But if you are here in the code, left points coincide, this means you went through this line which pushes a 0 (NULL) at index 0, before the events.
In your code you track this via a boolean, not a NULL value in the events array. So this is why 1 and 0 are the correct values in your implementation, your events are not shifted to position 2 and 1 by a NULL value. :-)
Hello,
Not an issue per se but the explanation of a comment.
I was reading your implementation and saw this comment here. The implementation of this part of the algorithm is quite convoluted in the reference implementation (available here which I believe this is a mirror on github). I haven't fully wrapped my head around yet…
The reference implementation uses indices
2and1here. But if you are here in the code, left points coincide, this means you went through this line which pushes a0(NULL) at index0, before the events.In your code you track this via a boolean, not a
NULLvalue in theeventsarray. So this is why1and0are the correct values in your implementation, your events are not shifted to position2and1by a NULL value. :-)