Package org.virus.cvxhull.api.algorithms

Examples of org.virus.cvxhull.api.algorithms.ConvexHullAlgorithm


    public void setAlgorithm(ConvexHullAlgorithm.Algorithm algorithm) {
        this.algorithm = algorithm;
    }

    public void test(Painter painter) {
        ConvexHullAlgorithm algo = algorithm.newInstance(xs, ys);

        painter.add(algo);
        algo.run();
        painter.repaint();
    }
View Full Code Here


        algo.run();
        painter.repaint();
    }

    public void testLog(Painter painter) {
        ConvexHullAlgorithm algo;

        System.out.println("Testing " + algorithm);

        System.out.println("\tInitializing algorithm....");
        algo = algorithm.newInstance(xs, ys);
        painter.add(algo);
        painter.repaint();

        System.out.printf("\tRunning algorithm with %d elements with an x span of %d and y span of %d\n",
                xs.length, xSpan, ySpan);
        long runTime = algo.run();
        System.out.printf("\tFinished test, took %dms to calculate | O = %f\n" +
                "\tPoints on hull: %d\n",
                runTime, algo.bigO(), algo.getHullArray().length);
    }
View Full Code Here

TOP

Related Classes of org.virus.cvxhull.api.algorithms.ConvexHullAlgorithm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.