This method computes the graph complement of the input graph and returns the result in the same format.
For graphs as defined in the TO "EdgeIdeals" package, one can use theTO "complementGraph" method to achieve the same effect; however, this method provides the option of not taking the complement if the complement has more edges than the graph itself.
i1 : R = QQ[a..e]; |
i2 : graphComplement cycle R o2 = Graph{edges => {{a, c}, {a, d}, {b, d}, {b, e}, {c, e}}} ring => R vertices => {a, b, c, d, e} o2 : Graph |
i3 : graphComplement "Dhc" o3 = DUW |