rweeks/util — pull request #1 by aseldawy (2011-11-14 19:44:13+00:00)
Title: Fixed a bug with RTree

Hi,
Thanks for your RTree. I'm currently using it in one of my projects. I fixed a very rare bug that happens upon a split and causes two nodes to have the same child. The problem happens when the algorithm is looking for the best pair to split and it happens that the first and only pair found is actually the same node twice (nMaxLb == nMinUb). In this case the score is set to zero which happens to be equal to the best score, hence, this pair is actually chosen for split. I corrected it by setting the score to -1 so that a similar pair is never chosen for split.
Thank you