Exemple #1
0
        static void TestBreadthFirstSearch()
        {
            string pathInput  = @"C:\Users\Виктория\Desktop\graph.txt";
            string pathPrint  = @"C:\Users\Виктория\Desktop\graphViz.png";
            string pathOutput = @"C:\Users\Виктория\Desktop\out.txt";

            ListOfArcs  myGrapg = new ListOfArcs(pathInput, pathOutput, pathPrint);
            ListOfEdges edgesG  = new ListOfEdges(myGrapg.QuantityVertex, myGrapg.VertexI, myGrapg.VertexJ);
            int         s       = 2;

            edgesG.BreadthFirstSearch(s);
        }
Exemple #2
0
        static void TestAlgDeikstraWithBuckets()
        {
            string pathInput  = @"C:\Users\Виктория\Desktop\graph.txt";
            string pathPrint  = @"C:\Users\Виктория\Desktop\graphViz.png";
            string pathOutput = @"C:\Users\Виктория\Desktop\out.txt";

            ListOfEdges myGrapg = new ListOfEdges(pathInput, pathOutput, pathPrint);

            myGrapg.Print();
            // myGrapg.AlgDeikstra(0);
            myGrapg.AlgDeikstraWithBuckets(0);
        }
Exemple #3
0
        static void TestConnectivityСomponentAlg()
        {
            string pathInput  = @"C:\Users\Виктория\Desktop\graph.txt";
            string pathPrint  = @"C:\Users\Виктория\Desktop\graphViz.png";
            string pathOutput = @"C:\Users\Виктория\Desktop\out.txt";

            ListOfArcs myGrapg = new ListOfArcs(pathInput, pathOutput, pathPrint);

            #region АлгоритмНахКомпонентСвязанности
            ListOfEdges edgesG = new ListOfEdges(myGrapg.QuantityVertex, myGrapg.VertexI, myGrapg.VertexJ);
            edgesG.ConnectivityСomponentAlg();
            #endregion
        }