Пример #1
0
 public virtual void TestAcyclic2()
 {
     // 0-1-2 3-4-5- (2 and 3) not connected
     int[][] g = new int[][] { new int[] { 1 }, new int[] { 0, 2 }, new int[] { 1 }, new int[] { 4 }, new int[] { 3, 5 }, new int[] { 4 } };
     GraphUtil.Cycle(g, new int[] { 0, 3, 4, 1, 5, 2 });
 }
Пример #2
0
 public virtual void TestToAdjList_Null()
 {
     GraphUtil.ToAdjList(null);
 }
Пример #3
0
 public virtual void TestAcyclic()
 {
     // 0-1-2-3-4-5 (5 and 0 not connected)
     int[][] g = new int[][] { new int[] { 1 }, new int[] { 0, 2 }, new int[] { 1, 3 }, new int[] { 2, 4 }, new int[] { 3, 5 }, new int[] { 4 } };
     GraphUtil.Cycle(g, new int[] { 0, 3, 4, 1, 5, 2 });
 }
Пример #4
0
 public virtual void TestToAdjList_Empty()
 {
     int[][] adjacent = GraphUtil.ToAdjList(new AtomContainer());
     Assert.AreEqual(0, adjacent.Length);
 }