Differential D6594 Diff 23958 java/src/main/java/org/softwareheritage/graph/experiments/forks/ListEmptyOrigins.java
Changeset View
Changeset View
Standalone View
Standalone View
java/src/main/java/org/softwareheritage/graph/experiments/forks/ListEmptyOrigins.java
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | public static void main(String[] args) { | ||||
ArrayList<Long> badlist = leo.compute(leo.graph); | ArrayList<Long> badlist = leo.compute(leo.graph); | ||||
for (Long bad : badlist) { | for (Long bad : badlist) { | ||||
System.out.println(bad); | System.out.println(bad); | ||||
} | } | ||||
} | } | ||||
private void load_graph(String graphBasename) throws IOException { | private void load_graph(String graphBasename) throws IOException { | ||||
System.err.println("Loading graph " + graphBasename + " ..."); | System.err.println("Loading graph " + graphBasename + " ..."); | ||||
this.graph = Graph.loadMapped(graphBasename); | this.graph = Graph.loadMapped(graphBasename, Graph.LoadDirection.BOTH); | ||||
System.err.println("Graph loaded."); | System.err.println("Graph loaded."); | ||||
this.emptySnapshot = null; | this.emptySnapshot = null; | ||||
} | } | ||||
private boolean nodeIsEmptySnapshot(Long node) { | private boolean nodeIsEmptySnapshot(Long node) { | ||||
System.err.println(this.graph.getNodeType(node) + " " + this.graph.outdegree(node) + " " + node); | System.err.println(this.graph.getNodeType(node) + " " + this.graph.outdegree(node) + " " + node); | ||||
if (this.emptySnapshot == null && this.graph.getNodeType(node) == Node.Type.SNP | if (this.emptySnapshot == null && this.graph.getNodeType(node) == Node.Type.SNP | ||||
&& this.graph.outdegree(node) == 0) { | && this.graph.outdegree(node) == 0) { | ||||
Show All 28 Lines |