Simply creates a list, in the same format as the input, of all possible graphs obtained by adding one new edge to the input graph.
i1 : R = QQ[a..e]; |
i2 : addEdges cycle R o2 = {Graph{edges => {{a, b}, {a, c}, {b, c}, {c, d}, {a, e}, {d, e}}}, Graph{edges => {{a, b}, {b, c}, {a, d}, {c, d}, {a, e}, ring => R ring => R vertices => {a, b, c, d, e} vertices => {a, b, c, d, e} ---------------------------------------------------------------------------------------------------------------------------- {d, e}}}, Graph{edges => {{a, b}, {b, c}, {b, d}, {c, d}, {a, e}, {d, e}}}, Graph{edges => {{a, b}, {b, c}, {c, d}, {a, e}, ring => R ring => R vertices => {a, b, c, d, e} vertices => {a, b, c, d, e} ---------------------------------------------------------------------------------------------------------------------------- {b, e}, {d, e}}}, Graph{edges => {{a, b}, {b, c}, {c, d}, {a, e}, {c, e}, {d, e}}}} ring => R vertices => {a, b, c, d, e} o2 : List |
If the List input format is used, then one should use care as the list may contain isomorphic pairs.
The object addEdges is a method function with options.