public void IsFalseCase() { int[] result; int[] expectedList = { 0, 4, 12, 19, 21, 11, 9, 8, 14 }; int[,] graph = new int[, ] { { 0, 4, 0, 0, 0, 0, 0, 8, 0 }, { 4, 0, 8, 0, 0, 0, 0, 11, 0 }, { 0, 8, 0, 7, 0, 4, 0, 0, 2 }, { 0, 0, 7, 0, 9, 14, 0, 0, 0 }, { 0, 0, 0, 9, 0, 10, 0, 0, 0 }, { 0, 0, 4, 14, 10, 0, 2, 0, 0 }, { 0, 0, 0, 0, 0, 2, 0, 1, 6 }, { 8, 11, 0, 0, 0, 0, 1, 0, 7 }, { 0, 0, 2, 0, 0, 0, 6, 7, 0 } }; int uzunluk = expectedList.Length; Dijkstra_algorithm t = new Dijkstra_algorithm(); result = t.dijkstra(graph, 0); for (int i = 0; i < uzunluk; i++) { if (result[i] != expectedList[i]) { Assert.IsFalse(result[i] == expectedList[i]); break; } } }
public HashSet <TState> EpsClosure(TState state) { return(Dijkstra_algorithm.GetConnectedNodes(state, this, EqualityComparer <TState> .Default)); }