using QuickGraph; var graph = new AdjacencyGraph>(); graph.AddVertex(1); graph.AddVertex(2); graph.AddVertex(3); graph.AddEdge(new Edge (1,2)); graph.AddEdge(new Edge (1,3));
using Microsoft.Msagl.Drawing; var graph = new Graph(); var node1 = new Node("1"); graph.AddNode(node1); var node2 = new Node("2"); graph.AddNode(node2); var node3 = new Node("3"); graph.AddNode(node3); graph.AddEdge("1", "2"); graph.AddEdge("1", "3");In this example, we create a new graph using the Microsoft.Msagl library. We add three nodes to the graph, and then add two edges connecting node 1 to nodes 2 and 3. In conclusion, the package libraries used in the above examples are QuickGraph and Microsoft.Msagl, respectively.