Changeset View
Changeset View
Standalone View
Standalone View
java/src/main/java/org/softwareheritage/graph/utils/ReadGraph.java
Show All 14 Lines | public static void main(String[] args) throws IOException { | ||||
NodeIterator it = graph.nodeIterator(); | NodeIterator it = graph.nodeIterator(); | ||||
while (it.hasNext()) { | while (it.hasNext()) { | ||||
long srcNode = it.nextLong(); | long srcNode = it.nextLong(); | ||||
var s = it.successors(); | var s = it.successors(); | ||||
long dstNode; | long dstNode; | ||||
while ((dstNode = s.nextLong()) >= 0) { | while ((dstNode = s.nextLong()) >= 0) { | ||||
System.out.format( | System.out.format("%s %s\n", nodeMap.getSWHID(srcNode), nodeMap.getSWHID(dstNode)); | ||||
"%s %s\n", | |||||
nodeMap.getSWHID(srcNode), | |||||
nodeMap.getSWHID(dstNode) | |||||
); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||