@Test public void testGetEccentricity() throws Exception { Map<Long, Integer> eccentricity = GraphMetrics .getEccentricity(QUERY_HANDLER); for (Map.Entry<Long, Integer> ecc : eccentricity.entrySet()) { Integer expected = (Integer) QUERY_HANDLER .getVertexById(ecc.getKey()) .getProperties().get(ECC_PROPERTY_KEY); assertEquals(expected, ecc.getValue()); } }
public static Map<Long, Integer> getEccentricity(QueryHandler graph) { Map<Long, Integer> ecc = Maps.newHashMap(); for (Vertex v : graph.getVertices()) { ecc.put(v.getId(), getEccentricity(graph, v)); } return ecc; }
GraphMetrics { public static Map<Long, Integer> getEccentricity(QueryHandler graph) { Map<Long, Integer> ecc = Maps.newHashMap(); for (Vertex v : graph.getVertices()) { ecc.put(v.getId(), getEccentricity(graph, v)); } return ecc; } }
GraphMetrics { public static Map<Long, Integer> getEccentricity(QueryHandler graph) { Map<Long, Integer> ecc = Maps.newHashMap(); for (Vertex v : graph.getVertices()) { ecc.put(v.getId(), getEccentricity(graph, v)); } return ecc; }  }
GraphMetrics { public static Map<Long, Integer> getEccentricity(QueryHandler graph) { Map<Long, Integer> ecc = Maps.newHashMap(); for (Vertex v : graph.getVertices()) { ecc.put(v.getId(), getEccentricity(graph, v)); } return ecc; }  static int getDiameter(QueryHandler graph); static int getRadius(QueryHandler graph); static Map<Long, Integer> getEccentricity(QueryHandler graph); static Integer getEccentricity(QueryHandler graph, Vertex v); static Map<Integer, Set<String>> getComponents(QueryHandler graph); }
GraphMetrics { public static Map<Long, Integer> getEccentricity(QueryHandler graph) { Map<Long, Integer> ecc = Maps.newHashMap(); for (Vertex v : graph.getVertices()) { ecc.put(v.getId(), getEccentricity(graph, v)); } return ecc; }  static int getDiameter(QueryHandler graph); static int getRadius(QueryHandler graph); static Map<Long, Integer> getEccentricity(QueryHandler graph); static Integer getEccentricity(QueryHandler graph, Vertex v); static Map<Integer, Set<String>> getComponents(QueryHandler graph);  }