MCPcopy Index your code
hub / github.com/ShiftLeftSecurity/overflowdb / edgeCount

Method edgeCount

core/src/main/java/overflowdb/Graph.java:273–281  ·  view source on GitHub ↗

calculates the number of edges in the graph Note: this is an expensive operation, because edges are stored as part of the nodes

()

Source from the content-addressed store, hash-verified

271 * Note: this is an expensive operation, because edges are stored as part of the nodes
272 */
273 public int edgeCount() {
274 int edgeCount = 0;
275 final Iterator<Node> nodes = nodes();
276 while (nodes.hasNext()) {
277 NodeDb node = getNodeDb(nodes.next());
278 edgeCount += node.outEdgeCount();
279 }
280 return edgeCount;
281 }
282
283 /** number of edges grouped by label */
284 public Map<String, Integer> edgeCountByLabel() {

Calls 5

nodesMethod · 0.95
getNodeDbMethod · 0.95
outEdgeCountMethod · 0.95
nextMethod · 0.65
hasNextMethod · 0.45