Exemple #1
0
 public static <V, E extends DirectedEdge<V>> void traverse(
     Graph<V, E> graph, Iterable<V> visitOrder, DFSVisitor<V, E> visitor) {
   MutableMap<V, DFSStatus> status = DFSCore.createInitialStatus(graph);
   AdjacencyListOfDirectedGraph<V, E> edges = AdjacencyListOfDirectedGraph.create(graph);
   for (V v : visitOrder)
     if (status.get(v) == DFSStatus.NOT_DISCOVERED) DFSCore.traverse(edges, status, v, visitor);
 }
 private static MutableMap<String, Language> getMap() {
   MutableMap<String, Language> map = GoodMutableMapFactory.getInstance().create();
   map.put("java", Language.JAVA);
   map.put("cpp", Language.CPP);
   map.put("c", Language.C);
   map.put("cc", Language.CPP);
   return map;
 }