Example #1
0
        public void TestBellmanFord()
        {
            BellmanFord bellman = graph.BellmanFord(0);

            for (int i = 1; i < graph.V(); i++)
            {
                Edge[] path = bellman.ShortestPath(i);

                TestContext.WriteLine("Path: " + ToString(path));
                TestContext.WriteLine("Weight: " + bellman.Weight(i).ToString());
            }
        }