Package org.opentripplanner.routing.graph

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


        Edge bc3 = new SimpleEdge(b, c, 3, 3);
        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


        new StreetEdge(intersectionA, intersectionD, lineStringAD, "Edge AD", 16 * speed,
                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);
View Full Code Here

        // 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) {
                assertEquals(transitStopA, edge.getFromVertex());
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.