The disjoint union of a list of graphs is the graph constructed from the unions of their respective vertex sets and edge sets. By default, the vertex set of the union will be listed as sequences.
i1 : A = graph({{1,2},{2,3}},EntryMode=>"edges"); |
i2 : B = graph({1,2,3,4,5},{{1,2},{4,5}}); |
i3 : disjointUnion {A,B} o3 = Graph{{1, 0} => {{2, 0}} } {1, 1} => {{2, 1}} {2, 0} => {{1, 0}, {3, 0}} {2, 1} => {{1, 1}} {3, 0} => {{2, 0}} {3, 1} => {} {4, 1} => {{5, 1}} {5, 1} => {{4, 1}} o3 : Graph |
The object disjointUnion is a method function.