Note
This is the documentation for the current state of the development branch of rustworkx. The documentation or APIs here can change prior to being released.
rustworkx.complement¶
- complement(graph)[source]¶
- complement(graph: PyDiGraph, /)
- complement(graph: PyGraph, /)
Compute the complement of a graph.
- Parameters:
graph – The graph to be used, can be either a
PyGraphorPyDiGraph.- Returns:
The complement of the graph.
- Return type:
Note
Parallel edges and self-loops are never created, even if the
multigraphis set toTrue