Default.Graph.DeleteVertex C# (CSharp) Méthode

DeleteVertex() public méthode

public DeleteVertex ( ) : void
Résultat void
	public void DeleteVertex() {

		DeleteVertex(Vfirst);
		
	}

Same methods

Graph::DeleteVertex ( Vertex v ) : void

Usage Example

        public static int Main()
        {
            Graph.flag = false;
            exitCode   = 100;

            Console.WriteLine("Test should pass with ExitCode 100");
            Console.WriteLine("Building Graph with 100 vertices...");
            Graph MyGraph = new Graph(100);

            MyGraph.BuildGraph();
            MyGraph.CheckIfReachable();

            Console.WriteLine("Deleting all vertices...");

            MyGraph.DeleteVertex();

            GC.Collect();
            GC.WaitForPendingFinalizers();

            Vertex temp = MyGraph.ReturnVfirst();

            GC.KeepAlive(temp); // will keep alive the graph till here

            Console.WriteLine("Done...");
            Graph.flag = true;  // to check if finalizers ran at shutdown or earlier
            return(exitCode);
        }
All Usage Examples Of Default.Graph::DeleteVertex