Example #1
0
        static Graph makeWeightedGraph()
        {
            Graph g = new Graph(10);

            g.AddEdgeUnDirected(0, 1);
            g.AddEdgeUnDirected(0, 3);
            g.AddEdgeUnDirected(1, 2);
            g.AddEdgeUnDirected(1, 5);
            g.AddEdgeUnDirected(2, 8);
            g.AddEdgeUnDirected(3, 2);
            g.AddEdgeUnDirected(3, 4);
            g.AddEdgeUnDirected(4, 9);
            g.AddEdgeUnDirected(5, 8);
            g.AddEdgeUnDirected(6, 7);
            g.AddEdgeUnDirected(8, 6);
            g.AddEdgeUnDirected(9, 8);
            return(g);
        }