Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellblazer committed Aug 29, 2023
1 parent ca72379 commit a9482bb
Showing 1 changed file with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,14 @@

import javax.vecmath.Point3f;

import com.hellblazer.luciferase.common.KdTree;

/**
* @author hal.hildebrand
*/
public class KdTreeTest {
public static void main(String[] args) {
testRandom(1000);
System.out.println();
for (int i = 0; i < 100; i++) {
testRandom(100000);
}
testRandom(100000);
}

private static KdTree.Node randomPoint(Random random) {
Expand All @@ -51,12 +47,12 @@ private static void testRandom(int points) {
long now = System.currentTimeMillis();
KdTree tree = new KdTree(3, nodes);
System.out.println("T: " + (System.currentTimeMillis() - now));
// KdTree.Node target = randomPoint(random);
// KdTree.Node nearest = tree.findNearest(target);
// System.out.println("Random data (" + points + " points):");
// System.out.println("target: " + target);
// System.out.println("nearest point: " + nearest);
// System.out.println("distance: " + tree.distance());
// System.out.println("nodes visited: " + tree.visited());
KdTree.Node target = randomPoint(random);
KdTree.Node nearest = tree.findNearest(target);
System.out.println("Random data (" + points + " points):");
System.out.println("target: " + target);
System.out.println("nearest point: " + nearest);
System.out.println("distance: " + tree.distance());
System.out.println("nodes visited: " + tree.visited());
}
}

0 comments on commit a9482bb

Please sign in to comment.