This method will take in a Graph and a List of new edges, and output a graph with these new edges along with the previous edges.
i1 : H = cycleGraph 4; |
i2 : G = addEdge(H, set {0,2}) o2 = Graph{0 => {1, 2, 3}} 1 => {0, 2} 2 => {0, 1, 3} 3 => {0, 2} o2 : Graph |
i3 : G = addEdges'(H, {{0,2},{3,1}}) o3 = Graph{0 => {1, 2, 3}} 1 => {0, 2, 3} 2 => {0, 1, 3} 3 => {0, 1, 2} o3 : Graph |
The object addEdge is a method function.