Hi Willi,<br><br>I agree, this change was done at one point but it was not done correctly, and was giving incorrect results.<br>I had been hoping to make the changes as part of an overall templated-distance change, but that hasn't happened yet.<br>
<br><div class="gmail_quote">2009/3/30 Willi Richert <span dir="ltr"><<a href="mailto:w.richert@gmx.net">w.richert@gmx.net</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
in kdtree.hpp and node.hpp very often sqrt is used.<br>
<br>
d = sqrt(d);<br>
if (d <= __max)<br>
...<br>
__max itself is also a sqrt()ed value<br>
<br>
IMHO, the speed could be improved if that is omitted everywhere. Just<br>
comparing the squared distances should work if the specified ranges are<br>
converted once at the interface methods.<br>
<br>
wr<br>
<br>
_______________________________________________<br>
libkdtree-devel mailing list<br>
<a href="mailto:libkdtree-devel@lists.alioth.debian.org">libkdtree-devel@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel</a><br>
</blockquote></div><br>