rustworkx.complement¶ complement(graph)[source]¶ Compute the complement of a graph. Parameters: graph – The graph to be used, can be either a PyGraph or PyDiGraph. Returns: The complement of the graph. Return type: PyGraph or PyDiGraph Note Parallel edges and self-loops are never created, even if the multigraph is set to True