public void Graph8_BellmanFord()
        {
            var graph       = GraphGenerator.Graph8();
            var bellmanFord = new BellmanFord(graph);
            var result      = bellmanFord.Work(false);

            int[] excected = { 0, 1, 3, 7 };
            Assert.AreEqual(true, ArrayComparer.Compare(excected, result));
        }
Exemple #2
0
        public void Graph8_Dijkstra()
        {
            var graph    = GraphGenerator.Graph8();
            var dijkstra = new Dijkstra(graph);
            var result   = dijkstra.Work(false);

            int[] excected = { 0, 1, 3, 7 };
            Assert.AreEqual(true, ArrayComparer.Compare(excected, result));
        }