Examples of countEdges()


Examples of com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.countEdges()

  public long countEdges() {

    final OrientBaseGraph g = acquire();
    try {
      return g.countEdges();
    } finally {
      g.shutdown();
    }
  }
View Full Code Here

Examples of com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.countEdges()

  @Override
  public long countEdges(String iClassName) {

    final OrientBaseGraph g = acquire();
    try {
      return g.countEdges(iClassName);
    } finally {
      g.shutdown();
    }
  }
View Full Code Here

Examples of com.tinkerpop.blueprints.impls.orient.OrientGraph.countEdges()

  private void assertGraph() {
    OrientGraph graph = new OrientGraph(URL);
    graph.setUseLightweightEdges(false);

    Assert.assertEquals(VERTEXES_COUNT, graph.countVertices("TestVertex"));
    Assert.assertEquals(EDGES_COUNT, graph.countEdges("TestEdge"));

    for (TestVertex vertex : vertexes) {
      Iterable<Vertex> vertexes = graph.command(
          new OSQLSynchQuery<Vertex>("select from TestVertex where uuid = '" + vertex.uuid + "'")).execute();
View Full Code Here

Examples of com.tinkerpop.blueprints.impls.orient.OrientVertex.countEdges()

    Assert.assertEquals(counter.get(), OPTIMISTIC_CYCLES * THREADS);

    OrientVertex loadedSuperNode = graphPool.getVertex(superNode.getIdentity());

    for (int i = 0; i < THREADS; ++i)
      Assert.assertEquals(loadedSuperNode.countEdges(Direction.IN), OPTIMISTIC_CYCLES * THREADS);

    graphPool.shutdown();

    System.out.println("ConcurrentSQLBatchUpdateSuperNodeTest Optimistic Test completed in "
        + (System.currentTimeMillis() - startedOn));
View Full Code Here

Examples of com.tinkerpop.blueprints.impls.orient.OrientVertex.countEdges()

    Assert.assertEquals(counter.get(), PESSIMISTIC_CYCLES * THREADS);

    OrientVertex loadedSuperNode = graphPool.getVertex(superNode.getIdentity());

    for (int i = 0; i < THREADS; ++i)
      Assert.assertEquals(loadedSuperNode.countEdges(Direction.IN), PESSIMISTIC_CYCLES * THREADS);

    graphPool.shutdown();

    System.out.println("ConcurrentSQLBatchUpdateSuperNodeTest Pessimistic Test completed in "
        + (System.currentTimeMillis() - startedOn));
View Full Code Here

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

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

       
        // 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

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

                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

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

        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

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

        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.