Package org.opentripplanner.routing.graph

Examples of org.opentripplanner.routing.graph.Graph.countEdges()


        Edge cd1 = new SimpleEdge(c, d, 1, 1);
        Edge cd2 = new SimpleEdge(c, d, 2, 2);
        Edge cd3 = new SimpleEdge(c, d, 3, 3);
        OverlayGraph og = new OverlayGraph(g);
        assertEquals(g.countVertices(), og.countVertices());
        assertEquals(g.countEdges(), og.countEdges());
        for (Vertex v : g.getVertices()) {
            for (Edge e : v.getOutgoing()) {
                assertTrue(og.getOutgoing(v).contains(e));
                assertTrue(og.getIncoming(e.getToVertex()).contains(e));
            }
View Full Code Here


       
        // remove edges from overlaygraph
        og.removeEdge(bc1);
        og.removeEdge(bc2);

        assertEquals(og.countEdges(), g.countEdges() - 3);
        assertTrue(og.getOutgoing(b).size() == 1);
        assertTrue(og.getIncoming(c).size() == 1);
    }
}
View Full Code Here

                StreetTraversalPermission.ALL, false);

        StreetfulStopLinker streetfulStopLinker = new StreetfulStopLinker();

        assertEquals(9, graph.countVertices());
        assertEquals(9, graph.countEdges());

        // The duration of the shortest path (A => E) is 2 seconds
        streetfulStopLinker.maxDuration = 1;
        streetfulStopLinker.buildGraph(graph, null);
        assertEquals(9, graph.countEdges());
View Full Code Here

        assertEquals(9, graph.countEdges());

        // The duration of the shortest path (A => E) is 2 seconds
        streetfulStopLinker.maxDuration = 1;
        streetfulStopLinker.buildGraph(graph, null);
        assertEquals(9, graph.countEdges());

        // The duration of the longest path (A => D) is 16 seconds
        streetfulStopLinker.maxDuration = 18;
        streetfulStopLinker.buildGraph(graph, null);
        assertEquals(13, graph.countEdges());
View Full Code Here

        assertEquals(9, graph.countEdges());

        // The duration of the longest path (A => D) is 16 seconds
        streetfulStopLinker.maxDuration = 18;
        streetfulStopLinker.buildGraph(graph, null);
        assertEquals(13, graph.countEdges());
        assertEquals(9, graph.countVertices());

        final double results[] = new double[4];
        for (Edge edge : graph.getEdges()) {
            if (edge instanceof SimpleTransfer) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.