-
Notifications
You must be signed in to change notification settings - Fork 180
Question regarding ForwardUpdate #18
Comments
Sorry about the delayed response. I've been rather busy these last few I agree with you analysis in the first two points. However, as mentioned in It has been a while since I've looked at this project but I am pretty sure On Fri, Oct 23, 2015 at 2:12 PM, Torf [email protected] wrote:
|
Thanks for your quick response, Nicholas! I still think that there's a bug, though, because the problematic distance in step 2 is not the same as the one in step 3: The code removes Please forgive my persistence, but the paper is a bit fuzzy on the details here so I'm trying to make sure I understand it correctly. |
This must be a bug. It looked fishy to me as well was happy to find a discussion already in the issue. |
I'm currently going through the source and I'm having trouble to understand how interval tree
A
is updated inForwardUpdate
: As far as I understand it, the idea is to move the location candidate one step to the right (Line 198) and then update the trees by removing distances related to the point on the left which is now outside the window and by adding distances related to the point on the right which is now inside the window.Since the window for tree
A
containsmin_size
points, I think we should add and removemin_size - 1
distances from treeA
, respectively. However, as far as I understand lines 201-219, the code actually does the following:min_distance - 1
distances fromZ[tau1 - min_size] - Z[tau1 - 1]
throughZ[tau1 - 2] - Z[tau1 - 1]
(inclusive). So far so good.min_distance
(!) distances fromZ[tau1 - min_size] - Z[tau1 - min_size - 1]
throughZ[tau1 - 1] - Z[tau1 - min_size - 1]
(inclusive). I don't think that last distance should be removed here, sinceZ[tau1 - 1]
is the new point andZ[tau1 - min_size - 1]
is the point that was just dropped.Z[tau1 - min_size - 1] - Z[tau1 - min_size]
. I don't think that's correct: this is a distance related to the point we just dropped, so it should be removed. In addition, we just did remove it in the previous step!I therefore think that the loop in line 208 should have the limit
i < tau1 - 1
(just as the loop before it) and that the addition of the single distance after it (lines 215-219) should be removed.Is this reasoning correct or did I miss something?
The text was updated successfully, but these errors were encountered: