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