hyp/tree-generator — comment on commit 20a720d59342f3e5e73d3bc96202ca4c24150929
File: alg.cpp line 52
By lvictorino:

Why do you test / set closestDistance ?
With what I understood from the space colonization algorithm it seem to me that only influenceRadius needs to be compared to dist. For me, putting closestDistance in your test may be a source of bugs because it will eliminate points having a segments in their influenceRadius but being farer that the closest point your algorithm had already found.
Like that, if your algorithm finds the closest point first, you will use only this one, and point your next segment directly at it instead of normalize the vector composed of all other valids points at a correct distance (influenceRadius).
I don't know if this comment is clear, but I'd like to know why you test and set closestDistance? thx