@Test public void testSolveDAG() { int N = 200; Random r = new Random(); for (int i = 5; i < N; i += r.nextInt(5)) { Digraph dag = DigraphGenerator.dag(i, r.nextInt(i * (i - 1) / 2)); TransitiveClosure tc = new TransitiveClosure(dag); int test = ReachableVertex.solveDAG(GraphConverter.convert(dag)); if (test == -1) { Assert.assertTrue(checkNoThatPoint(tc, i)); } else { Assert.assertTrue(checkThatPoint(tc, test, i)); } } }
public static int solveDAG(Set<Integer>[] dag) { return 0; }
ReachableVertex { public static int solveDAG(Set<Integer>[] dag) { return 0; } }
ReachableVertex { public static int solveDAG(Set<Integer>[] dag) { return 0; }  }
ReachableVertex { public static int solveDAG(Set<Integer>[] dag) { return 0; }  static int solveDAG(Set<Integer>[] dag); static int solveDigraph(Set<Integer>[] digraph); }
ReachableVertex { public static int solveDAG(Set<Integer>[] dag) { return 0; }  static int solveDAG(Set<Integer>[] dag); static int solveDigraph(Set<Integer>[] digraph);  }