Talk:Closest-pair problem: Difference between revisions

no edit summary
(→‎Comment on Algorithms Given: no one is bugfree :))
No edit summary
Line 32:
CRT detected that the application wrote to memory after end of heap buffer.
Sorry, don't know how to format this reply.
I put in checks to test out-of-bound indices in the function closest_pair_, and they fail on these lines:
xm = P[xP[midx]].x;
if ( P[yP[i]].x <= xm ) {
Using NP 10000,
xP[midx] returns 6041, when N is 5000.
yP[i] returns 7099, when N is 5000.
: Hm interesting... I'll take a look when I'll have more time. In my tests it did not crash, but it does not mean necessarily that it does not write outside the heap... I must do some deeper check. --[[User:ShinTakezou|ShinTakezou]] 10:16, 13 October 2009 (UTC)