示例#1
0
 private static bool detectCycleInGraphTest4()
 {
     return(DetectCycleInGraph.compute(new int[, ]
     {
         { 1, 2 }, { 2, 1 }, { 1, 3 }, { 3, 1 }, { 3, 5 }, { 5, 3 },
         { 5, 6 }, { 6, 5 }, { 6, 4 }, { 4, 6 }, { 4, 2 }, { 2, 4 }
     }));
 }
示例#2
0
 private static bool detectCycleInGraphTest2()
 {
     return(!DetectCycleInGraph.compute(new int[, ]
     {
         { 1, 2 }, { 2, 1 }, { 1, 3 }, { 3, 1 }, { 3, 4 }, { 4, 3 },
         { 4, 5 }, { 5, 4 }, { 5, 6 }, { 6, 5 }, { 4, 7 }, { 7, 4 }
     }));
 }
示例#3
0
 private static bool detectCycleInGraphTest6()
 {
     return(!DetectCycleInGraph.compute(new int[, ] {
         { 1, 2 }, { 2, 1 }
     }));
 }
示例#4
0
 private static bool detectCycleInGraphTest3()
 {
     return(!DetectCycleInGraph.compute(new int[, ] {
     }));
 }