5 * A Java implementation of the <tt>voronoi</tt> Olden benchmark. Voronoi
6 * generates a random set of points and computes a Voronoi diagram for
10 * L. Guibas and J. Stolfi. "General Subdivisions and Voronoi Diagrams"
11 * ACM Trans. on Graphics 4(2):74-123, 1985.
14 * The Java version of voronoi (slightly) differs from the C version
15 * in several ways. The C version allocates an array of 4 edges and
16 * uses pointer addition to implement quick rotate operations. The
17 * Java version does not use pointer addition to implement these
20 public class TestRunner extends Thread
24 * The number of points in the diagram
28 public TestRunner(int npoints) {
29 this.points = npoints;
33 * The main routine which creates the points and then performs
34 * the delaunay triagulation.
35 * @param args the command line parameters
39 Vertex v = new Vertex();
41 Vertex extra = v.createPoints(1, new MyDouble(1.0f), points);
42 Vertex point = v.createPoints(points-1, new MyDouble(extra.X()), points-1);
43 Edge edge = point.buildDelaunayTriangulation(extra);
46 public static void main(String[] args) {
49 for(int i = 0; i < threadnum; ++i) {
50 TestRunner tr = new TestRunner(npoints);