@Test
    public void testDijkstra() {
        for (int i = 100; i < 4000; i+= 100) {
            Graph g = RandomGraph.quick(i);
            System.out.print("|V| = " + g.getVertices().getSize() + "   |E| = " + g.getEdges().getSize() + ":    ");
            double startTime;
            double endTime;
            double[] times = new double[20];
            for (int j = 0; j < 20; j++) {
                Dijkstra d = new Dijkstra(g);
                d.initialize(g.getVertices().get(0));
                startTime = System.currentTimeMillis();
                while (d.singleStep()) {
                    d.singleStep();
                }
                endTime = System.currentTimeMillis();
                times[j] = endTime - startTime;
            }
            double returnValue = 0;
            for (int j = 0; j < times.length; j++) {
                returnValue += times[j];

            }
            System.out.println(returnValue / 20.0);
        }
    }