K-d tree: Difference between revisions

m
Line 1,323:
const rand3point = rand(3, 1)
idx, dist = knn(kdcubetree, rand3point, 1)
 
println("\n\n1000 cube points: The point $rand3point is closest to the point $(cubedis[1:3, idx[1]])",
" at distance $(dist[1]).")
NearestNeighbors.print_stats()
 
 
NearestNeighbors.reset_stats()
Line 1,334 ⟶ 1,332:
const rand3point2 = rand(3, 1)
idx, dist = knn(kdcubetree2, rand3point2, 1)
 
println("\n\nExtra: The point $rand3point2 is closest to the point $(cubedis2[1:3, idx[1]]) out of $(size(cubedis2)[2]) points,",
" at distance $(dist[1]).")
4,102

edits