Changeset View
Changeset View
Standalone View
Standalone View
java/src/main/java/org/softwareheritage/graph/benchmark/BFS.java
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | public class BFS { | ||||
} | } | ||||
public static void main(String[] args) throws IOException { | public static void main(String[] args) throws IOException { | ||||
JSAPResult config = parse_args(args); | JSAPResult config = parse_args(args); | ||||
String graphPath = config.getString("graphPath"); | String graphPath = config.getString("graphPath"); | ||||
boolean useTransposed = config.getBoolean("useTransposed"); | boolean useTransposed = config.getBoolean("useTransposed"); | ||||
System.err.println("Loading graph " + graphPath + " ..."); | System.err.println("Loading graph " + graphPath + " ..."); | ||||
Graph graph = Graph.loadMapped(graphPath); | Graph graph = Graph.loadMapped(graphPath, Graph.LoadDirection.BOTH); | ||||
System.err.println("Graph loaded."); | System.err.println("Graph loaded."); | ||||
if (useTransposed) | if (useTransposed) | ||||
graph = graph.transpose(); | graph = graph.transpose(); | ||||
BFS bfs = new BFS(graph); | BFS bfs = new BFS(graph); | ||||
bfs.bfsperm(); | bfs.bfsperm(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |