static void TestGraphStructure() { 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 УдалениеДобавлениеДуг myGrapg.Smart_Add(1, 2); myGrapg.PrintToGraph(); myGrapg.Smart_Add(2, 2); myGrapg.PrintToGraph(); myGrapg.Smart_Delete(1); myGrapg.PrintToGraph(); myGrapg.Smart_Delete(0); myGrapg.PrintToGraph(); myGrapg.Smart_Add(1, 2); myGrapg.PrintToGraph(); myGrapg.PrintToFile(); myGrapg.PrintToGraph(); #endregion }
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); }
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 }