org.vertexium.Graph.getEdgeCount()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中org.vertexium.Graph.getEdgeCount()方法的一些代码示例,展示了Graph.getEdgeCount()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.getEdgeCount()方法的具体详情如下:
包路径:org.vertexium.Graph
类名称:Graph
方法名:getEdgeCount

Graph.getEdgeCount介绍

[英]Gets a count of the number of edges in the system.
[中]获取系统中边数的计数。

代码示例

代码示例来源:origin: org.visallo/visallo-web

@Handle
  public ClientApiVertexCount handle(Authorizations authorizations) throws Exception {
    long vertexCount = graph.getEdgeCount(authorizations);
    return new ClientApiVertexCount(vertexCount);
  }
}

代码示例来源:origin: visallo/vertexium

@Test
public void testGetCounts() {
  Vertex v1 = graph.addVertex("v1", VISIBILITY_A, AUTHORIZATIONS_A);
  Vertex v2 = graph.addVertex("v2", VISIBILITY_A, AUTHORIZATIONS_A);
  graph.addEdge("e1", v1, v2, LABEL_LABEL1, VISIBILITY_A, AUTHORIZATIONS_A);
  graph.flush();
  assertEquals(2, graph.getVertexCount(AUTHORIZATIONS_A));
  assertEquals(1, graph.getEdgeCount(AUTHORIZATIONS_A));
}

代码示例来源:origin: org.vertexium/vertexium-test

@Test
public void testGetCounts() {
  Vertex v1 = graph.addVertex("v1", VISIBILITY_A, AUTHORIZATIONS_A);
  Vertex v2 = graph.addVertex("v2", VISIBILITY_A, AUTHORIZATIONS_A);
  graph.addEdge("e1", v1, v2, LABEL_LABEL1, VISIBILITY_A, AUTHORIZATIONS_A);
  graph.flush();
  assertEquals(2, graph.getVertexCount(AUTHORIZATIONS_A));
  assertEquals(1, graph.getEdgeCount(AUTHORIZATIONS_A));
}

相关文章