K-d tree: Difference between revisions
→{{header|Julia}}
Line 1,313:
const kdtree = KDTree(Float64.(data))
const indexpoint = [9,2]
println("Wikipedia example: The nearest neighbor to $indexpoint is ",
"$(data[1:2,
NearestNeighbors.print_stats()
Line 1,322:
const kdcubetree = KDTree(cubedis)
const rand3point = rand(3, 1)
println("\n\
" at distance $(
NearestNeighbors.print_stats()
Line 1,331:
NearestNeighbors.reset_stats()
const cubedis2 = rand(3, 500000)
const kdcubetree2 = KDTree(
const rand3point2 = rand(3, 1)
println("\n\
" at distance $(
NearestNeighbors.print_stats()
</lang>
Line 1,346:
1000 cube points: The point [0.
Nodes visited:
Points visited: 30, out of these: 0 unchecked.
Extra: The point [0.
Nodes visited:
Points visited:
</pre>
|